Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/broadcom/bcm2835/bcm2835_machdep.c
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
#ifdef SOC_BCM2835 | #ifdef SOC_BCM2835 | ||||
static platform_method_t bcm2835_methods[] = { | static platform_method_t bcm2835_methods[] = { | ||||
PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init), | PLATFORMMETHOD(platform_devmap_init, bcm2835_devmap_init), | ||||
PLATFORMMETHOD(platform_late_init, bcm2835_late_init), | PLATFORMMETHOD(platform_late_init, bcm2835_late_init), | ||||
PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), | PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), | ||||
PLATFORMMETHOD_END, | PLATFORMMETHOD_END, | ||||
}; | }; | ||||
FDT_PLATFORM_DEF(bcm2835, "bcm2835", 0, "raspberrypi,model-b", 100); | FDT_PLATFORM_DEF2(bcm2835, bcm2835_legacy, "bcm2835 (legacy)", 0, "raspberrypi,model-b", 100); | ||||
andrew: You should keep the old compat string here to allow for people to use an old DTB with a new… | |||||
FDT_PLATFORM_DEF2(bcm2835, bcm2835, "bcm2835", 0, "brcm,bcm2835", 100); | |||||
Done Inline ActionsThere is an extra argument in FDT_PLATFORM_DEF2 to add the variable name to use. andrew: There is an extra argument in `FDT_PLATFORM_DEF2` to add the variable name to use. | |||||
#endif | #endif | ||||
#ifdef SOC_BCM2836 | #ifdef SOC_BCM2836 | ||||
static platform_method_t bcm2836_methods[] = { | static platform_method_t bcm2836_methods[] = { | ||||
PLATFORMMETHOD(platform_devmap_init, bcm2836_devmap_init), | PLATFORMMETHOD(platform_devmap_init, bcm2836_devmap_init), | ||||
PLATFORMMETHOD(platform_late_init, bcm2835_late_init), | PLATFORMMETHOD(platform_late_init, bcm2835_late_init), | ||||
PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), | PLATFORMMETHOD(platform_cpu_reset, bcm2835_cpu_reset), | ||||
#ifdef SMP | #ifdef SMP | ||||
PLATFORMMETHOD(platform_mp_start_ap, bcm2836_mp_start_ap), | PLATFORMMETHOD(platform_mp_start_ap, bcm2836_mp_start_ap), | ||||
PLATFORMMETHOD(platform_mp_setmaxid, bcm2836_mp_setmaxid), | PLATFORMMETHOD(platform_mp_setmaxid, bcm2836_mp_setmaxid), | ||||
#endif | #endif | ||||
PLATFORMMETHOD_END, | PLATFORMMETHOD_END, | ||||
}; | }; | ||||
Done Inline ActionsAnd here. andrew: And here. | |||||
FDT_PLATFORM_DEF(bcm2836, "bcm2836", 0, "brcm,bcm2709", 100); | FDT_PLATFORM_DEF2(bcm2836, bcm2836_legacy, "bcm2836 (legacy)", 0, "brcm,bcm2709", 100); | ||||
FDT_PLATFORM_DEF2(bcm2836, bcm2836, "bcm2836", 0, "brcm,bcm2836", 100); | |||||
#endif | #endif |
You should keep the old compat string here to allow for people to use an old DTB with a new kernel. For this you can use FDT_PLATFORM_DEF2. You can see imx6_machdep.c for an example on using it.