drivers: ieee802154: Let the initialization priority be done via Kconfig
Since the whole init level changes: all drivers and most of subsystems are initialized at level POST_KERNEL. Unfortunately that broke legacy tweaks on what to start first and after. Let's raise cc2520 priority, still below net_init. Jira: ZEP-1261 Change-Id: I0d91aa87a893584b3f5b39a193c823127961402f Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This commit is contained in:
parent
54ddabc7e6
commit
ed6ccead1e
2 changed files with 11 additions and 2 deletions
|
@ -151,6 +151,15 @@ config TI_CC2520_AUTO_ACK
|
||||||
thus the above stack needs to provide the right information for such
|
thus the above stack needs to provide the right information for such
|
||||||
filtering feature to work.
|
filtering feature to work.
|
||||||
|
|
||||||
|
config TI_CC2520_INIT_PRIO
|
||||||
|
int "CC2520 intialization priority"
|
||||||
|
default 80
|
||||||
|
help
|
||||||
|
Set the initialization priority number. Do not mess with it unless
|
||||||
|
you know what you are doing. Beware cc2520 requires gpio and spi to
|
||||||
|
be ready first (and sometime gpio should be the very first as spi
|
||||||
|
might need it too). And of course it has to start before the net stack.
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
config UPIPE_15_4
|
config UPIPE_15_4
|
||||||
|
|
|
@ -1058,12 +1058,12 @@ static struct ieee802154_radio_api cc2520_radio_api = {
|
||||||
#if defined(CONFIG_TI_CC2520_RAW)
|
#if defined(CONFIG_TI_CC2520_RAW)
|
||||||
DEVICE_AND_API_INIT(cc2520, CONFIG_TI_CC2520_DRV_NAME,
|
DEVICE_AND_API_INIT(cc2520, CONFIG_TI_CC2520_DRV_NAME,
|
||||||
cc2520_init, &cc2520_context_data, NULL,
|
cc2520_init, &cc2520_context_data, NULL,
|
||||||
APPLICATION, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
POST_KERNEL, CONFIG_TI_CC2520_INIT_PRIO,
|
||||||
&cc2520_radio_api);
|
&cc2520_radio_api);
|
||||||
#else
|
#else
|
||||||
NET_DEVICE_INIT(cc2520, CONFIG_TI_CC2520_DRV_NAME,
|
NET_DEVICE_INIT(cc2520, CONFIG_TI_CC2520_DRV_NAME,
|
||||||
cc2520_init, &cc2520_context_data, NULL,
|
cc2520_init, &cc2520_context_data, NULL,
|
||||||
CONFIG_KERNEL_INIT_PRIORITY_DEFAULT,
|
CONFIG_TI_CC2520_INIT_PRIO,
|
||||||
&cc2520_radio_api, IEEE802154_L2,
|
&cc2520_radio_api, IEEE802154_L2,
|
||||||
NET_L2_GET_CTX_TYPE(IEEE802154_L2), 127);
|
NET_L2_GET_CTX_TYPE(IEEE802154_L2), 127);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue