Add a mask to match only the relative base address of BSC controllers.
This should fix the attach of BSC on RPI2 (based on andrew@ dmesg).
This commit is contained in:
parent
69d4c287d3
commit
b4ae2f3c55
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=278861
@ -247,7 +247,7 @@ bcm_bsc_attach(device_t dev)
|
|||||||
/* Check the unit we are attaching by its base address. */
|
/* Check the unit we are attaching by its base address. */
|
||||||
start = rman_get_start(sc->sc_mem_res);
|
start = rman_get_start(sc->sc_mem_res);
|
||||||
for (i = 0; i < nitems(bcm_bsc_pins); i++) {
|
for (i = 0; i < nitems(bcm_bsc_pins); i++) {
|
||||||
if (bcm_bsc_pins[i].start == start)
|
if (bcm_bsc_pins[i].start == (start & BCM_BSC_BASE_MASK))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (i == nitems(bcm_bsc_pins)) {
|
if (i == nitems(bcm_bsc_pins)) {
|
||||||
|
@ -35,9 +35,10 @@ struct {
|
|||||||
uint32_t scl;
|
uint32_t scl;
|
||||||
unsigned long start;
|
unsigned long start;
|
||||||
} bcm_bsc_pins[] = {
|
} bcm_bsc_pins[] = {
|
||||||
{ 0, 1, 0x20205000 }, /* BSC0 GPIO pins and base address. */
|
{ 0, 1, 0x205000 }, /* BSC0 GPIO pins and base address. */
|
||||||
{ 2, 3, 0x20804000 } /* BSC1 GPIO pins and base address. */
|
{ 2, 3, 0x804000 } /* BSC1 GPIO pins and base address. */
|
||||||
};
|
};
|
||||||
|
#define BCM_BSC_BASE_MASK 0x00ffffff
|
||||||
|
|
||||||
struct bcm_bsc_softc {
|
struct bcm_bsc_softc {
|
||||||
device_t sc_dev;
|
device_t sc_dev;
|
||||||
|
Loading…
Reference in New Issue
Block a user