Re: MCP2515 DTS support
From: Marc Kleine-Budde <mkl@pengutronix.de>
Date: 2014-02-26 17:50:08
On 02/26/2014 06:36 PM, Lucas Zampar Bernardi wrote:
You are right Alexander!
The CONFIG_COMMON_CLK hasn't enable!
But for all SOC AT91_SAM9x5 still uses old clock style (AT91_USE_OLD_CLK):
config SOC_AT91SAM9X5
bool "AT91SAM9x5 family"
select HAVE_AT91_DBGU0
select HAVE_FB_ATMEL
select SOC_AT91SAM9
select AT91_USE_OLD_CLK
select HAVE_AT91_UTMI
select HAVE_AT91_SMD
select HAVE_AT91_USB_CLK
and one of dependencies for COMMON_CLK_AT91 is don't be AT91_USE_OLD_CLK
config COMMON_CLK_AT91
bool
default AT91_PMC_UNIT && USE_OF && !AT91_USE_OLD_CLK
select COMMON_CLK
config OLD_CLK_AT91
bool
default AT91_PMC_UNIT && AT91_USE_OLD_CLK
Now came my question: Can I use CONFIG_COMMON_CLK without my ARCH
support? If not, how we will support devices that need CONFIG_COMMON_CLK?
You probably have to wait for common clock support. However you can
still hook platform data to your spi device. For a mxs add this to
arch/arm/mach-mxs/mach-mxs.c:
static int abc_spi_notifier_call(struct notifier_block *nb,
unsigned long event, void *data)
{
struct device *dev = data;
if (event == BUS_NOTIFY_BIND_DRIVER)
if (strcmp(dev_name(dev), "spi32766.0") == 0)
dev->platform_data = &abc_pdata;
return NOTIFY_OK;
}
static struct notifier_block abc_spi_nb = {
.notifier_call = abc_spi_notifier_call,
};
static void __init abc_post_init(void)
{
bus_register_notifier(&spi_bus_type, &abc_spi_nb);
}
static void __init mxs_machine_init(void)
{
of_platform_populate(NULL, of_default_bus_match_table,
mxs_auxdata_lookup, NULL);
if (of_machine_is_compatible("123,abc"))
abc_post_init();
}
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
Attachments
- signature.asc [application/pgp-signature] 242 bytes