diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 23:46:51 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-11 23:46:51 -0500 |
| commit | c4e194e3b71ff4fed01d727c32ee1071921d28a3 (patch) | |
| tree | f3d237e46ee08c15693e14c15ed1f93c1946c560 | |
| parent | 2fe77b81c77eed92c4c0439f74c8148a295b4a86 (diff) | |
| parent | 3989d17847071fa94c93299805a9cca27cf65d26 (diff) | |
Merge branch 'for-linus' of git://codeaurora.org/quic/kernel/dwalker/linux-msm
* 'for-linus' of git://codeaurora.org/quic/kernel/dwalker/linux-msm:
HTC Dream: mmc compilation fixes
video: Allow selecting MSM framebuffer in Kconfig
Add arm msm maintainer entry
msm: Add memory map for HTC Dream
msm: add minimal board file for HTC Dream device
msm: make debugging UART (for DEBUG_LL) configurable
| -rw-r--r-- | MAINTAINERS | 13 | ||||
| -rw-r--r-- | arch/arm/mach-msm/Kconfig | 30 | ||||
| -rw-r--r-- | arch/arm/mach-msm/Makefile | 1 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-dream.c | 93 | ||||
| -rw-r--r-- | arch/arm/mach-msm/board-dream.h | 5 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/debug-macro.S | 24 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/mmc.h | 26 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/msm_iomap.h | 12 | ||||
| -rw-r--r-- | arch/arm/mach-msm/include/mach/uncompress.h | 7 | ||||
| -rw-r--r-- | arch/arm/mach-msm/io.c | 3 | ||||
| -rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 5 | ||||
| -rw-r--r-- | drivers/video/Kconfig | 2 |
12 files changed, 209 insertions, 12 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 520a3b3fd82c..14eab97a86aa 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
| @@ -801,6 +801,19 @@ L: openmoko-kernel@lists.openmoko.org (subscribers-only) | |||
| 801 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner | 801 | W: http://wiki.openmoko.org/wiki/Neo_FreeRunner |
| 802 | S: Supported | 802 | S: Supported |
| 803 | 803 | ||
| 804 | ARM/QUALCOMM MSM MACHINE SUPPORT | ||
| 805 | M: David Brown <davidb@codeaurora.org> | ||
| 806 | M: Daniel Walker <dwalker@codeaurora.org> | ||
| 807 | M: Bryan Huntsman <bryanh@codeaurora.org> | ||
| 808 | F: arch/arm/mach-msm/ | ||
| 809 | F: drivers/video/msm/ | ||
| 810 | F: drivers/mmc/host/msm_sdcc.c | ||
| 811 | F: drivers/mmc/host/msm_sdcc.h | ||
| 812 | F: drivers/serial/msm_serial.h | ||
| 813 | F: drivers/serial/msm_serial.c | ||
| 814 | T: git git://codeaurora.org/quic/kernel/dwalker/linux-msm.git | ||
| 815 | S: Maintained | ||
| 816 | |||
| 804 | ARM/TOSA MACHINE SUPPORT | 817 | ARM/TOSA MACHINE SUPPORT |
| 805 | M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 818 | M: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> |
| 806 | M: Dirk Opfer <dirk@opfer-online.de> | 819 | M: Dirk Opfer <dirk@opfer-online.de> |
diff --git a/arch/arm/mach-msm/Kconfig b/arch/arm/mach-msm/Kconfig index d140abca690a..f780086befd7 100644 --- a/arch/arm/mach-msm/Kconfig +++ b/arch/arm/mach-msm/Kconfig | |||
| @@ -3,6 +3,30 @@ if ARCH_MSM | |||
| 3 | comment "MSM Board Type" | 3 | comment "MSM Board Type" |
| 4 | depends on ARCH_MSM | 4 | depends on ARCH_MSM |
| 5 | 5 | ||
| 6 | config MSM_DEBUG_UART | ||
| 7 | int | ||
| 8 | default 1 if MSM_DEBUG_UART1 | ||
| 9 | default 2 if MSM_DEBUG_UART2 | ||
| 10 | default 3 if MSM_DEBUG_UART3 | ||
| 11 | |||
| 12 | choice | ||
| 13 | prompt "Debug UART" | ||
| 14 | |||
| 15 | default MSM_DEBUG_UART_NONE | ||
| 16 | |||
| 17 | config MSM_DEBUG_UART_NONE | ||
| 18 | bool "None" | ||
| 19 | |||
| 20 | config MSM_DEBUG_UART1 | ||
| 21 | bool "UART1" | ||
| 22 | |||
| 23 | config MSM_DEBUG_UART2 | ||
| 24 | bool "UART2" | ||
| 25 | |||
| 26 | config MSM_DEBUG_UART3 | ||
| 27 | bool "UART3" | ||
| 28 | endchoice | ||
| 29 | |||
| 6 | config MACH_HALIBUT | 30 | config MACH_HALIBUT |
| 7 | depends on ARCH_MSM | 31 | depends on ARCH_MSM |
| 8 | default y | 32 | default y |
| @@ -10,4 +34,10 @@ config MACH_HALIBUT | |||
| 10 | help | 34 | help |
| 11 | Support for the Qualcomm SURF7201A eval board. | 35 | Support for the Qualcomm SURF7201A eval board. |
| 12 | 36 | ||
| 37 | config MACH_TROUT | ||
| 38 | default y | ||
| 39 | bool "HTC Dream (aka trout)" | ||
| 40 | help | ||
| 41 | Support for the HTC Dream, T-Mobile G1, Android ADP1 devices. | ||
| 42 | |||
| 13 | endif | 43 | endif |
diff --git a/arch/arm/mach-msm/Makefile b/arch/arm/mach-msm/Makefile index 1aa47001aa3b..91e6f5c95dc1 100644 --- a/arch/arm/mach-msm/Makefile +++ b/arch/arm/mach-msm/Makefile | |||
| @@ -6,3 +6,4 @@ obj-y += clock.o clock-7x01a.o | |||
| 6 | 6 | ||
| 7 | obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o | 7 | obj-$(CONFIG_MACH_HALIBUT) += board-halibut.o |
| 8 | 8 | ||
| 9 | obj-$(CONFIG_MACH_TROUT) += board-dream.o | ||
diff --git a/arch/arm/mach-msm/board-dream.c b/arch/arm/mach-msm/board-dream.c new file mode 100644 index 000000000000..21afa8513168 --- /dev/null +++ b/arch/arm/mach-msm/board-dream.c | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | /* linux/arch/arm/mach-msm/board-dream.c | ||
| 2 | * | ||
| 3 | * Copyright (C) 2009 Google, Inc. | ||
| 4 | * Author: Brian Swetland <swetland@google.com> | ||
| 5 | * | ||
| 6 | * This software is licensed under the terms of the GNU General Public | ||
| 7 | * License version 2, as published by the Free Software Foundation, and | ||
| 8 | * may be copied, distributed, and modified under those terms. | ||
| 9 | * | ||
| 10 | * This program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | */ | ||
| 16 | |||
| 17 | #include <linux/kernel.h> | ||
| 18 | #include <linux/init.h> | ||
| 19 | #include <linux/platform_device.h> | ||
| 20 | |||
| 21 | #include <asm/mach-types.h> | ||
| 22 | #include <asm/mach/arch.h> | ||
| 23 | #include <asm/mach/map.h> | ||
| 24 | #include <asm/setup.h> | ||
| 25 | |||
| 26 | #include <mach/board.h> | ||
| 27 | #include <mach/hardware.h> | ||
| 28 | #include <mach/msm_iomap.h> | ||
| 29 | |||
| 30 | #include "devices.h" | ||
| 31 | #include "board-dream.h" | ||
| 32 | |||
| 33 | static struct platform_device *devices[] __initdata = { | ||
| 34 | &msm_device_uart3, | ||
| 35 | &msm_device_smd, | ||
| 36 | &msm_device_nand, | ||
| 37 | &msm_device_hsusb, | ||
| 38 | &msm_device_i2c, | ||
| 39 | }; | ||
| 40 | |||
| 41 | extern struct sys_timer msm_timer; | ||
| 42 | |||
| 43 | static void __init trout_init_irq(void) | ||
| 44 | { | ||
| 45 | msm_init_irq(); | ||
| 46 | } | ||
| 47 | |||
| 48 | static void __init trout_fixup(struct machine_desc *desc, struct tag *tags, | ||
| 49 | char **cmdline, struct meminfo *mi) | ||
| 50 | { | ||
| 51 | mi->nr_banks = 1; | ||
| 52 | mi->bank[0].start = PHYS_OFFSET; | ||
| 53 | mi->bank[0].node = PHYS_TO_NID(PHYS_OFFSET); | ||
| 54 | mi->bank[0].size = (101*1024*1024); | ||
| 55 | } | ||
| 56 | |||
| 57 | static void __init trout_init(void) | ||
| 58 | { | ||
| 59 | platform_add_devices(devices, ARRAY_SIZE(devices)); | ||
| 60 | } | ||
| 61 | |||
| 62 | static struct map_desc trout_io_desc[] __initdata = { | ||
| 63 | { | ||
| 64 | .virtual = TROUT_CPLD_BASE, | ||
| 65 | .pfn = __phys_to_pfn(TROUT_CPLD_START), | ||
| 66 | .length = TROUT_CPLD_SIZE, | ||
| 67 | .type = MT_DEVICE_NONSHARED | ||
| 68 | } | ||
| 69 | }; | ||
| 70 | |||
| 71 | static void __init trout_map_io(void) | ||
| 72 | { | ||
| 73 | msm_map_common_io(); | ||
| 74 | iotable_init(trout_io_desc, ARRAY_SIZE(trout_io_desc)); | ||
| 75 | |||
| 76 | #ifdef CONFIG_MSM_DEBUG_UART3 | ||
| 77 | /* route UART3 to the "H2W" extended usb connector */ | ||
| 78 | writeb(0x80, TROUT_CPLD_BASE + 0x00); | ||
| 79 | #endif | ||
| 80 | |||
| 81 | msm_clock_init(); | ||
| 82 | } | ||
| 83 | |||
| 84 | MACHINE_START(TROUT, "HTC Dream") | ||
| 85 | .phys_io = MSM_DEBUG_UART_PHYS, | ||
| 86 | .io_pg_offst = ((MSM_DEBUG_UART_BASE) >> 18) & 0xfffc, | ||
| 87 | .boot_params = 0x10000100, | ||
| 88 | .fixup = trout_fixup, | ||
| 89 | .map_io = trout_map_io, | ||
| 90 | .init_irq = trout_init_irq, | ||
| 91 | .init_machine = trout_init, | ||
| 92 | .timer = &msm_timer, | ||
| 93 | MACHINE_END | ||
diff --git a/arch/arm/mach-msm/board-dream.h b/arch/arm/mach-msm/board-dream.h new file mode 100644 index 000000000000..4f345a5a0a61 --- /dev/null +++ b/arch/arm/mach-msm/board-dream.h | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | |||
| 2 | #define TROUT_CPLD_BASE 0xE8100000 | ||
| 3 | #define TROUT_CPLD_START 0x98000000 | ||
| 4 | #define TROUT_CPLD_SIZE SZ_4K | ||
| 5 | |||
diff --git a/arch/arm/mach-msm/include/mach/debug-macro.S b/arch/arm/mach-msm/include/mach/debug-macro.S index 1db3c97dbc49..d48747ebcd3d 100644 --- a/arch/arm/mach-msm/include/mach/debug-macro.S +++ b/arch/arm/mach-msm/include/mach/debug-macro.S | |||
| @@ -14,15 +14,18 @@ | |||
| 14 | * | 14 | * |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | |||
| 18 | |||
| 17 | #include <mach/hardware.h> | 19 | #include <mach/hardware.h> |
| 18 | #include <mach/msm_iomap.h> | 20 | #include <mach/msm_iomap.h> |
| 19 | 21 | ||
| 22 | #ifdef CONFIG_MSM_DEBUG_UART | ||
| 20 | .macro addruart,rx | 23 | .macro addruart,rx |
| 21 | @ see if the MMU is enabled and select appropriate base address | 24 | @ see if the MMU is enabled and select appropriate base address |
| 22 | mrc p15, 0, \rx, c1, c0 | 25 | mrc p15, 0, \rx, c1, c0 |
| 23 | tst \rx, #1 | 26 | tst \rx, #1 |
| 24 | ldreq \rx, =MSM_UART1_PHYS | 27 | ldreq \rx, =MSM_DEBUG_UART_PHYS |
| 25 | movne \rx, #0 | 28 | ldrne \rx, =MSM_DEBUG_UART_BASE |
| 26 | .endm | 29 | .endm |
| 27 | 30 | ||
| 28 | .macro senduart,rd,rx | 31 | .macro senduart,rd,rx |
| @@ -32,13 +35,20 @@ | |||
| 32 | 35 | ||
| 33 | .macro waituart,rd,rx | 36 | .macro waituart,rd,rx |
| 34 | @ wait for TX_READY | 37 | @ wait for TX_READY |
| 35 | teq \rx, #0 | 38 | 1001: ldr \rd, [\rx, #0x08] |
| 36 | bne 2f | ||
| 37 | 1: ldr \rd, [\rx, #0x08] | ||
| 38 | tst \rd, #0x04 | 39 | tst \rd, #0x04 |
| 39 | beq 1b | 40 | beq 1001b |
| 40 | 2: | 41 | .endm |
| 42 | #else | ||
| 43 | .macro addruart,rx | ||
| 44 | .endm | ||
| 45 | |||
| 46 | .macro senduart,rd,rx | ||
| 47 | .endm | ||
| 48 | |||
| 49 | .macro waituart,rd,rx | ||
| 41 | .endm | 50 | .endm |
| 51 | #endif | ||
| 42 | 52 | ||
| 43 | .macro busyuart,rd,rx | 53 | .macro busyuart,rd,rx |
| 44 | .endm | 54 | .endm |
diff --git a/arch/arm/mach-msm/include/mach/mmc.h b/arch/arm/mach-msm/include/mach/mmc.h new file mode 100644 index 000000000000..0ecf25426284 --- /dev/null +++ b/arch/arm/mach-msm/include/mach/mmc.h | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* | ||
| 2 | * arch/arm/include/asm/mach/mmc.h | ||
| 3 | */ | ||
| 4 | #ifndef ASMARM_MACH_MMC_H | ||
| 5 | #define ASMARM_MACH_MMC_H | ||
| 6 | |||
| 7 | #include <linux/mmc/host.h> | ||
| 8 | #include <linux/mmc/card.h> | ||
| 9 | #include <linux/mmc/sdio_func.h> | ||
| 10 | |||
| 11 | struct embedded_sdio_data { | ||
| 12 | struct sdio_cis cis; | ||
| 13 | struct sdio_cccr cccr; | ||
| 14 | struct sdio_embedded_func *funcs; | ||
| 15 | int num_funcs; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct mmc_platform_data { | ||
| 19 | unsigned int ocr_mask; /* available voltages */ | ||
| 20 | u32 (*translate_vdd)(struct device *, unsigned int); | ||
| 21 | unsigned int (*status)(struct device *); | ||
| 22 | struct embedded_sdio_data *embedded_sdio; | ||
| 23 | int (*register_status_notify)(void (*callback)(int card_present, void *dev_id), void *dev_id); | ||
| 24 | }; | ||
| 25 | |||
| 26 | #endif | ||
diff --git a/arch/arm/mach-msm/include/mach/msm_iomap.h b/arch/arm/mach-msm/include/mach/msm_iomap.h index 2f7b4c8620d9..9dae1a98c77a 100644 --- a/arch/arm/mach-msm/include/mach/msm_iomap.h +++ b/arch/arm/mach-msm/include/mach/msm_iomap.h | |||
| @@ -84,6 +84,18 @@ | |||
| 84 | #define MSM_UART3_PHYS 0xA9C00000 | 84 | #define MSM_UART3_PHYS 0xA9C00000 |
| 85 | #define MSM_UART3_SIZE SZ_4K | 85 | #define MSM_UART3_SIZE SZ_4K |
| 86 | 86 | ||
| 87 | #ifdef CONFIG_MSM_DEBUG_UART | ||
| 88 | #define MSM_DEBUG_UART_BASE 0xE1000000 | ||
| 89 | #if CONFIG_MSM_DEBUG_UART == 1 | ||
| 90 | #define MSM_DEBUG_UART_PHYS MSM_UART1_PHYS | ||
| 91 | #elif CONFIG_MSM_DEBUG_UART == 2 | ||
| 92 | #define MSM_DEBUG_UART_PHYS MSM_UART2_PHYS | ||
| 93 | #elif CONFIG_MSM_DEBUG_UART == 3 | ||
| 94 | #define MSM_DEBUG_UART_PHYS MSM_UART3_PHYS | ||
| 95 | #endif | ||
| 96 | #define MSM_DEBUG_UART_SIZE SZ_4K | ||
| 97 | #endif | ||
| 98 | |||
| 87 | #define MSM_SDC1_PHYS 0xA0400000 | 99 | #define MSM_SDC1_PHYS 0xA0400000 |
| 88 | #define MSM_SDC1_SIZE SZ_4K | 100 | #define MSM_SDC1_SIZE SZ_4K |
| 89 | 101 | ||
diff --git a/arch/arm/mach-msm/include/mach/uncompress.h b/arch/arm/mach-msm/include/mach/uncompress.h index 026e8955ace9..d94292c29d8e 100644 --- a/arch/arm/mach-msm/include/mach/uncompress.h +++ b/arch/arm/mach-msm/include/mach/uncompress.h | |||
| @@ -16,9 +16,16 @@ | |||
| 16 | #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H | 16 | #ifndef __ASM_ARCH_MSM_UNCOMPRESS_H |
| 17 | 17 | ||
| 18 | #include "hardware.h" | 18 | #include "hardware.h" |
| 19 | #include "linux/io.h" | ||
| 20 | #include "mach/msm_iomap.h" | ||
| 19 | 21 | ||
| 20 | static void putc(int c) | 22 | static void putc(int c) |
| 21 | { | 23 | { |
| 24 | #if defined(MSM_DEBUG_UART_PHYS) | ||
| 25 | unsigned base = MSM_DEBUG_UART_PHYS; | ||
| 26 | while (!(readl(base + 0x08) & 0x04)) ; | ||
| 27 | writel(c, base + 0x0c); | ||
| 28 | #endif | ||
| 22 | } | 29 | } |
| 23 | 30 | ||
| 24 | static inline void flush(void) | 31 | static inline void flush(void) |
diff --git a/arch/arm/mach-msm/io.c b/arch/arm/mach-msm/io.c index 6e7692ff6f2c..1c5e7dac086f 100644 --- a/arch/arm/mach-msm/io.c +++ b/arch/arm/mach-msm/io.c | |||
| @@ -42,6 +42,9 @@ static struct map_desc msm_io_desc[] __initdata = { | |||
| 42 | MSM_DEVICE(GPIO1), | 42 | MSM_DEVICE(GPIO1), |
| 43 | MSM_DEVICE(GPIO2), | 43 | MSM_DEVICE(GPIO2), |
| 44 | MSM_DEVICE(CLK_CTL), | 44 | MSM_DEVICE(CLK_CTL), |
| 45 | #ifdef CONFIG_MSM_DEBUG_UART | ||
| 46 | MSM_DEVICE(DEBUG_UART), | ||
| 47 | #endif | ||
| 45 | { | 48 | { |
| 46 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, | 49 | .virtual = (unsigned long) MSM_SHARED_RAM_BASE, |
| 47 | .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), | 50 | .pfn = __phys_to_pfn(MSM_SHARED_RAM_PHYS), |
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index dba4600bcdb4..b31946e0b4ca 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c | |||
| @@ -38,10 +38,9 @@ | |||
| 38 | #include <asm/div64.h> | 38 | #include <asm/div64.h> |
| 39 | #include <asm/sizes.h> | 39 | #include <asm/sizes.h> |
| 40 | 40 | ||
| 41 | #include <asm/mach/mmc.h> | 41 | #include <mach/mmc.h> |
| 42 | #include <mach/msm_iomap.h> | 42 | #include <mach/msm_iomap.h> |
| 43 | #include <mach/dma.h> | 43 | #include <mach/dma.h> |
| 44 | #include <mach/htc_pwrsink.h> | ||
| 45 | 44 | ||
| 46 | #include "msm_sdcc.h" | 45 | #include "msm_sdcc.h" |
| 47 | 46 | ||
| @@ -775,13 +774,11 @@ msmsdcc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
| 775 | 774 | ||
| 776 | switch (ios->power_mode) { | 775 | switch (ios->power_mode) { |
| 777 | case MMC_POWER_OFF: | 776 | case MMC_POWER_OFF: |
| 778 | htc_pwrsink_set(PWRSINK_SDCARD, 0); | ||
| 779 | break; | 777 | break; |
| 780 | case MMC_POWER_UP: | 778 | case MMC_POWER_UP: |
| 781 | pwr |= MCI_PWR_UP; | 779 | pwr |= MCI_PWR_UP; |
| 782 | break; | 780 | break; |
| 783 | case MMC_POWER_ON: | 781 | case MMC_POWER_ON: |
| 784 | htc_pwrsink_set(PWRSINK_SDCARD, 100); | ||
| 785 | pwr |= MCI_PWR_ON; | 782 | pwr |= MCI_PWR_ON; |
| 786 | break; | 783 | break; |
| 787 | } | 784 | } |
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index bb5fbed89e7f..99c0df1c7ebf 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
| @@ -2131,7 +2131,7 @@ config FB_PRE_INIT_FB | |||
| 2131 | the bootloader. | 2131 | the bootloader. |
| 2132 | 2132 | ||
| 2133 | config FB_MSM | 2133 | config FB_MSM |
| 2134 | tristate | 2134 | tristate "MSM Framebuffer support" |
| 2135 | depends on FB && ARCH_MSM | 2135 | depends on FB && ARCH_MSM |
| 2136 | select FB_CFB_FILLRECT | 2136 | select FB_CFB_FILLRECT |
| 2137 | select FB_CFB_COPYAREA | 2137 | select FB_CFB_COPYAREA |
