[PATCH v2 1/2] bcma: register bcma as device tree driver
Hauke Mehrtens
hauke at hauke-m.de
Thu Sep 18 13:52:11 PDT 2014
On 09/18/2014 10:03 PM, Rafał Miłecki wrote:
> On 16 September 2014 23:56, Hauke Mehrtens <hauke at hauke-m.de> wrote:
>> +The cores on the AXI bus are auto detected by bcma. bcma automatically
>> +detects the cores
>
> I'm far from being an English expert, but above is kind of pleonasm to me ;)
Yes to me too. ;-)
>> and the memory ranges they are using and they get
>> +registered afterwards. Automatic detection of the IRQ number is not
>> +possible on BCM47xx/BCM53xx ARM and MIPS SoCs.
>
> Should we replace "not possible" with something like "not reliable"?
> After the last info we got from Arend.
Yes that sounds good.
>
>
>> +#ifdef CONFIG_BCMA_HOST_SOC
>> +/* host_pci.c */
>
> s/pci/soc/
>
>
>> +#ifdef CONFIG_OF
>> +extern int __init bcma_host_soc_register_driver(void);
>> +extern void __exit bcma_host_soc_unregister_driver(void);
>> +#else
>> +static inline int __init bcma_host_soc_register_driver(void)
>> +{
>> + return 0;
>> +}
>> +static inline void __exit bcma_host_soc_unregister_driver(void)
>> +{
>> +}
>> +#endif /* CONFIG_OF */
>> +#endif /* CONFIG_BCMA_HOST_SOC */
>
> OK, so you just made bcma_host_soc_(un)register_driver calls safe above.
>
>
>> diff --git a/drivers/bcma/main.c b/drivers/bcma/main.c
>> index c421403..e5d578c 100644
>> --- a/drivers/bcma/main.c
>> +++ b/drivers/bcma/main.c
>> @@ -528,6 +528,13 @@ static int __init bcma_modinit(void)
>> if (err)
>> return err;
>>
>> +#ifdef CONFIG_BCMA_HOST_SOC
>> + err = bcma_host_soc_register_driver();
>> + if (err) {
>> + pr_err("SoC host initialization failed\n");
>> + err = 0;
>> + }
>> +#endif
>
> And above you check for CONFIG_ anyway.
>
Yes that sounds good.
More information about the linux-arm-kernel
mailing list