ARM: 6337/2: AB8500 I2C platform configuration and irq
This patch adds the platform part of the AB8500 PRCMU I2C access driver. The old irq name AB4500 is changed to AB8500. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
fd0d67d62d
commit
29aeb3cfeb
|
@ -28,6 +28,7 @@
|
||||||
#include <mach/hardware.h>
|
#include <mach/hardware.h>
|
||||||
#include <mach/setup.h>
|
#include <mach/setup.h>
|
||||||
#include <mach/devices.h>
|
#include <mach/devices.h>
|
||||||
|
#include <mach/irqs.h>
|
||||||
|
|
||||||
#include "pins-db8500.h"
|
#include "pins-db8500.h"
|
||||||
#include "board-mop500.h"
|
#include "board-mop500.h"
|
||||||
|
@ -76,9 +77,27 @@ static struct ab8500_platform_data ab8500_platdata = {
|
||||||
.irq_base = MOP500_AB8500_IRQ_BASE,
|
.irq_base = MOP500_AB8500_IRQ_BASE,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_board_info u8500_spi_devices[] = {
|
static struct resource ab8500_resources[] = {
|
||||||
|
[0] = {
|
||||||
|
.start = IRQ_AB8500,
|
||||||
|
.end = IRQ_AB8500,
|
||||||
|
.flags = IORESOURCE_IRQ
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
struct platform_device ab8500_device = {
|
||||||
|
.name = "ab8500-i2c",
|
||||||
|
.id = 0,
|
||||||
|
.dev = {
|
||||||
|
.platform_data = &ab8500_platdata,
|
||||||
|
},
|
||||||
|
.num_resources = 1,
|
||||||
|
.resource = ab8500_resources,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct spi_board_info ab8500_spi_devices[] = {
|
||||||
{
|
{
|
||||||
.modalias = "ab8500",
|
.modalias = "ab8500-spi",
|
||||||
.controller_data = &ab4500_chip_info,
|
.controller_data = &ab4500_chip_info,
|
||||||
.platform_data = &ab8500_platdata,
|
.platform_data = &ab8500_platdata,
|
||||||
.max_speed_hz = 12000000,
|
.max_speed_hz = 12000000,
|
||||||
|
@ -166,8 +185,12 @@ static void __init u8500_init_machine(void)
|
||||||
|
|
||||||
mop500_sdi_init();
|
mop500_sdi_init();
|
||||||
|
|
||||||
spi_register_board_info(u8500_spi_devices,
|
/* If HW is early drop (ED) or V1.0 then use SPI to access AB8500 */
|
||||||
ARRAY_SIZE(u8500_spi_devices));
|
if (cpu_is_u8500ed() || cpu_is_u8500v10())
|
||||||
|
spi_register_board_info(ab8500_spi_devices,
|
||||||
|
ARRAY_SIZE(ab8500_spi_devices));
|
||||||
|
else /* If HW is v.1.1 or later use I2C to access AB8500 */
|
||||||
|
platform_device_register(&ab8500_device);
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
|
MACHINE_START(U8500, "ST-Ericsson MOP500 platform")
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
#define IRQ_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33)
|
#define IRQ_HSIR_CH1_OVRRUN (IRQ_SHPI_START + 33)
|
||||||
#define IRQ_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34)
|
#define IRQ_HSIR_CH2_OVRRUN (IRQ_SHPI_START + 34)
|
||||||
#define IRQ_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35)
|
#define IRQ_HSIR_CH3_OVRRUN (IRQ_SHPI_START + 35)
|
||||||
#define IRQ_AB4500 (IRQ_SHPI_START + 40)
|
#define IRQ_AB8500 (IRQ_SHPI_START + 40)
|
||||||
#define IRQ_PRCMU (IRQ_SHPI_START + 47)
|
#define IRQ_PRCMU (IRQ_SHPI_START + 47)
|
||||||
#define IRQ_DISP (IRQ_SHPI_START + 48)
|
#define IRQ_DISP (IRQ_SHPI_START + 48)
|
||||||
#define IRQ_SiPI3 (IRQ_SHPI_START + 49)
|
#define IRQ_SiPI3 (IRQ_SHPI_START + 49)
|
||||||
|
|
Loading…
Reference in New Issue