blob: bf5663641e4f37a7b3eca731cb71c1a3c248bcd9 [file] [log] [blame]
Delphine CC Chiu5c7dabe2023-12-15 17:58:13 +08001#!/bin/sh
2# shellcheck disable=SC2034
3# shellcheck source=meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common-functions
4. /usr/libexec/yosemite4-common-functions
5
6is_nuvoton_board="$(check_nuvoton_board)"
7
8if [ -n "$is_nuvoton_board" ]
9then
10 WIDTH=32
11 # PRSNT_NIC0 is at the 23th bit (GPIO Bank5: GPIO183), 0 means NIC is present
12 PRSNT_NIC0=0xf0015004
13 BITMASK_NIC0=0x800000
14
15 # PRSNT_NIC1 is at the 29th bit (GPIO Bank5: GPIO189), 0 means NIC is present
16 PRSNT_NIC1=0xf0015004
17 BITMASK_NIC1=0x20000000
18
19 # PRSNT_NIC2 is at the 28th bit (GPIO Bank2: GPIO92), 0 means NIC is present
20 PRSNT_NIC2=0xf0012004
21 BITMASK_NIC2=0x10000000
22
23 # PRSNT_NIC3 is at the 24th bit (GPIO Bank5: GPIO184), 0 means NIC is present
24 PRSNT_NIC3=0xf0015004
25 BITMASK_NIC3=0x400000
26else
27 WIDTH=8
28 # PRSNT_NIC0 is at the 6th bit (GPIOU5), 0 means NIC is present
29 PRSNT_NIC0=0x1e780088
30 BITMASK_NIC0=0x20
31
32 # PRSNT_NIC1 is at the 1th bit (GPIOE0), 0 means NIC is present
33 PRSNT_NIC1=0x1e780020
34 BITMASK_NIC1=0x01
35
36 # PRSNT_NIC2 is at the 2th bit (GPIOE1), 0 means NIC is present
37 PRSNT_NIC2=0x1e780020
38 BITMASK_NIC2=0x02
39
40 # PRSNT_NIC3 is at the 4th bit (GPIOM3), 0 means NIC is present
41 PRSNT_NIC3=0x1e780078
42 BITMASK_NIC3=0x08
43fi