ARM: Reduce __flush_dcache_page() visibility
[safe/jmp/linux-2.6] / arch / arm / mach-omap1 / board-palmtt.c
index e9a1ef5..d972cf9 100644 (file)
 #include <linux/mtd/partitions.h>
 #include <linux/leds.h>
 
-#include <asm/hardware.h>
+#include <mach/hardware.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/mach/flash.h>
 
-#include <asm/arch/led.h>
-#include <asm/arch/mcbsp.h>
-#include <asm/arch/gpio.h>
-#include <asm/arch/mux.h>
-#include <asm/arch/usb.h>
-#include <asm/arch/dma.h>
-#include <asm/arch/tc.h>
-#include <asm/arch/board.h>
-#include <asm/arch/irda.h>
-#include <asm/arch/keypad.h>
-#include <asm/arch/common.h>
-#include <asm/arch/omap-alsa.h>
+#include <mach/led.h>
+#include <mach/gpio.h>
+#include <mach/mux.h>
+#include <mach/usb.h>
+#include <mach/dma.h>
+#include <mach/tc.h>
+#include <mach/board.h>
+#include <mach/irda.h>
+#include <mach/keypad.h>
+#include <mach/common.h>
 
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 
+#define PALMTT_USBDETECT_GPIO  0
+#define PALMTT_CABLE_GPIO      1
+#define PALMTT_LED_GPIO                3
+#define PALMTT_PENIRQ_GPIO     6
+#define PALMTT_MMC_WP_GPIO     8
+#define PALMTT_HDQ_GPIO                11
+
 static int palmtt_keymap[] = {
        KEY(0, 0, KEY_ESC),
        KEY(0, 1, KEY_SPACE),
@@ -122,44 +127,6 @@ static struct platform_device palmtt_flash_device = {
        .resource       = &palmtt_flash_resource,
 };
 
-#define DEFAULT_BITPERSAMPLE 16
-
-static struct omap_mcbsp_reg_cfg mcbsp_regs = {
-       .spcr2          = FREE | FRST | GRST | XRST | XINTM(3),
-       .spcr1          = RINTM(3) | RRST,
-       .rcr2           = RPHASE | RFRLEN2(OMAP_MCBSP_WORD_8) |
-                               RWDLEN2(OMAP_MCBSP_WORD_16) | RDATDLY(0),
-       .rcr1           = RFRLEN1(OMAP_MCBSP_WORD_8) |
-                               RWDLEN1(OMAP_MCBSP_WORD_16),
-       .xcr2           = XPHASE | XFRLEN2(OMAP_MCBSP_WORD_8) |
-                               XWDLEN2(OMAP_MCBSP_WORD_16) | XDATDLY(0) | XFIG,
-       .xcr1           = XFRLEN1(OMAP_MCBSP_WORD_8) |
-                               XWDLEN1(OMAP_MCBSP_WORD_16),
-       .srgr1          = FWID(DEFAULT_BITPERSAMPLE - 1),
-       .srgr2          = GSYNC | CLKSP | FSGM |
-                               FPER(DEFAULT_BITPERSAMPLE * 2 - 1),
-       .pcr0           = CLKXP | CLKRP,        /* mcbsp: slave */
-};
-
-static struct omap_alsa_codec_config alsa_config = {
-       .name                   = "PalmTT AIC23",
-       .mcbsp_regs_alsa        = &mcbsp_regs,
-       .codec_configure_dev    = NULL, /* aic23_configure, */
-       .codec_set_samplerate   = NULL, /* aic23_set_samplerate, */
-       .codec_clock_setup      = NULL, /* aic23_clock_setup, */
-       .codec_clock_on         = NULL, /* aic23_clock_on, */
-       .codec_clock_off        = NULL, /* aic23_clock_off, */
-       .get_default_samplerate = NULL, /* aic23_get_default_samplerate, */
-};
-
-static struct platform_device palmtt_mcbsp1_device = {
-       .name   = "omap_alsa_mcbsp",
-       .id     = 1,
-       .dev    = {
-               .platform_data  = &alsa_config,
-       },
-};
-
 static struct resource palmtt_kp_resources[] = {
        [0] = {
                .start  = INT_KEYBOARD,
@@ -257,7 +224,6 @@ static struct platform_device palmtt_led_device = {
 
 static struct platform_device *palmtt_devices[] __initdata = {
        &palmtt_flash_device,
-       &palmtt_mcbsp1_device,
        &palmtt_kp_device,
        &palmtt_lcd_device,
        &palmtt_irda_device,
@@ -268,7 +234,7 @@ static struct platform_device *palmtt_devices[] __initdata = {
 
 static int palmtt_get_pendown_state(void)
 {
-       return !omap_get_gpio_datain(6);
+       return !gpio_get_value(6);
 }
 
 static const struct ads7846_platform_data palmtt_ts_info = {
@@ -308,14 +274,8 @@ static struct omap_lcd_config palmtt_lcd_config __initdata = {
        .ctrl_name      = "internal",
 };
 
-static struct omap_uart_config palmtt_uart_config __initdata = {
-       .enabled_uarts = (1 << 0) | (1 << 1) | (0 << 2),
-};
-
-static struct omap_board_config_kernel palmtt_config[] = {
-       { OMAP_TAG_USB,         &palmtt_usb_config      },
+static struct omap_board_config_kernel palmtt_config[] __initdata = {
        { OMAP_TAG_LCD,         &palmtt_lcd_config      },
-       { OMAP_TAG_UART,        &palmtt_uart_config     },
 };
 
 static void __init omap_mpu_wdt_mode(int mode) {
@@ -329,6 +289,14 @@ static void __init omap_mpu_wdt_mode(int mode) {
 
 static void __init omap_palmtt_init(void)
 {
+       /* mux pins for uarts */
+       omap_cfg_reg(UART1_TX);
+       omap_cfg_reg(UART1_RTS);
+       omap_cfg_reg(UART2_TX);
+       omap_cfg_reg(UART2_RTS);
+       omap_cfg_reg(UART3_TX);
+       omap_cfg_reg(UART3_RX);
+
        omap_mpu_wdt_mode(0);
 
        omap_board_config = palmtt_config;
@@ -338,6 +306,7 @@ static void __init omap_palmtt_init(void)
 
        spi_register_board_info(palmtt_boardinfo,ARRAY_SIZE(palmtt_boardinfo));
        omap_serial_init();
+       omap_usb_init(&palmtt_usb_config);
        omap_register_i2c_bus(1, 100, NULL, 0);
 }