blob: 58ff029ca2997f76978719bd77fcc8b2e81173d2 [file] [log] [blame]
Shad Ansari2f7f9be2017-06-07 13:34:53 -07001#
2# $Id: arad.soc,v 1.90 Broadcom SDK $
3#
4# $Copyright: Copyright 2016 Broadcom Corporation.
5# This program is the proprietary software of Broadcom Corporation
6# and/or its licensors, and may only be used, duplicated, modified
7# or distributed pursuant to the terms and conditions of a separate,
8# written license agreement executed between you and Broadcom
9# (an "Authorized License"). Except as set forth in an Authorized
10# License, Broadcom grants no license (express or implied), right
11# to use, or waiver of any kind with respect to the Software, and
12# Broadcom expressly reserves all rights in and to the Software
13# and all intellectual property rights therein. IF YOU HAVE
14# NO AUTHORIZED LICENSE, THEN YOU HAVE NO RIGHT TO USE THIS SOFTWARE
15# IN ANY WAY, AND SHOULD IMMEDIATELY NOTIFY BROADCOM AND DISCONTINUE
16# ALL USE OF THE SOFTWARE.
17#
18# Except as expressly set forth in the Authorized License,
19#
20# 1. This program, including its structure, sequence and organization,
21# constitutes the valuable trade secrets of Broadcom, and you shall use
22# all reasonable efforts to protect the confidentiality thereof,
23# and to use this information only in connection with your use of
24# Broadcom integrated circuit products.
25#
26# 2. TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS
27# PROVIDED "AS IS" AND WITH ALL FAULTS AND BROADCOM MAKES NO PROMISES,
28# REPRESENTATIONS OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY,
29# OR OTHERWISE, WITH RESPECT TO THE SOFTWARE. BROADCOM SPECIFICALLY
30# DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY,
31# NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES,
32# ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR
33# CORRESPONDENCE TO DESCRIPTION. YOU ASSUME THE ENTIRE RISK ARISING
34# OUT OF USE OR PERFORMANCE OF THE SOFTWARE.
35#
36# 3. TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL
37# BROADCOM OR ITS LICENSORS BE LIABLE FOR (i) CONSEQUENTIAL,
38# INCIDENTAL, SPECIAL, INDIRECT, OR EXEMPLARY DAMAGES WHATSOEVER
39# ARISING OUT OF OR IN ANY WAY RELATING TO YOUR USE OF OR INABILITY
40# TO USE THE SOFTWARE EVEN IF BROADCOM HAS BEEN ADVISED OF THE
41# POSSIBILITY OF SUCH DAMAGES; OR (ii) ANY AMOUNT IN EXCESS OF
42# THE AMOUNT ACTUALLY PAID FOR THE SOFTWARE ITSELF OR USD 1.00,
43# WHICHEVER IS GREATER. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING
44# ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY.$
45#
46
47# Load DRAM tuning properties from local File. RcLoad will not fail if file not found, and will not show errors of missing file.
48set RCError=off
49debug appl shell warn
50rcload /home/negev/bcm88650_dram_tune.soc
51debug appl shell =
52set RCError=on
53
54debug info
55debug appl rcload warn
56debug appl symtab warn
57debug bcm rx,tx,link,attach warn
58debug soc tests warn
59debug soc rx,phy,schan,reg,socmem,dma,mem,miim,mii,intr,counter,ddr warn
60debug soc common err
61debug sys verinet warn
62
63rcload arad_dram.soc
64
65# Set modid:
66# If diag_chassis is enabled (two line cards), and 'slot' is defined (slot is defined only when
67# working without a management card) - set modid to be 0 for slot 0, and 2 for slot 2
68# Otherwise (single line card, or management card), set modid to be 0 for unit 0, and 2 for unit 2
69# If module_id is set, then set modid to have module_id value
70if $?diag_chassis && $?slot "\
71 local modid $slot" \
72else "\
73 local modid $unit"
74expr $modid==1; if $? "local modid 2"
75
76if $?module_id " \
77 local modid $module_id"
78
79echo "$unit: modid=$modid"
80
81# Set base_modid:
82# Id base_module_id is set, then set base_modid to have base_module_id value.
83# Otherwise, set base_modid to be 0.
84if $?base_module_id " \
85 local base_modid $base_module_id" \
86else " \
87 local base_modid 0"
88
89expr $base_modid > 0
90if $? " \
91 echo '$unit: base_modid=$base_modid'"
92
93# Set nof_devices:
94# If diag_chassis is enabled (mgmt card) - set nof_devices to be 2.
95# Otherwise, set nof_devices to be 1.
96# If n_devices is set, then set nof_devices to have n_devices value.
97if $?diag_chassis " \
98 local nof_devices 2" \
99else "\
100 local nof_devices 1"
101
102if $?n_devices " \
103 local nof_devices $n_devices"
104
105expr $nof_devices > 1
106if $? " \
107 echo '$unit: nof_devices=$nof_devices'"
108
109if $?mng_cpu " \
110 echo '$unit:management card - polling is set on'; \
111 config add polled_irq_mode.BCM88650=1; \
112 config add schan_intr_enable.BCM88650=0; \
113 config add tdma_intr_enable.BCM88650=0; \
114 config add tslam_intr_enable.BCM88650=0; \
115 config add miim_intr_enable.BCM88650=0; \
116 config add polled_irq_mode.BCM88750=1; \
117 config add schan_intr_enable.BCM88750=0; \
118 config add tdma_intr_enable.BCM88750=0; \
119 config add tslam_intr_enable.BCM88750=0; \
120 config add miim_intr_enable.BCM88750=0; "
121
122#default values in a case which these parameters are not exist
123if !$?diag_cosq_disable "\
124 local diag_cosq_disable 0"
125if !$?warmboot "\
126 local warmboot 0"
127if !$?diag_disable "\
128 local diag_disable 0"
129if !$?diag_no_appl_stk "\
130 local diag_no_appl_stk 0"
131if !$?diag_no_itmh_prog_mode "\
132 local diag_no_itmh_prog_mode 0"
133if !$?l2_mode "\
134 local l2_mode 0"
135
136INIT_DNX ModID=$modid BaseModID=$base_modid NofDevices=$nof_devices CosqDisable=$diag_cosq_disable NoAppl=$diag_disable Warmboot=$warmboot NoApplStk=$diag_no_appl_stk NoItmhProgMode=$diag_no_itmh_prog_mode L2Mode=$l2_mode
137
138#LED support section start
139local ledcode '02 0D 67 31 67 1C 02 0E 67 31 67 1C 02 0F 67 31\
140 67 1C 02 10 67 31 67 1C 86 E0 3A 08 67 37 75 3E\
141 28 32 00 32 01 B7 97 75 3E 16 E0 CA 05 70 42 77\
142 3E 67 37 75 3E 77 42 12 A0 F8 15 1A 00 57 32 0E\
143 87 57 32 0F 87 57' #sdk88650.hex
144
145# Download LED code into LED processor and enable (if applicable).
146if $?feature_led_proc && $?ledcode && !$?simulator \
147 "led prog $ledcode; \
148 led auto on; led start"
149
150# If loading multiple rc.soc, upon loading the last unit, restart
151# all LED processors so any common blinking is in sync.
152# if !"expr $?feature_led_proc && !$?simulator && $unit == $units - 1" \
153# "*:led stop; *:led start"
154#LED support section end
155
156echo "arad.soc: Done."