aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch')
-rw-r--r--target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch199
1 files changed, 170 insertions, 29 deletions
diff --git a/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch b/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch
index 962c399681..87e51b84d5 100644
--- a/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch
+++ b/target/linux/brcm2708/patches-3.10/0001-Main-bcm2708-linux-port.patch
@@ -1,7 +1,7 @@
-From 47ecfc09ad3289994f80bd3dcaec876ac536d884 Mon Sep 17 00:00:00 2001
+From 8775cd3a02a2eb38e20465b0ca5db05de1f75125 Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Sun, 12 May 2013 12:24:19 +0100
-Subject: [PATCH 001/174] Main bcm2708 linux port
+Subject: [PATCH 001/196] Main bcm2708 linux port
Signed-off-by: popcornmix <popcornmix@gmail.com>
---
@@ -95,6 +95,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
create mode 100644 arch/arm/mach-bcm2708/vcio.c
create mode 100644 drivers/mmc/host/sdhci-bcm2708.c
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 18a9f5e..eb291c7 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -361,6 +361,21 @@ config ARCH_AT91
@@ -127,6 +129,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
source "arch/arm/mach-zynq/Kconfig"
+diff --git a/arch/arm/Kconfig.debug b/arch/arm/Kconfig.debug
+index 1d41908..52377c9 100644
--- a/arch/arm/Kconfig.debug
+++ b/arch/arm/Kconfig.debug
@@ -519,6 +519,14 @@ choice
@@ -144,9 +148,11 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
endchoice
config DEBUG_EXYNOS_UART
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index 1ba358b..fb73cf0 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
-@@ -144,6 +144,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x0020
+@@ -139,6 +139,7 @@ textofs-$(CONFIG_ARCH_MSM8960) := 0x00208000
# by CONFIG_* macro name.
machine-$(CONFIG_ARCH_AT91) += at91
machine-$(CONFIG_ARCH_BCM) += bcm
@@ -154,6 +160,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
machine-$(CONFIG_ARCH_BCM2835) += bcm2835
machine-$(CONFIG_ARCH_CLPS711X) += clps711x
machine-$(CONFIG_ARCH_CNS3XXX) += cns3xxx
+diff --git a/arch/arm/configs/bcmrpi_cutdown_defconfig b/arch/arm/configs/bcmrpi_cutdown_defconfig
+new file mode 100644
+index 0000000..74f2dc9
--- /dev/null
+++ b/arch/arm/configs/bcmrpi_cutdown_defconfig
@@ -0,0 +1,474 @@
@@ -631,6 +640,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+# CONFIG_CRYPTO_HW is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_LIBCRC32C=y
+diff --git a/arch/arm/configs/bcmrpi_defconfig b/arch/arm/configs/bcmrpi_defconfig
+new file mode 100644
+index 0000000..339aabf
--- /dev/null
+++ b/arch/arm/configs/bcmrpi_defconfig
@@ -0,0 +1,510 @@
@@ -1144,6 +1156,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+# CONFIG_CRYPTO_HW is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_LIBCRC32C=y
+diff --git a/arch/arm/configs/bcmrpi_emergency_defconfig b/arch/arm/configs/bcmrpi_emergency_defconfig
+new file mode 100644
+index 0000000..3b40c49
--- /dev/null
+++ b/arch/arm/configs/bcmrpi_emergency_defconfig
@@ -0,0 +1,532 @@
@@ -1679,6 +1694,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+# CONFIG_CRYPTO_HW is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_LIBCRC32C=y
+diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
+index ac4c2e5..d3a6810 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -174,7 +174,7 @@ void arch_cpu_idle(void)
@@ -1690,6 +1707,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
int __init reboot_setup(char *str)
{
+diff --git a/arch/arm/mach-bcm2708/Kconfig b/arch/arm/mach-bcm2708/Kconfig
+new file mode 100644
+index 0000000..63bb76c
--- /dev/null
+++ b/arch/arm/mach-bcm2708/Kconfig
@@ -0,0 +1,34 @@
@@ -1727,6 +1747,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ Do not allow ARM to use GPU's L2 cache. Requires disable_l2cache in config.txt.
+
+endmenu
+diff --git a/arch/arm/mach-bcm2708/Makefile b/arch/arm/mach-bcm2708/Makefile
+new file mode 100644
+index 0000000..164ecb2
--- /dev/null
+++ b/arch/arm/mach-bcm2708/Makefile
@@ -0,0 +1,8 @@
@@ -1738,12 +1761,18 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+obj-$(CONFIG_BCM2708_GPIO) += bcm2708_gpio.o
+obj-$(CONFIG_BCM2708_VCMEM) += vc_mem.o
+
+diff --git a/arch/arm/mach-bcm2708/Makefile.boot b/arch/arm/mach-bcm2708/Makefile.boot
+new file mode 100644
+index 0000000..67039c3
--- /dev/null
+++ b/arch/arm/mach-bcm2708/Makefile.boot
@@ -0,0 +1,3 @@
+ zreladdr-y := 0x00008000
+params_phys-y := 0x00000100
+initrd_phys-y := 0x00800000
+diff --git a/arch/arm/mach-bcm2708/armctrl.c b/arch/arm/mach-bcm2708/armctrl.c
+new file mode 100644
+index 0000000..da18725
--- /dev/null
+++ b/arch/arm/mach-bcm2708/armctrl.c
@@ -0,0 +1,208 @@
@@ -1955,6 +1984,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ armctrl_pm_register(base, irq_start, resume_sources);
+ return 0;
+}
+diff --git a/arch/arm/mach-bcm2708/armctrl.h b/arch/arm/mach-bcm2708/armctrl.h
+new file mode 100644
+index 0000000..0aa916e
--- /dev/null
+++ b/arch/arm/mach-bcm2708/armctrl.h
@@ -0,0 +1,27 @@
@@ -1985,6 +2017,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ u32 armctrl_sources, u32 resume_sources);
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/bcm2708.c b/arch/arm/mach-bcm2708/bcm2708.c
+new file mode 100644
+index 0000000..64a2783
--- /dev/null
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -0,0 +1,695 @@
@@ -2683,6 +2718,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+module_param(serial, uint, 0644);
+module_param(uart_clock, uint, 0644);
+module_param(reboot_part, uint, 0644);
+diff --git a/arch/arm/mach-bcm2708/bcm2708.h b/arch/arm/mach-bcm2708/bcm2708.h
+new file mode 100644
+index 0000000..dfe8700
--- /dev/null
+++ b/arch/arm/mach-bcm2708/bcm2708.h
@@ -0,0 +1,51 @@
@@ -2737,6 +2775,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+}
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/bcm2708_gpio.c b/arch/arm/mach-bcm2708/bcm2708_gpio.c
+new file mode 100644
+index 0000000..d0339eb
--- /dev/null
+++ b/arch/arm/mach-bcm2708/bcm2708_gpio.c
@@ -0,0 +1,339 @@
@@ -3079,6 +3120,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+
+MODULE_DESCRIPTION("Broadcom BCM2708 GPIO driver");
+MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-bcm2708/clock.c b/arch/arm/mach-bcm2708/clock.c
+new file mode 100644
+index 0000000..4fc556e
--- /dev/null
+++ b/arch/arm/mach-bcm2708/clock.c
@@ -0,0 +1,61 @@
@@ -3143,6 +3187,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ return -EIO;
+}
+EXPORT_SYMBOL(clk_set_rate);
+diff --git a/arch/arm/mach-bcm2708/clock.h b/arch/arm/mach-bcm2708/clock.h
+new file mode 100644
+index 0000000..5f9d725
--- /dev/null
+++ b/arch/arm/mach-bcm2708/clock.h
@@ -0,0 +1,24 @@
@@ -3170,6 +3217,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+struct clk {
+ unsigned long rate;
+};
+diff --git a/arch/arm/mach-bcm2708/dma.c b/arch/arm/mach-bcm2708/dma.c
+new file mode 100644
+index 0000000..51d147a
--- /dev/null
+++ b/arch/arm/mach-bcm2708/dma.c
@@ -0,0 +1,399 @@
@@ -3572,6 +3622,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+MODULE_LICENSE("GPL");
+
+MODULE_PARM_DESC(dmachans, "Bitmap of DMA channels available to the ARM");
+diff --git a/arch/arm/mach-bcm2708/include/mach/arm_control.h b/arch/arm/mach-bcm2708/include/mach/arm_control.h
+new file mode 100644
+index 0000000..a82bb92
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/arm_control.h
@@ -0,0 +1,419 @@
@@ -3994,6 +4047,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#define AJBTDO HW_REGISTER_RW(AJB_BASE+0x0c)
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/arm_power.h b/arch/arm/mach-bcm2708/include/mach/arm_power.h
+new file mode 100644
+index 0000000..aae9136
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/arm_power.h
@@ -0,0 +1,60 @@
@@ -4057,6 +4113,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+};
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/clkdev.h b/arch/arm/mach-bcm2708/include/mach/clkdev.h
+new file mode 100644
+index 0000000..04b37a8
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/clkdev.h
@@ -0,0 +1,7 @@
@@ -4067,6 +4126,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#define __clk_put(clk) do { } while (0)
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/debug-macro.S b/arch/arm/mach-bcm2708/include/mach/debug-macro.S
+new file mode 100644
+index 0000000..2d0dc1c
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/debug-macro.S
@@ -0,0 +1,22 @@
@@ -4092,6 +4154,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ .endm
+
+#include <asm/hardware/debug-pl01x.S>
+diff --git a/arch/arm/mach-bcm2708/include/mach/dma.h b/arch/arm/mach-bcm2708/include/mach/dma.h
+new file mode 100644
+index 0000000..ac7a4a0
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/dma.h
@@ -0,0 +1,86 @@
@@ -4181,6 +4246,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+
+
+#endif /* _MACH_BCM2708_DMA_H */
+diff --git a/arch/arm/mach-bcm2708/include/mach/entry-macro.S b/arch/arm/mach-bcm2708/include/mach/entry-macro.S
+new file mode 100644
+index 0000000..79b62d9
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/entry-macro.S
@@ -0,0 +1,69 @@
@@ -4253,6 +4321,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+1020: @ EQ will be set if no irqs pending
+
+ .endm
+diff --git a/arch/arm/mach-bcm2708/include/mach/frc.h b/arch/arm/mach-bcm2708/include/mach/frc.h
+new file mode 100644
+index 0000000..dd51e07
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/frc.h
@@ -0,0 +1,38 @@
@@ -4294,6 +4365,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+extern unsigned long long frc_clock_ticks63(void);
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/gpio.h b/arch/arm/mach-bcm2708/include/mach/gpio.h
+new file mode 100644
+index 0000000..f600bc7
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/gpio.h
@@ -0,0 +1,18 @@
@@ -4315,6 +4389,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+
+#endif
+
+diff --git a/arch/arm/mach-bcm2708/include/mach/hardware.h b/arch/arm/mach-bcm2708/include/mach/hardware.h
+new file mode 100644
+index 0000000..c2954e8
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/hardware.h
@@ -0,0 +1,28 @@
@@ -4346,6 +4423,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#include <mach/platform.h>
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/io.h b/arch/arm/mach-bcm2708/include/mach/io.h
+new file mode 100644
+index 0000000..e6eb84d
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/io.h
@@ -0,0 +1,27 @@
@@ -4376,6 +4456,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#define __io(a) __typesafe_io(a)
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/irqs.h b/arch/arm/mach-bcm2708/include/mach/irqs.h
+new file mode 100644
+index 0000000..e8bb068
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/irqs.h
@@ -0,0 +1,196 @@
@@ -4575,6 +4658,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+
+
+#endif /* _BCM2708_IRQS_H_ */
+diff --git a/arch/arm/mach-bcm2708/include/mach/memory.h b/arch/arm/mach-bcm2708/include/mach/memory.h
+new file mode 100644
+index 0000000..521540d
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/memory.h
@@ -0,0 +1,57 @@
@@ -4635,6 +4721,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#define __bus_to_pfn(x) __phys_to_pfn((x) - (BUS_OFFSET - PLAT_PHYS_OFFSET))
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/platform.h b/arch/arm/mach-bcm2708/include/mach/platform.h
+new file mode 100644
+index 0000000..110ce07
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/platform.h
@@ -0,0 +1,220 @@
@@ -4858,6 +4947,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#endif
+
+/* END */
+diff --git a/arch/arm/mach-bcm2708/include/mach/power.h b/arch/arm/mach-bcm2708/include/mach/power.h
+new file mode 100644
+index 0000000..52b3b02
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/power.h
@@ -0,0 +1,26 @@
@@ -4887,6 +4979,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+extern int bcm_power_close(BCM_POWER_HANDLE_T handle);
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/system.h b/arch/arm/mach-bcm2708/include/mach/system.h
+new file mode 100644
+index 0000000..2d0b821
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/system.h
@@ -0,0 +1,38 @@
@@ -4928,6 +5023,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+}
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/timex.h b/arch/arm/mach-bcm2708/include/mach/timex.h
+new file mode 100644
+index 0000000..64a660c
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/timex.h
@@ -0,0 +1,23 @@
@@ -4954,6 +5052,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ */
+
+#define CLOCK_TICK_RATE (1000000)
+diff --git a/arch/arm/mach-bcm2708/include/mach/uncompress.h b/arch/arm/mach-bcm2708/include/mach/uncompress.h
+new file mode 100644
+index 0000000..6ff8f94
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/uncompress.h
@@ -0,0 +1,85 @@
@@ -5042,6 +5143,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ */
+#define arch_decomp_wdog()
+
+diff --git a/arch/arm/mach-bcm2708/include/mach/vc_mem.h b/arch/arm/mach-bcm2708/include/mach/vc_mem.h
+new file mode 100644
+index 0000000..d29125b
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/vc_mem.h
@@ -0,0 +1,36 @@
@@ -5081,6 +5185,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+
+#endif /* VC_MEM_H */
+
+diff --git a/arch/arm/mach-bcm2708/include/mach/vcio.h b/arch/arm/mach-bcm2708/include/mach/vcio.h
+new file mode 100644
+index 0000000..b522ba9
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/vcio.h
@@ -0,0 +1,141 @@
@@ -5225,6 +5332,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+#define DEVICE_FILE_NAME "char_dev"
+
+#endif
+diff --git a/arch/arm/mach-bcm2708/include/mach/vmalloc.h b/arch/arm/mach-bcm2708/include/mach/vmalloc.h
+new file mode 100644
+index 0000000..502c617
--- /dev/null
+++ b/arch/arm/mach-bcm2708/include/mach/vmalloc.h
@@ -0,0 +1,20 @@
@@ -5248,6 +5358,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#define VMALLOC_END (0xe8000000)
+diff --git a/arch/arm/mach-bcm2708/power.c b/arch/arm/mach-bcm2708/power.c
+new file mode 100644
+index 0000000..256bf1a
--- /dev/null
+++ b/arch/arm/mach-bcm2708/power.c
@@ -0,0 +1,194 @@
@@ -5445,6 +5558,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+MODULE_AUTHOR("Phil Elwell");
+MODULE_DESCRIPTION("Interface to BCM2708 power management");
+MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-bcm2708/vc_mem.c b/arch/arm/mach-bcm2708/vc_mem.c
+new file mode 100644
+index 0000000..aeae4d5
--- /dev/null
+++ b/arch/arm/mach-bcm2708/vc_mem.c
@@ -0,0 +1,462 @@
@@ -5910,6 +6026,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+module_param(mem_size, uint, 0644);
+module_param(mem_base, uint, 0644);
+
+diff --git a/arch/arm/mach-bcm2708/vcio.c b/arch/arm/mach-bcm2708/vcio.c
+new file mode 100644
+index 0000000..599eb63
--- /dev/null
+++ b/arch/arm/mach-bcm2708/vcio.c
@@ -0,0 +1,474 @@
@@ -6387,6 +6506,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+MODULE_DESCRIPTION("ARM I/O to VideoCore processor");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:bcm-mbox");
+diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
+index c21082d..6ae2668 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -358,7 +358,7 @@ config CPU_PJ4B
@@ -6398,6 +6519,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
select CPU_32v6
select CPU_ABRT_EV6
select CPU_CACHE_V6
+diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
+index d073528..223fc69 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -73,10 +73,19 @@ ENDPROC(cpu_v6_reset)
@@ -6423,6 +6546,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
mov pc, lr
ENTRY(cpu_v6_dcache_clean_area)
+diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
+index a10297d..c9ddd87 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -522,6 +522,7 @@ torbreck MACH_TORBRECK TORBRECK 3090
@@ -6433,6 +6558,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
ag5evm MACH_AG5EVM AG5EVM 3189
ics_if_voip MACH_ICS_IF_VOIP ICS_IF_VOIP 3206
wlf_cragg_6410 MACH_WLF_CRAGG_6410 WLF_CRAGG_6410 3207
+diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
+index 9ab8f8d..74e7543 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -249,6 +249,27 @@ config MMC_SDHCI_S3C_DMA
@@ -6463,9 +6590,11 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
config MMC_SDHCI_BCM2835
tristate "SDHCI platform support for the BCM2835 SD/MMC Controller"
depends on ARCH_BCM2835
+diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
+index cd32280..6a7b985 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
-@@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PXAV2) += sdhci-p
+@@ -15,6 +15,7 @@ obj-$(CONFIG_MMC_SDHCI_PXAV2) += sdhci-pxav2.o
obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o
obj-$(CONFIG_MMC_SDHCI_SIRF) += sdhci-sirf.o
obj-$(CONFIG_MMC_SDHCI_SPEAR) += sdhci-spear.o
@@ -6473,6 +6602,9 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
obj-$(CONFIG_MMC_WBSD) += wbsd.o
obj-$(CONFIG_MMC_AU1X) += au1xmmc.o
obj-$(CONFIG_MMC_OMAP) += omap.o
+diff --git a/drivers/mmc/host/sdhci-bcm2708.c b/drivers/mmc/host/sdhci-bcm2708.c
+new file mode 100644
+index 0000000..e79723d
--- /dev/null
+++ b/drivers/mmc/host/sdhci-bcm2708.c
@@ -0,0 +1,1425 @@
@@ -7901,6 +8033,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
+MODULE_LICENSE("GPL v2");
+MODULE_ALIAS("platform:"DRIVER_NAME);
+
+diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
+index 2ea429c..179e83e 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -28,6 +28,7 @@
@@ -7911,7 +8045,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
#include <linux/mmc/slot-gpio.h>
#include "sdhci.h"
-@@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct
+@@ -315,7 +316,7 @@ static void sdhci_read_block_pio(struct sdhci_host *host)
u32 uninitialized_var(scratch);
u8 *buf;
@@ -7920,7 +8054,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
blksize = host->data->blksz;
chunk = 0;
-@@ -360,7 +361,7 @@ static void sdhci_write_block_pio(struct
+@@ -360,7 +361,7 @@ static void sdhci_write_block_pio(struct sdhci_host *host)
u32 scratch;
u8 *buf;
@@ -7929,7 +8063,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
blksize = host->data->blksz;
chunk = 0;
-@@ -399,19 +400,28 @@ static void sdhci_write_block_pio(struct
+@@ -399,19 +400,28 @@ static void sdhci_write_block_pio(struct sdhci_host *host)
local_irq_restore(flags);
}
@@ -7961,7 +8095,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
/*
* Some controllers (JMicron JMB38x) mess up the buffer bits
-@@ -422,7 +432,7 @@ static void sdhci_transfer_pio(struct sd
+@@ -422,7 +432,7 @@ static void sdhci_transfer_pio(struct sdhci_host *host)
(host->data->blocks == 1))
mask = ~0;
@@ -7970,7 +8104,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
if (host->quirks & SDHCI_QUIRK_PIO_NEEDS_DELAY)
udelay(100);
-@@ -434,9 +444,11 @@ static void sdhci_transfer_pio(struct sd
+@@ -434,9 +444,11 @@ static void sdhci_transfer_pio(struct sdhci_host *host)
host->blocks--;
if (host->blocks == 0)
break;
@@ -7983,7 +8117,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
}
static char *sdhci_kmap_atomic(struct scatterlist *sg, unsigned long *flags)
-@@ -709,7 +721,9 @@ static void sdhci_set_transfer_irqs(stru
+@@ -709,7 +721,9 @@ static void sdhci_set_transfer_irqs(struct sdhci_host *host)
u32 pio_irqs = SDHCI_INT_DATA_AVAIL | SDHCI_INT_SPACE_AVAIL;
u32 dma_irqs = SDHCI_INT_DMA_END | SDHCI_INT_ADMA_ERROR;
@@ -7994,7 +8128,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
sdhci_clear_set_irqs(host, pio_irqs, dma_irqs);
else
sdhci_clear_set_irqs(host, dma_irqs, pio_irqs);
-@@ -741,44 +755,25 @@ static void sdhci_prepare_data(struct sd
+@@ -741,44 +755,25 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
host->data_early = 0;
host->data->bytes_xfered = 0;
@@ -8047,7 +8181,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
int broken, i;
struct scatterlist *sg;
-@@ -837,7 +832,8 @@ static void sdhci_prepare_data(struct sd
+@@ -837,7 +832,8 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
*/
WARN_ON(1);
host->flags &= ~SDHCI_REQ_USE_DMA;
@@ -8057,7 +8191,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
WARN_ON(sg_cnt != 1);
sdhci_writel(host, sg_dma_address(data->sg),
SDHCI_DMA_ADDRESS);
-@@ -853,11 +849,13 @@ static void sdhci_prepare_data(struct sd
+@@ -853,11 +849,13 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_command *cmd)
if (host->version >= SDHCI_SPEC_200) {
ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
ctrl &= ~SDHCI_CTRL_DMA_MASK;
@@ -8071,7 +8205,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
}
-@@ -909,7 +907,8 @@ static void sdhci_set_transfer_mode(stru
+@@ -909,7 +907,8 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
if (data->flags & MMC_DATA_READ)
mode |= SDHCI_TRNS_READ;
@@ -8081,7 +8215,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
mode |= SDHCI_TRNS_DMA;
sdhci_writew(host, mode, SDHCI_TRANSFER_MODE);
-@@ -925,13 +924,16 @@ static void sdhci_finish_data(struct sdh
+@@ -925,13 +924,16 @@ static void sdhci_finish_data(struct sdhci_host *host)
host->data = NULL;
if (host->flags & SDHCI_REQ_USE_DMA) {
@@ -8102,7 +8236,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
}
/*
-@@ -984,6 +986,12 @@ static void sdhci_send_command(struct sd
+@@ -984,6 +986,12 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY))
mask |= SDHCI_DATA_INHIBIT;
@@ -8115,7 +8249,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
/* We shouldn't wait for data inihibit for stop commands, even
though they might use busy signaling */
if (host->mrq->data && (cmd == host->mrq->data->stop))
-@@ -1001,10 +1009,16 @@ static void sdhci_send_command(struct sd
+@@ -1001,10 +1009,16 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
timeout--;
mdelay(1);
}
@@ -8132,7 +8266,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
sdhci_prepare_data(host, cmd);
-@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhc
+@@ -1470,7 +1484,7 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
else
ctrl &= ~SDHCI_CTRL_HISPD;
@@ -8141,7 +8275,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
u16 clk, ctrl_2;
/* In case of UHS-I modes, set High Speed Enable */
-@@ -2164,7 +2178,7 @@ static void sdhci_timeout_timer(unsigned
+@@ -2164,7 +2178,7 @@ static void sdhci_timeout_timer(unsigned long data)
if (host->mrq) {
pr_err("%s: Timeout waiting for hardware "
@@ -8150,7 +8284,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
sdhci_dumpregs(host);
if (host->data) {
-@@ -2209,10 +2223,13 @@ static void sdhci_cmd_irq(struct sdhci_h
+@@ -2209,10 +2223,13 @@ static void sdhci_cmd_irq(struct sdhci_host *host, u32 intmask)
BUG_ON(intmask == 0);
if (!host->cmd) {
@@ -8164,7 +8298,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
return;
}
-@@ -2282,6 +2299,19 @@ static void sdhci_show_adma_error(struct
+@@ -2282,6 +2299,19 @@ static void sdhci_show_adma_error(struct sdhci_host *host)
static void sdhci_show_adma_error(struct sdhci_host *host) { }
#endif
@@ -8184,7 +8318,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
{
u32 command;
-@@ -2311,23 +2341,39 @@ static void sdhci_data_irq(struct sdhci_
+@@ -2311,23 +2341,39 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
}
}
@@ -8228,7 +8362,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
pr_err("%s: ADMA error\n", mmc_hostname(host->mmc));
sdhci_show_adma_error(host);
host->data->error = -EIO;
-@@ -2335,11 +2381,18 @@ static void sdhci_data_irq(struct sdhci_
+@@ -2335,11 +2381,18 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
host->ops->adma_workaround(host, intmask);
}
@@ -8251,7 +8385,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
/*
* We currently don't do anything fancy with DMA
-@@ -2368,18 +2421,8 @@ static void sdhci_data_irq(struct sdhci_
+@@ -2368,18 +2421,8 @@ static void sdhci_data_irq(struct sdhci_host *host, u32 intmask)
sdhci_writel(host, dmanow, SDHCI_DMA_ADDRESS);
}
@@ -8310,7 +8444,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
if (intmask & SDHCI_INT_BUS_POWER) {
pr_err("%s: Card is consuming too much power!\n",
-@@ -2569,7 +2634,8 @@ int sdhci_resume_host(struct sdhci_host
+@@ -2569,7 +2634,8 @@ int sdhci_resume_host(struct sdhci_host *host)
{
int ret;
@@ -8320,7 +8454,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
if (host->ops->enable_dma)
host->ops->enable_dma(host);
}
-@@ -2785,14 +2851,16 @@ int sdhci_add_host(struct sdhci_host *ho
+@@ -2785,14 +2851,16 @@ int sdhci_add_host(struct sdhci_host *host)
host->flags &= ~SDHCI_USE_ADMA;
}
@@ -8339,7 +8473,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
}
}
}
-@@ -3080,6 +3148,12 @@ int sdhci_add_host(struct sdhci_host *ho
+@@ -3080,6 +3148,12 @@ int sdhci_add_host(struct sdhci_host *host)
SDHCI_MAX_CURRENT_MULTIPLIER;
}
@@ -8352,7 +8486,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
mmc->ocr_avail = ocr_avail;
mmc->ocr_avail_sdio = ocr_avail;
if (host->ocr_avail_sdio)
-@@ -3210,6 +3284,7 @@ int sdhci_add_host(struct sdhci_host *ho
+@@ -3210,6 +3284,7 @@ int sdhci_add_host(struct sdhci_host *host)
pr_info("%s: SDHCI controller on %s [%s] using %s\n",
mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)),
@@ -8360,6 +8494,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
(host->flags & SDHCI_USE_ADMA) ? "ADMA" :
(host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO");
+diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
+index 379e09d..f90574e 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -289,6 +289,20 @@ struct sdhci_ops {
@@ -8383,7 +8519,7 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
void (*hw_reset)(struct sdhci_host *host);
void (*platform_suspend)(struct sdhci_host *host);
void (*platform_resume)(struct sdhci_host *host);
-@@ -399,6 +413,29 @@ extern int sdhci_resume_host(struct sdhc
+@@ -399,6 +413,29 @@ extern int sdhci_resume_host(struct sdhci_host *host);
extern void sdhci_enable_irq_wakeups(struct sdhci_host *host);
#endif
@@ -8413,6 +8549,8 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
#ifdef CONFIG_PM_RUNTIME
extern int sdhci_runtime_suspend_host(struct sdhci_host *host);
extern int sdhci_runtime_resume_host(struct sdhci_host *host);
+diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
+index b838ffc..f3a39c1 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -128,6 +128,7 @@ struct sdhci_host {
@@ -8431,3 +8569,6 @@ Signed-off-by: popcornmix <popcornmix@gmail.com>
struct mmc_data *data; /* Current data request */
unsigned int data_early:1; /* Data finished before cmd */
+--
+1.9.1
+