From 80525801275b34c279445641330db3c75073fc28 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Lars=20H=C3=A4ring?= Date: Fri, 28 Mar 2008 17:49:46 +0100 Subject: [PATCH 3/5] =?utf-8?q?Wires=20up=20the=20image=20interface=20and=20adds=20it=20as=20platform=20device. =20Signed-off-by:=20Lars=20H=C3=A4ring=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit --- arch/avr32/mach-at32ap/at32ap700x.c | 47 +++++++++++++++++++++++++++++++++ include/asm-avr32/arch-at32ap/board.h | 1 + 2 files changed, 48 insertions(+), 0 deletions(-) diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 7cb70b3..d61b3af 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -1641,6 +1641,51 @@ err_add_resources: } /* -------------------------------------------------------------------- + * ISI + * -------------------------------------------------------------------- */ +static struct resource atmel_isi0_resource[] = { + PBMEM(0xfff02c00), + IRQ(30), +}; +DEFINE_DEV(atmel_isi, 0); +DEV_CLK(hclk, atmel_isi0, hsb, 5); +DEV_CLK(pclk, atmel_isi0, pbb, 11); + +struct platform_device *__init +at32_add_device_isi(unsigned int id) +{ + struct platform_device *pdev; + + switch (id) { + case 0: + pdev = &atmel_isi0_device; + select_peripheral(PB(0), PERIPH_A, 0); /* DATA0 */ + select_peripheral(PB(1), PERIPH_A, 0); /* DATA1 */ + select_peripheral(PB(2), PERIPH_A, 0); /* DATA2 */ + select_peripheral(PB(3), PERIPH_A, 0); /* DATA3 */ + select_peripheral(PB(4), PERIPH_A, 0); /* DATA4 */ + select_peripheral(PB(5), PERIPH_A, 0); /* DATA5 */ + select_peripheral(PB(6), PERIPH_A, 0); /* DATA6 */ + select_peripheral(PB(7), PERIPH_A, 0); /* DATA7 */ + select_peripheral(PB(11), PERIPH_B, 0); /* DATA8 */ + select_peripheral(PB(12), PERIPH_B, 0); /* DATA9 */ + select_peripheral(PB(13), PERIPH_B, 0); /* DATA10 */ + select_peripheral(PB(14), PERIPH_B, 0); /* DATA11 */ + select_peripheral(PB(8), PERIPH_A, 0); /* HSYNC */ + select_peripheral(PB(9), PERIPH_A, 0); /* VSYNC */ + select_peripheral(PB(10), PERIPH_A, 0); /* PCLK */ + break; + + default: + return NULL; + } + + platform_device_register(pdev); + + return pdev; +} + +/* -------------------------------------------------------------------- * GCLK * -------------------------------------------------------------------- */ static struct clk gclk0 = { @@ -1743,6 +1788,8 @@ struct clk *at32_clock_list[] = { &gclk2, &gclk3, &gclk4, + &atmel_isi0_hclk, + &atmel_isi0_pclk, }; unsigned int at32_nr_clocks = ARRAY_SIZE(at32_clock_list); diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h index 9bab8da..7415d9e 100644 --- a/include/asm-avr32/arch-at32ap/board.h +++ b/include/asm-avr32/arch-at32ap/board.h @@ -81,6 +81,7 @@ struct platform_device * at32_add_device_mci(unsigned int id, struct mci_platform_data *data); struct platform_device *at32_add_device_ac97c(unsigned int id); struct platform_device *at32_add_device_abdac(unsigned int id); +struct platform_device *at32_add_device_isi(unsigned int id); struct cf_platform_data { int detect_pin; -- 1.5.4.4