[Ltib] Failed to add ' dev:ssp1' on Phytec 3250 board.
From:
Quentin YANG
Subject:
[Ltib] Failed to add ' dev:ssp1' on Phytec 3250 board.
Date:
Fri, 13 Aug 2010 10:50:26 +1000
Hi Kevin,
I've been trying to add another dev:ssp1 using LPC3250 ssp1 SPI Bus, which is originally reserved for LCD Pannel on Phytec3250 board.
I did following things, but could not see dev:ssp1 under /sys/devices/ .
It's still just showing: address@hidden /]# ls /sys/devices dev:mmc0 dev:ssp0 platform system
Two questions: 1. Apart from creation of a new amba_device 'dev:ssp1' and get it registered, what else I need to do to create 'dev:ssp1' that uses the second SPI bus port?
2. Why I cannot see "registered amba device" debugging message on either console print or 'dmesg' log, which I inserted to help the kernel debugging? (see the printk() below)
I attached the 'dmesg' log of Phytec board.
ONE: amba_device Registering
----------------------------------------------------------
platform_add_devices(phy3250_devs, ARRAY_SIZE(phy3250_devs));
for (i = 0; i < ARRAY_SIZE(amba_devs); i++) {
struct amba_device *d = amba_devs[i]; printk(KERN_ALERT,"registered amba device \n");
amba_device_register(d, &iomem_resource);
}
TWO: I created one amba_device 'lpc32xx_ssp1_device' as below, and I removed 'clcd device'. Also, in Kernel config, I removed the TOUCHSCREEN_SUPPORT. " # CONFIG_INPUT_TOUCHSCREEN is not set "
-------------------------------------------------------------------------------------------- static struct amba_device *amba_devs[] __initdata = { /* &lpc32xx_clcd_device,*/
&lpc32xx_ssp0_device, &lpc32xx_ssp1_device, #if defined(CONFIG_MMC_ARMMMCI) &lpc32xx_mmc_device, #endif };
THREE: new dev:ssp1 platform_device and platform_data is as follows
--------------------------------------------------------------------- /* SSP 1 */ static void phy3250_spi1_cs_set(u32 control) { /*gpio_set_value(SPI0_CS_GPIO, (int) control);*/ }