From 7e6ffd00338f6a650a2adae9c1a40c666887e8b5 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sun, 6 Nov 2011 16:58:33 -0800 Subject: [PATCH] --- yaml --- r: 274134 b: refs/heads/master c: ec773e99ab4abce07b1ae23117179c2861831964 h: refs/heads/master v: v3 --- [refs] | 2 +- .../Documentation/power/freezing-of-tasks.txt | 8 +- trunk/Documentation/power/runtime_pm.txt | 10 + .../convert_drivers_to_kernel_api.txt | 195 ++ trunk/MAINTAINERS | 2 +- trunk/arch/arm/Kconfig | 15 +- trunk/arch/arm/Makefile | 2 +- trunk/arch/arm/configs/exynos4_defconfig | 9 +- .../arm/{mach-exynos4 => mach-exynos}/Kconfig | 88 +- .../{mach-exynos4 => mach-exynos}/Makefile | 13 +- .../Makefile.boot | 0 .../clock-exynos4210.c | 0 .../clock-exynos4212.c | 0 .../arm/{mach-exynos4 => mach-exynos}/clock.c | 207 +- .../arm/{mach-exynos4 => mach-exynos}/cpu.c | 71 +- .../{mach-exynos4 => mach-exynos}/cpuidle.c | 0 .../{mach-exynos4 => mach-exynos}/dev-ahci.c | 0 .../{mach-exynos4 => mach-exynos}/dev-audio.c | 0 .../{mach-exynos4 => mach-exynos}/dev-dwmci.c | 0 .../{mach-exynos4 => mach-exynos}/dev-pd.c | 0 .../dev-sysmmu.c | 0 .../arm/{mach-exynos4 => mach-exynos}/dma.c | 1 + .../{mach-exynos4 => mach-exynos}/headsmp.S | 0 .../{mach-exynos4 => mach-exynos}/hotplug.c | 0 .../include/mach/debug-macro.S | 0 .../include/mach/dma.h | 0 .../include/mach/dwmci.h | 0 .../include/mach/entry-macro.S | 0 .../include/mach/exynos4-clock.h | 0 .../include/mach/gpio.h | 0 .../include/mach/hardware.h | 0 .../include/mach/io.h | 0 .../include/mach/irqs.h | 4 + .../include/mach/map.h | 34 +- .../include/mach/memory.h | 0 .../include/mach/pm-core.h | 8 +- .../include/mach/pmu.h | 7 + .../include/mach/regs-audss.h | 0 .../include/mach/regs-clock.h | 0 .../include/mach/regs-gpio.h | 0 .../include/mach/regs-irq.h | 0 .../include/mach/regs-mct.h | 0 .../include/mach/regs-mem.h | 0 .../include/mach/regs-pmu.h | 74 +- .../include/mach/regs-sysmmu.h | 0 .../include/mach/regs-usb-phy.h | 0 .../include/mach/sysmmu.h | 0 .../include/mach/system.h | 0 .../include/mach/timex.h | 0 .../include/mach/uncompress.h | 0 .../include/mach/vmalloc.h | 0 .../arm/{mach-exynos4 => mach-exynos}/init.c | 0 .../irq-combiner.c | 0 .../{mach-exynos4 => mach-exynos}/irq-eint.c | 0 .../mach-armlex4210.c | 0 .../{mach-exynos4 => mach-exynos}/mach-nuri.c | 192 +- trunk/arch/arm/mach-exynos/mach-origen.c | 700 +++++ .../mach-smdk4x12.c | 0 .../mach-smdkv310.c | 49 + .../mach-universal_c210.c | 307 +- .../arm/{mach-exynos4 => mach-exynos}/mct.c | 40 +- .../{mach-exynos4 => mach-exynos}/platsmp.c | 0 .../arm/{mach-exynos4 => mach-exynos}/pm.c | 7 + trunk/arch/arm/mach-exynos/pmu.c | 230 ++ .../setup-fimc.c | 0 .../setup-fimd0.c | 0 .../setup-i2c0.c | 0 .../setup-i2c1.c | 0 .../setup-i2c2.c | 0 .../setup-i2c3.c | 0 .../setup-i2c4.c | 0 .../setup-i2c5.c | 0 .../setup-i2c6.c | 0 .../setup-i2c7.c | 0 .../setup-keypad.c | 0 .../setup-sdhci-gpio.c | 0 trunk/arch/arm/mach-exynos/setup-sdhci.c | 22 + .../setup-usb-phy.c | 0 .../arm/mach-exynos4/include/mach/clkdev.h | 7 - trunk/arch/arm/mach-exynos4/mach-origen.c | 108 - trunk/arch/arm/mach-exynos4/pmu.c | 175 -- trunk/arch/arm/mach-exynos4/setup-sdhci.c | 69 - trunk/arch/arm/mach-mmp/Makefile | 2 +- trunk/arch/arm/mach-mmp/brownstone.c | 11 + trunk/arch/arm/mach-mmp/include/mach/mmp2.h | 13 + trunk/arch/arm/mach-mmp/include/mach/sram.h | 35 + trunk/arch/arm/mach-mmp/mmp2.c | 3 + trunk/arch/arm/mach-mmp/sram.c | 168 + trunk/arch/arm/mach-s3c2410/Kconfig | 1 - trunk/arch/arm/mach-s3c2410/include/mach/fb.h | 75 +- .../arm/mach-s3c2410/include/mach/gpio-fns.h | 99 +- .../arm/mach-s3c2410/include/mach/gpio-nrs.h | 2 +- .../mach-s3c2410/include/mach/gpio-track.h | 6 +- .../arch/arm/mach-s3c2410/include/mach/irqs.h | 4 +- .../arch/arm/mach-s3c2410/include/mach/map.h | 1 + .../arm/mach-s3c2410/include/mach/pm-core.h | 2 +- .../include/mach/regs-s3c2443-clock.h | 2 + trunk/arch/arm/mach-s3c2410/mach-h1940.c | 6 +- trunk/arch/arm/mach-s3c2410/mach-qt2410.c | 1 + trunk/arch/arm/mach-s3c2410/s3c2410.c | 4 +- trunk/arch/arm/mach-s3c2412/gpio.c | 62 + trunk/arch/arm/mach-s3c2416/Kconfig | 1 - trunk/arch/arm/mach-s3c2416/clock.c | 50 +- trunk/arch/arm/mach-s3c2416/s3c2416.c | 7 +- trunk/arch/arm/mach-s3c2416/setup-sdhci.c | 37 - trunk/arch/arm/mach-s3c2440/Kconfig | 2 - trunk/arch/arm/mach-s3c2440/mach-rx1950.c | 1 + trunk/arch/arm/mach-s3c2440/s3c2440.c | 4 +- trunk/arch/arm/mach-s3c2440/s3c2442.c | 4 +- trunk/arch/arm/mach-s3c2443/Kconfig | 1 - trunk/arch/arm/mach-s3c2443/clock.c | 160 +- trunk/arch/arm/mach-s3c2443/s3c2443.c | 7 +- trunk/arch/arm/mach-s3c64xx/Kconfig | 1 + trunk/arch/arm/mach-s3c64xx/Makefile | 5 +- trunk/arch/arm/mach-s3c64xx/clock.c | 13 +- trunk/arch/arm/mach-s3c64xx/cpu.c | 4 +- trunk/arch/arm/mach-s3c64xx/dev-onenand1.c | 53 - trunk/arch/arm/mach-s3c64xx/dma.c | 2 +- trunk/arch/arm/mach-s3c64xx/gpiolib.c | 290 -- .../arm/mach-s3c64xx/include/mach/clkdev.h | 7 - .../arm/mach-s3c64xx/include/mach/crag6410.h | 23 + .../arch/arm/mach-s3c64xx/include/mach/pll.h | 45 - .../arm/mach-s3c64xx/include/mach/pm-core.h | 2 +- .../arm/mach-s3c64xx/include/mach/pwm-clock.h | 56 - .../arm/mach-s3c64xx/include/mach/regs-sys.h | 3 + trunk/arch/arm/mach-s3c64xx/mach-anw6410.c | 2 +- .../arm/mach-s3c64xx/mach-crag6410-module.c | 182 ++ trunk/arch/arm/mach-s3c64xx/mach-crag6410.c | 108 +- trunk/arch/arm/mach-s3c64xx/mach-hmt.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-mini6410.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-ncp.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-real6410.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-smdk6400.c | 2 +- trunk/arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +- trunk/arch/arm/mach-s3c64xx/pm.c | 4 + trunk/arch/arm/mach-s3c64xx/s3c6400.c | 2 +- trunk/arch/arm/mach-s3c64xx/s3c6410.c | 4 +- trunk/arch/arm/mach-s3c64xx/setup-sdhci.c | 48 - trunk/arch/arm/mach-s5p64x0/Kconfig | 14 + trunk/arch/arm/mach-s5p64x0/Makefile | 4 +- trunk/arch/arm/mach-s5p64x0/clock-s5p6440.c | 1 + trunk/arch/arm/mach-s5p64x0/clock-s5p6450.c | 1 + trunk/arch/arm/mach-s5p64x0/cpu.c | 3 + .../arm/mach-s5p64x0/include/mach/clkdev.h | 7 - .../arch/arm/mach-s5p64x0/include/mach/irqs.h | 4 + .../arch/arm/mach-s5p64x0/include/mach/map.h | 4 + .../arm/mach-s5p64x0/include/mach/pm-core.h | 117 + .../arm/mach-s5p64x0/include/mach/pwm-clock.h | 68 - .../mach-s5p64x0/include/mach/regs-clock.h | 33 + .../arm/mach-s5p64x0/include/mach/regs-gpio.h | 21 + trunk/arch/arm/mach-s5p64x0/irq-eint.c | 2 + trunk/arch/arm/mach-s5p64x0/irq-pm.c | 92 + trunk/arch/arm/mach-s5p64x0/mach-smdk6440.c | 74 + trunk/arch/arm/mach-s5p64x0/mach-smdk6450.c | 75 + trunk/arch/arm/mach-s5p64x0/pm.c | 204 ++ trunk/arch/arm/mach-s5p64x0/setup-fb-24bpp.c | 29 + trunk/arch/arm/mach-s5pc100/clock.c | 4 +- trunk/arch/arm/mach-s5pc100/dma.c | 1 + .../arm/mach-s5pc100/include/mach/clkdev.h | 7 - .../arm/mach-s5pc100/include/mach/pwm-clock.h | 56 - trunk/arch/arm/mach-s5pc100/setup-sdhci.c | 42 - trunk/arch/arm/mach-s5pv210/Kconfig | 4 + trunk/arch/arm/mach-s5pv210/Makefile | 2 +- trunk/arch/arm/mach-s5pv210/clock.c | 141 +- trunk/arch/arm/mach-s5pv210/cpu.c | 4 + trunk/arch/arm/mach-s5pv210/dma.c | 1 + .../arm/mach-s5pv210/include/mach/clkdev.h | 7 - .../arch/arm/mach-s5pv210/include/mach/irqs.h | 4 +- .../arch/arm/mach-s5pv210/include/mach/map.h | 13 + .../arm/mach-s5pv210/include/mach/pm-core.h | 2 +- .../arm/mach-s5pv210/include/mach/pwm-clock.h | 70 - .../mach-s5pv210/include/mach/regs-clock.h | 3 +- trunk/arch/arm/mach-s5pv210/mach-goni.c | 57 + trunk/arch/arm/mach-s5pv210/setup-sdhci.c | 41 - trunk/arch/arm/mach-s5pv210/sleep.S | 52 - trunk/arch/arm/plat-s3c24xx/Kconfig | 1 - trunk/arch/arm/plat-s3c24xx/Makefile | 4 +- trunk/arch/arm/plat-s3c24xx/dev-uart.c | 100 + trunk/arch/arm/plat-s3c24xx/devs.c | 528 ---- trunk/arch/arm/plat-s3c24xx/gpio.c | 96 - trunk/arch/arm/plat-s3c24xx/gpiolib.c | 229 -- .../arm/plat-s3c24xx/include/mach/clkdev.h | 7 - .../arm/plat-s3c24xx/include/mach/pwm-clock.h | 55 - .../arch/arm/plat-s3c24xx/include/plat/pll.h | 62 - .../arm/plat-s3c24xx/include/plat/regs-iis.h | 68 - .../arm/plat-s3c24xx/include/plat/regs-spi.h | 81 - trunk/arch/arm/plat-s3c24xx/s3c2443-clock.c | 192 +- trunk/arch/arm/plat-s5p/Kconfig | 27 +- trunk/arch/arm/plat-s5p/Makefile | 14 +- trunk/arch/arm/plat-s5p/cpu.c | 6 +- trunk/arch/arm/plat-s5p/dev-csis0.c | 34 - trunk/arch/arm/plat-s5p/dev-csis1.c | 34 - trunk/arch/arm/plat-s5p/dev-ehci.c | 57 - trunk/arch/arm/plat-s5p/dev-fimc0.c | 43 - trunk/arch/arm/plat-s5p/dev-fimc1.c | 43 - trunk/arch/arm/plat-s5p/dev-fimc2.c | 43 - trunk/arch/arm/plat-s5p/dev-fimc3.c | 43 - trunk/arch/arm/plat-s5p/dev-fimd0.c | 67 - trunk/arch/arm/plat-s5p/dev-mfc.c | 50 - trunk/arch/arm/plat-s5p/dev-onenand.c | 45 - trunk/arch/arm/plat-s5p/dev-pmu.c | 36 - trunk/arch/arm/plat-s5p/irq-gpioint.c | 10 +- .../arm/{mach-exynos4 => plat-s5p}/sleep.S | 13 +- trunk/arch/arm/plat-samsung/Kconfig | 27 - trunk/arch/arm/plat-samsung/Makefile | 33 +- trunk/arch/arm/plat-samsung/adc.c | 43 +- trunk/arch/arm/plat-samsung/dev-adc.c | 46 - trunk/arch/arm/plat-samsung/dev-asocdma.c | 35 - trunk/arch/arm/plat-samsung/dev-backlight.c | 1 + trunk/arch/arm/plat-samsung/dev-fb.c | 63 - trunk/arch/arm/plat-samsung/dev-hsmmc.c | 62 - trunk/arch/arm/plat-samsung/dev-hsmmc1.c | 62 - trunk/arch/arm/plat-samsung/dev-hsmmc2.c | 63 - trunk/arch/arm/plat-samsung/dev-hsmmc3.c | 66 - trunk/arch/arm/plat-samsung/dev-hwmon.c | 32 - trunk/arch/arm/plat-samsung/dev-i2c0.c | 70 - trunk/arch/arm/plat-samsung/dev-i2c1.c | 61 - trunk/arch/arm/plat-samsung/dev-i2c2.c | 62 - trunk/arch/arm/plat-samsung/dev-i2c3.c | 60 - trunk/arch/arm/plat-samsung/dev-i2c4.c | 60 - trunk/arch/arm/plat-samsung/dev-i2c5.c | 60 - trunk/arch/arm/plat-samsung/dev-i2c6.c | 60 - trunk/arch/arm/plat-samsung/dev-i2c7.c | 60 - trunk/arch/arm/plat-samsung/dev-ide.c | 44 - trunk/arch/arm/plat-samsung/dev-keypad.c | 50 - trunk/arch/arm/plat-samsung/dev-nand.c | 125 - trunk/arch/arm/plat-samsung/dev-onenand.c | 43 - trunk/arch/arm/plat-samsung/dev-pwm.c | 53 - trunk/arch/arm/plat-samsung/dev-rtc.c | 43 - trunk/arch/arm/plat-samsung/dev-ts.c | 59 - trunk/arch/arm/plat-samsung/dev-usb-hsotg.c | 48 - trunk/arch/arm/plat-samsung/dev-usb.c | 65 - trunk/arch/arm/plat-samsung/dev-wdt.c | 40 - trunk/arch/arm/plat-samsung/devs.c | 1463 +++++++++ trunk/arch/arm/plat-samsung/gpio-config.c | 431 --- trunk/arch/arm/plat-samsung/gpio.c | 167 - .../arm/plat-samsung/include/plat/adc-core.h | 2 +- .../include/plat/audio-simtec.h | 2 +- .../include/plat/camport.h | 6 +- .../include/plat/common-smdk.h | 2 +- .../include/plat/cpu-freq-core.h | 5 +- .../arch/arm/plat-samsung/include/plat/cpu.h | 6 +- .../arch/arm/plat-samsung/include/plat/devs.h | 151 +- .../include/plat/ehci.h | 6 +- .../include/plat/exynos4.h | 8 +- .../plat-samsung/include/plat/fb-s3c2410.h | 72 + trunk/arch/arm/plat-samsung/include/plat/fb.h | 7 + .../include/plat/fiq.h | 2 +- .../include/plat/gpio-cfg-helpers.h | 172 +- .../arm/plat-samsung/include/plat/gpio-cfg.h | 34 +- .../arm/plat-samsung/include/plat/gpio-core.h | 97 +- .../arm/plat-samsung/include/plat/gpio-fns.h | 98 + .../arch/arm/plat-samsung/include/plat/iic.h | 1 + .../include/plat/irq.h | 25 +- .../include/plat/irqs.h | 8 +- .../include/plat/mci.h | 10 +- .../include/plat/mfc.h | 6 +- .../include/plat/mipi_csis.h | 6 +- .../include/plat/pll.h | 134 +- .../arm/plat-samsung/include/plat/pll6553x.h | 51 - trunk/arch/arm/plat-samsung/include/plat/pm.h | 10 +- .../include/plat}/pwm-clock.h | 39 +- .../arm/plat-samsung/include/plat/regs-adc.h | 3 + .../include/plat/regs-dma.h | 112 +- .../arm/plat-samsung/include/plat/regs-iis.h | 70 + .../arm/plat-samsung/include/plat/regs-spi.h | 48 + .../include/plat/regs-srom.h | 8 +- .../include/plat/regs-udc.h | 132 +- .../include/plat/reset.h | 8 +- .../include/plat/s3c2410.h | 2 +- .../include/plat/s3c2412.h | 2 +- .../include/plat/s3c2416.h | 2 +- .../include/plat/s3c2443.h | 9 +- .../include/plat/s3c244x.h | 2 +- .../include/plat}/s3c6400.h | 2 +- .../include/plat}/s3c6410.h | 2 +- .../include/plat/s5p-clock.h | 2 +- .../include/plat/s5p-time.h | 2 +- .../include/plat/s5p6440.h | 2 +- .../include/plat/s5p6450.h | 2 +- .../include/plat/s5pc100.h | 2 +- .../include/plat/s5pv210.h | 2 +- .../arm/plat-samsung/include/plat/sdhci.h | 57 - .../include/plat/sysmmu.h | 6 +- .../include/plat/system-reset.h | 2 +- .../arm/plat-samsung/include/plat/tv-core.h | 44 + .../include/plat/udc.h | 4 +- .../include/plat/usb-phy.h | 6 +- trunk/arch/arm/plat-samsung/platformdata.c | 2 - trunk/arch/arm/plat-samsung/pm-gpio.c | 72 +- trunk/arch/arm/plat-samsung/pm.c | 6 +- trunk/arch/arm/plat-samsung/pwm-clock.c | 13 +- trunk/arch/arm/plat-samsung/pwm.c | 7 + trunk/drivers/acpi/sleep.c | 8 + trunk/drivers/base/power/runtime.c | 23 +- trunk/drivers/firmware/edd.c | 6 +- trunk/drivers/gpio/Kconfig | 16 - trunk/drivers/gpio/Makefile | 6 +- trunk/drivers/gpio/gpio-exynos4.c | 385 --- trunk/drivers/gpio/gpio-plat-samsung.c | 205 -- trunk/drivers/gpio/gpio-s5pc100.c | 354 --- trunk/drivers/gpio/gpio-s5pv210.c | 287 -- trunk/drivers/gpio/gpio-samsung.c | 2712 +++++++++++++++++ trunk/drivers/hwmon/coretemp.c | 3 +- trunk/drivers/hwmon/w83627ehf.c | 9 +- trunk/drivers/scsi/bnx2fc/bnx2fc.h | 5 +- trunk/drivers/scsi/bnx2fc/bnx2fc_els.c | 23 +- trunk/drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +- trunk/drivers/scsi/bnx2fc/bnx2fc_io.c | 37 + trunk/drivers/scsi/device_handler/scsi_dh.c | 10 +- .../scsi/device_handler/scsi_dh_alua.c | 3 +- trunk/drivers/scsi/fcoe/fcoe.c | 13 +- trunk/drivers/scsi/hosts.c | 9 +- trunk/drivers/scsi/hpsa.c | 221 +- trunk/drivers/scsi/hpsa.h | 10 +- trunk/drivers/scsi/hpsa_cmd.h | 5 +- trunk/drivers/scsi/ipr.c | 2 + trunk/drivers/scsi/ipr.h | 1 + trunk/drivers/scsi/isci/host.c | 23 +- trunk/drivers/scsi/isci/init.c | 2 +- trunk/drivers/scsi/isci/port.c | 146 +- trunk/drivers/scsi/isci/port.h | 6 +- trunk/drivers/scsi/isci/probe_roms.h | 4 +- trunk/drivers/scsi/isci/remote_device.c | 85 - trunk/drivers/scsi/isci/remote_device.h | 5 +- trunk/drivers/scsi/isci/request.c | 52 +- trunk/drivers/scsi/isci/request.h | 6 - trunk/drivers/scsi/isci/task.c | 698 ++--- trunk/drivers/scsi/isci/task.h | 35 +- trunk/drivers/scsi/libfc/fc_exch.c | 7 +- trunk/drivers/scsi/libfc/fc_lport.c | 100 +- trunk/drivers/scsi/mpt2sas/mpi/mpi2.h | 11 +- trunk/drivers/scsi/mpt2sas/mpi/mpi2_cnfg.h | 153 +- trunk/drivers/scsi/mpt2sas/mpi/mpi2_ioc.h | 113 +- trunk/drivers/scsi/mpt2sas/mpt2sas_base.c | 247 +- trunk/drivers/scsi/mpt2sas/mpt2sas_base.h | 32 +- trunk/drivers/scsi/mpt2sas/mpt2sas_config.c | 67 +- trunk/drivers/scsi/mpt2sas/mpt2sas_ctl.c | 9 +- trunk/drivers/scsi/mpt2sas/mpt2sas_scsih.c | 634 +++- trunk/drivers/scsi/mvsas/mv_init.c | 10 + trunk/drivers/scsi/pmcraid.c | 2 +- trunk/drivers/scsi/qla2xxx/qla_isr.c | 2 +- trunk/drivers/scsi/scsi_lib.c | 9 + trunk/drivers/scsi/scsi_scan.c | 1 + trunk/drivers/scsi/scsi_transport_iscsi.c | 2 +- trunk/drivers/scsi/sd.c | 12 +- trunk/drivers/scsi/sd.h | 6 - trunk/drivers/scsi/st.c | 4 +- trunk/drivers/usb/core/driver.c | 5 + trunk/drivers/watchdog/Kconfig | 2 + trunk/drivers/watchdog/coh901327_wdt.c | 2 +- trunk/drivers/watchdog/eurotechwdt.c | 2 +- trunk/drivers/watchdog/iTCO_wdt.c | 19 +- trunk/drivers/watchdog/mpcore_wdt.c | 3 +- trunk/drivers/watchdog/octeon-wdt-main.c | 2 +- trunk/drivers/watchdog/s3c2410_wdt.c | 176 +- trunk/drivers/watchdog/sb_wdog.c | 4 +- trunk/drivers/watchdog/sc520_wdt.c | 2 +- trunk/drivers/watchdog/w83627hf_wdt.c | 33 +- trunk/drivers/watchdog/wdt.c | 2 +- trunk/drivers/watchdog/wdt_pci.c | 2 +- trunk/drivers/watchdog/wm831x_wdt.c | 318 +- trunk/include/linux/cpu.h | 4 - trunk/include/linux/freezer.h | 11 +- trunk/include/linux/opp.h | 4 +- trunk/include/linux/pci_ids.h | 2 + trunk/kernel/cpu.c | 74 + trunk/kernel/freezer.c | 2 +- trunk/kernel/power/qos.c | 3 +- trunk/sound/core/control.c | 4 +- trunk/sound/pci/hda/hda_intel.c | 4 +- trunk/sound/pci/hda/hda_local.h | 7 +- trunk/sound/pci/hda/patch_realtek.c | 6 + trunk/sound/soc/samsung/dma.c | 2 +- trunk/sound/usb/misc/ua101.c | 28 +- 377 files changed, 11265 insertions(+), 9095 deletions(-) create mode 100644 trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/Kconfig (76%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/Makefile (88%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/Makefile.boot (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/clock-exynos4210.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/clock-exynos4212.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/clock.c (86%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/cpu.c (90%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/cpuidle.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dev-ahci.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dev-audio.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dev-dwmci.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dev-pd.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dev-sysmmu.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/dma.c (98%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/headsmp.S (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/hotplug.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/debug-macro.S (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/dma.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/dwmci.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/entry-macro.S (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/exynos4-clock.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/gpio.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/hardware.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/io.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/irqs.h (97%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/map.h (87%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/memory.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/pm-core.h (89%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/pmu.h (84%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-audss.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-clock.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-gpio.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-irq.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-mct.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-mem.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-pmu.h (69%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-sysmmu.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/regs-usb-phy.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/sysmmu.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/system.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/timex.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/uncompress.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/include/mach/vmalloc.h (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/init.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/irq-combiner.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/irq-eint.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mach-armlex4210.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mach-nuri.c (85%) create mode 100644 trunk/arch/arm/mach-exynos/mach-origen.c rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mach-smdk4x12.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mach-smdkv310.c (88%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mach-universal_c210.c (67%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/mct.c (91%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/platsmp.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/pm.c (98%) create mode 100644 trunk/arch/arm/mach-exynos/pmu.c rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-fimc.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-fimd0.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c0.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c1.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c2.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c3.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c4.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c5.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c6.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-i2c7.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-keypad.c (100%) rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-sdhci-gpio.c (100%) create mode 100644 trunk/arch/arm/mach-exynos/setup-sdhci.c rename trunk/arch/arm/{mach-exynos4 => mach-exynos}/setup-usb-phy.c (100%) delete mode 100644 trunk/arch/arm/mach-exynos4/include/mach/clkdev.h delete mode 100644 trunk/arch/arm/mach-exynos4/mach-origen.c delete mode 100644 trunk/arch/arm/mach-exynos4/pmu.c delete mode 100644 trunk/arch/arm/mach-exynos4/setup-sdhci.c create mode 100644 trunk/arch/arm/mach-mmp/include/mach/sram.h create mode 100644 trunk/arch/arm/mach-mmp/sram.c create mode 100644 trunk/arch/arm/mach-s3c2412/gpio.c delete mode 100644 trunk/arch/arm/mach-s3c64xx/dev-onenand1.c delete mode 100644 trunk/arch/arm/mach-s3c64xx/gpiolib.c delete mode 100644 trunk/arch/arm/mach-s3c64xx/include/mach/clkdev.h create mode 100644 trunk/arch/arm/mach-s3c64xx/include/mach/crag6410.h delete mode 100644 trunk/arch/arm/mach-s3c64xx/include/mach/pll.h delete mode 100644 trunk/arch/arm/mach-s3c64xx/include/mach/pwm-clock.h create mode 100644 trunk/arch/arm/mach-s3c64xx/mach-crag6410-module.c delete mode 100644 trunk/arch/arm/mach-s5p64x0/include/mach/clkdev.h create mode 100644 trunk/arch/arm/mach-s5p64x0/include/mach/pm-core.h delete mode 100644 trunk/arch/arm/mach-s5p64x0/include/mach/pwm-clock.h create mode 100644 trunk/arch/arm/mach-s5p64x0/irq-pm.c create mode 100644 trunk/arch/arm/mach-s5p64x0/pm.c create mode 100644 trunk/arch/arm/mach-s5p64x0/setup-fb-24bpp.c delete mode 100644 trunk/arch/arm/mach-s5pc100/include/mach/clkdev.h delete mode 100644 trunk/arch/arm/mach-s5pc100/include/mach/pwm-clock.h delete mode 100644 trunk/arch/arm/mach-s5pv210/include/mach/clkdev.h delete mode 100644 trunk/arch/arm/mach-s5pv210/include/mach/pwm-clock.h delete mode 100644 trunk/arch/arm/mach-s5pv210/sleep.S create mode 100644 trunk/arch/arm/plat-s3c24xx/dev-uart.c delete mode 100644 trunk/arch/arm/plat-s3c24xx/devs.c delete mode 100644 trunk/arch/arm/plat-s3c24xx/gpio.c delete mode 100644 trunk/arch/arm/plat-s3c24xx/gpiolib.c delete mode 100644 trunk/arch/arm/plat-s3c24xx/include/mach/clkdev.h delete mode 100644 trunk/arch/arm/plat-s3c24xx/include/mach/pwm-clock.h delete mode 100644 trunk/arch/arm/plat-s3c24xx/include/plat/pll.h delete mode 100644 trunk/arch/arm/plat-s3c24xx/include/plat/regs-iis.h delete mode 100644 trunk/arch/arm/plat-s3c24xx/include/plat/regs-spi.h delete mode 100644 trunk/arch/arm/plat-s5p/dev-csis0.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-csis1.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-ehci.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-fimc0.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-fimc1.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-fimc2.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-fimc3.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-fimd0.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-onenand.c delete mode 100644 trunk/arch/arm/plat-s5p/dev-pmu.c rename trunk/arch/arm/{mach-exynos4 => plat-s5p}/sleep.S (81%) delete mode 100644 trunk/arch/arm/plat-samsung/dev-adc.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-asocdma.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-fb.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-hsmmc.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-hsmmc1.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-hsmmc2.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-hsmmc3.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-hwmon.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c0.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c1.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c2.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c3.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c4.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c5.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c6.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-i2c7.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-ide.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-keypad.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-nand.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-onenand.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-pwm.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-rtc.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-ts.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-usb-hsotg.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-usb.c delete mode 100644 trunk/arch/arm/plat-samsung/dev-wdt.c create mode 100644 trunk/arch/arm/plat-samsung/devs.c delete mode 100644 trunk/arch/arm/plat-samsung/gpio-config.c delete mode 100644 trunk/arch/arm/plat-samsung/gpio.c rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/audio-simtec.h (95%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/camport.h (86%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/common-smdk.h (87%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/cpu-freq-core.h (98%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/ehci.h (84%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/exynos4.h (87%) create mode 100644 trunk/arch/arm/plat-samsung/include/plat/fb-s3c2410.h rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/fiq.h (88%) create mode 100644 trunk/arch/arm/plat-samsung/include/plat/gpio-fns.h rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/irq.h (81%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/irqs.h (93%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/mci.h (90%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/mfc.h (90%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/mipi_csis.h (90%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/pll.h (57%) delete mode 100644 trunk/arch/arm/plat-samsung/include/plat/pll6553x.h rename trunk/arch/arm/{mach-exynos4/include/mach => plat-samsung/include/plat}/pwm-clock.h (68%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/regs-dma.h (58%) create mode 100644 trunk/arch/arm/plat-samsung/include/plat/regs-iis.h create mode 100644 trunk/arch/arm/plat-samsung/include/plat/regs-spi.h rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/regs-srom.h (89%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/regs-udc.h (51%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/reset.h (66%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/s3c2410.h (93%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/s3c2412.h (92%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/s3c2416.h (92%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/s3c2443.h (87%) rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/s3c244x.h (94%) rename trunk/arch/arm/{mach-s3c64xx/include/mach => plat-samsung/include/plat}/s3c6400.h (94%) rename trunk/arch/arm/{mach-s3c64xx/include/mach => plat-samsung/include/plat}/s3c6410.h (93%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5p-clock.h (96%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5p-time.h (94%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5p6440.h (94%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5p6450.h (94%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5pc100.h (94%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/s5pv210.h (94%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/sysmmu.h (96%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/system-reset.h (92%) create mode 100644 trunk/arch/arm/plat-samsung/include/plat/tv-core.h rename trunk/arch/arm/{plat-s3c24xx => plat-samsung}/include/plat/udc.h (95%) rename trunk/arch/arm/{plat-s5p => plat-samsung}/include/plat/usb-phy.h (83%) delete mode 100644 trunk/drivers/gpio/gpio-exynos4.c delete mode 100644 trunk/drivers/gpio/gpio-plat-samsung.c delete mode 100644 trunk/drivers/gpio/gpio-s5pc100.c delete mode 100644 trunk/drivers/gpio/gpio-s5pv210.c create mode 100644 trunk/drivers/gpio/gpio-samsung.c diff --git a/[refs] b/[refs] index 0d5da299ad85..7a0bb63e4b44 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7a3f8de5a3c36e5fde130cae74a06663b59837ae +refs/heads/master: ec773e99ab4abce07b1ae23117179c2861831964 diff --git a/trunk/Documentation/power/freezing-of-tasks.txt b/trunk/Documentation/power/freezing-of-tasks.txt index 38b57248fd61..316c2ba187f4 100644 --- a/trunk/Documentation/power/freezing-of-tasks.txt +++ b/trunk/Documentation/power/freezing-of-tasks.txt @@ -22,12 +22,12 @@ try_to_freeze_tasks() that sets TIF_FREEZE for all of the freezable tasks and either wakes them up, if they are kernel threads, or sends fake signals to them, if they are user space processes. A task that has TIF_FREEZE set, should react to it by calling the function called refrigerator() (defined in -kernel/power/process.c), which sets the task's PF_FROZEN flag, changes its state +kernel/freezer.c), which sets the task's PF_FROZEN flag, changes its state to TASK_UNINTERRUPTIBLE and makes it loop until PF_FROZEN is cleared for it. Then, we say that the task is 'frozen' and therefore the set of functions handling this mechanism is referred to as 'the freezer' (these functions are -defined in kernel/power/process.c and include/linux/freezer.h). User space -processes are generally frozen before kernel threads. +defined in kernel/power/process.c, kernel/freezer.c & include/linux/freezer.h). +User space processes are generally frozen before kernel threads. It is not recommended to call refrigerator() directly. Instead, it is recommended to use the try_to_freeze() function (defined in @@ -95,7 +95,7 @@ after the memory for the image has been freed, we don't want tasks to allocate additional memory and we prevent them from doing that by freezing them earlier. [Of course, this also means that device drivers should not allocate substantial amounts of memory from their .suspend() callbacks before hibernation, but this -is e separate issue.] +is a separate issue.] 3. The third reason is to prevent user space processes and some kernel threads from interfering with the suspending and resuming of devices. A user space diff --git a/trunk/Documentation/power/runtime_pm.txt b/trunk/Documentation/power/runtime_pm.txt index 0e856088db7c..5336149f831b 100644 --- a/trunk/Documentation/power/runtime_pm.txt +++ b/trunk/Documentation/power/runtime_pm.txt @@ -789,6 +789,16 @@ will behave normally, not taking the autosuspend delay into account. Similarly, if the power.use_autosuspend field isn't set then the autosuspend helper functions will behave just like the non-autosuspend counterparts. +Under some circumstances a driver or subsystem may want to prevent a device +from autosuspending immediately, even though the usage counter is zero and the +autosuspend delay time has expired. If the ->runtime_suspend() callback +returns -EAGAIN or -EBUSY, and if the next autosuspend delay expiration time is +in the future (as it normally would be if the callback invoked +pm_runtime_mark_last_busy()), the PM core will automatically reschedule the +autosuspend. The ->runtime_suspend() callback can't do this rescheduling +itself because no suspend requests of any kind are accepted while the device is +suspending (i.e., while the callback is running). + The implementation is well suited for asynchronous use in interrupt contexts. However such use inevitably involves races, because the PM core can't synchronize ->runtime_suspend() callbacks with the arrival of I/O requests. diff --git a/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt b/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt new file mode 100644 index 000000000000..ae1e90036d06 --- /dev/null +++ b/trunk/Documentation/watchdog/convert_drivers_to_kernel_api.txt @@ -0,0 +1,195 @@ +Converting old watchdog drivers to the watchdog framework +by Wolfram Sang +========================================================= + +Before the watchdog framework came into the kernel, every driver had to +implement the API on its own. Now, as the framework factored out the common +components, those drivers can be lightened making it a user of the framework. +This document shall guide you for this task. The necessary steps are described +as well as things to look out for. + + +Remove the file_operations struct +--------------------------------- + +Old drivers define their own file_operations for actions like open(), write(), +etc... These are now handled by the framework and just call the driver when +needed. So, in general, the 'file_operations' struct and assorted functions can +go. Only very few driver-specific details have to be moved to other functions. +Here is a overview of the functions and probably needed actions: + +- open: Everything dealing with resource management (file-open checks, magic + close preparations) can simply go. Device specific stuff needs to go to the + driver specific start-function. Note that for some drivers, the start-function + also serves as the ping-function. If that is the case and you need start/stop + to be balanced (clocks!), you are better off refactoring a separate start-function. + +- close: Same hints as for open apply. + +- write: Can simply go, all defined behaviour is taken care of by the framework, + i.e. ping on write and magic char ('V') handling. + +- ioctl: While the driver is allowed to have extensions to the IOCTL interface, + the most common ones are handled by the framework, supported by some assistance + from the driver: + + WDIOC_GETSUPPORT: + Returns the mandatory watchdog_info struct from the driver + + WDIOC_GETSTATUS: + Needs the status-callback defined, otherwise returns 0 + + WDIOC_GETBOOTSTATUS: + Needs the bootstatus member properly set. Make sure it is 0 if you + don't have further support! + + WDIOC_SETOPTIONS: + No preparations needed + + WDIOC_KEEPALIVE: + If wanted, options in watchdog_info need to have WDIOF_KEEPALIVEPING + set + + WDIOC_SETTIMEOUT: + Options in watchdog_info need to have WDIOF_SETTIMEOUT set + and a set_timeout-callback has to be defined. The core will also + do limit-checking, if min_timeout and max_timeout in the watchdog + device are set. All is optional. + + WDIOC_GETTIMEOUT: + No preparations needed + + Other IOCTLs can be served using the ioctl-callback. Note that this is mainly + intended for porting old drivers; new drivers should not invent private IOCTLs. + Private IOCTLs are processed first. When the callback returns with + -ENOIOCTLCMD, the IOCTLs of the framework will be tried, too. Any other error + is directly given to the user. + +Example conversion: + +-static const struct file_operations s3c2410wdt_fops = { +- .owner = THIS_MODULE, +- .llseek = no_llseek, +- .write = s3c2410wdt_write, +- .unlocked_ioctl = s3c2410wdt_ioctl, +- .open = s3c2410wdt_open, +- .release = s3c2410wdt_release, +-}; + +Check the functions for device-specific stuff and keep it for later +refactoring. The rest can go. + + +Remove the miscdevice +--------------------- + +Since the file_operations are gone now, you can also remove the 'struct +miscdevice'. The framework will create it on watchdog_dev_register() called by +watchdog_register_device(). + +-static struct miscdevice s3c2410wdt_miscdev = { +- .minor = WATCHDOG_MINOR, +- .name = "watchdog", +- .fops = &s3c2410wdt_fops, +-}; + + +Remove obsolete includes and defines +------------------------------------ + +Because of the simplifications, a few defines are probably unused now. Remove +them. Includes can be removed, too. For example: + +- #include +- #include (if MODULE_ALIAS_MISCDEV is not used) +- #include (if no custom IOCTLs are used) + + +Add the watchdog operations +--------------------------- + +All possible callbacks are defined in 'struct watchdog_ops'. You can find it +explained in 'watchdog-kernel-api.txt' in this directory. start(), stop() and +owner must be set, the rest are optional. You will easily find corresponding +functions in the old driver. Note that you will now get a pointer to the +watchdog_device as a parameter to these functions, so you probably have to +change the function header. Other changes are most likely not needed, because +here simply happens the direct hardware access. If you have device-specific +code left from the above steps, it should be refactored into these callbacks. + +Here is a simple example: + ++static struct watchdog_ops s3c2410wdt_ops = { ++ .owner = THIS_MODULE, ++ .start = s3c2410wdt_start, ++ .stop = s3c2410wdt_stop, ++ .ping = s3c2410wdt_keepalive, ++ .set_timeout = s3c2410wdt_set_heartbeat, ++}; + +A typical function-header change looks like: + +-static void s3c2410wdt_keepalive(void) ++static int s3c2410wdt_keepalive(struct watchdog_device *wdd) + { +... ++ ++ return 0; + } + +... + +- s3c2410wdt_keepalive(); ++ s3c2410wdt_keepalive(&s3c2410_wdd); + + +Add the watchdog device +----------------------- + +Now we need to create a 'struct watchdog_device' and populate it with the +necessary information for the framework. The struct is also explained in detail +in 'watchdog-kernel-api.txt' in this directory. We pass it the mandatory +watchdog_info struct and the newly created watchdog_ops. Often, old drivers +have their own record-keeping for things like bootstatus and timeout using +static variables. Those have to be converted to use the members in +watchdog_device. Note that the timeout values are unsigned int. Some drivers +use signed int, so this has to be converted, too. + +Here is a simple example for a watchdog device: + ++static struct watchdog_device s3c2410_wdd = { ++ .info = &s3c2410_wdt_ident, ++ .ops = &s3c2410wdt_ops, ++}; + + +Register the watchdog device +---------------------------- + +Replace misc_register(&miscdev) with watchdog_register_device(&watchdog_dev). +Make sure the return value gets checked and the error message, if present, +still fits. Also convert the unregister case. + +- ret = misc_register(&s3c2410wdt_miscdev); ++ ret = watchdog_register_device(&s3c2410_wdd); + +... + +- misc_deregister(&s3c2410wdt_miscdev); ++ watchdog_unregister_device(&s3c2410_wdd); + + +Update the Kconfig-entry +------------------------ + +The entry for the driver now needs to select WATCHDOG_CORE: + ++ select WATCHDOG_CORE + + +Create a patch and send it to upstream +-------------------------------------- + +Make sure you understood Documentation/SubmittingPatches and send your patch to +linux-watchdog@vger.kernel.org. We are looking forward to it :) + diff --git a/trunk/MAINTAINERS b/trunk/MAINTAINERS index a6afe342f0fc..6388a96dc1c4 100644 --- a/trunk/MAINTAINERS +++ b/trunk/MAINTAINERS @@ -2387,7 +2387,7 @@ F: include/linux/netfilter_bridge/ebt_*.h F: net/bridge/netfilter/ebt*.c ECRYPT FILE SYSTEM -M: Tyler Hicks +M: Tyler Hicks M: Dustin Kirkland L: ecryptfs@vger.kernel.org W: https://launchpad.net/ecryptfs diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index fe6b0526b3a6..44789eff983f 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -595,6 +595,7 @@ config ARCH_MMP select TICK_ONESHOT select PLAT_PXA select SPARSE_IRQ + select GENERIC_ALLOCATOR help Support for Marvell's PXA168/PXA910(MMP) and MMP2 processor line. @@ -769,6 +770,7 @@ config ARCH_S3C64XX select CPU_V6 select ARM_VIC select HAVE_CLK + select HAVE_TCM select CLKDEV_LOOKUP select NO_IOPORT select ARCH_USES_GETTIMEOFFSET @@ -777,9 +779,6 @@ config ARCH_S3C64XX select SAMSUNG_CLKSRC select SAMSUNG_IRQ_VIC_TIMER select S3C_GPIO_TRACK - select S3C_GPIO_PULL_UPDOWN - select S3C_GPIO_CFG_S3C24XX - select S3C_GPIO_CFG_S3C64XX select S3C_DEV_NAND select USB_ARCH_HAS_OHCI select SAMSUNG_GPIOLIB_4BIT @@ -838,8 +837,8 @@ config ARCH_S5PV210 help Samsung S5PV210/S5PC110 series based systems -config ARCH_EXYNOS4 - bool "Samsung EXYNOS4" +config ARCH_EXYNOS + bool "SAMSUNG EXYNOS" select CPU_V7 select ARCH_SPARSEMEM_ENABLE select ARCH_HAS_HOLES_MEMORYMODEL @@ -853,7 +852,7 @@ config ARCH_EXYNOS4 select HAVE_S3C2410_WATCHDOG if WATCHDOG select NEED_MACH_MEMORY_H help - Samsung EXYNOS4 series based systems + Support for SAMSUNG's EXYNOS SoCs (EXYNOS4/5) config ARCH_SHARK bool "Shark" @@ -1080,7 +1079,7 @@ source "arch/arm/mach-s5pc100/Kconfig" source "arch/arm/mach-s5pv210/Kconfig" -source "arch/arm/mach-exynos4/Kconfig" +source "arch/arm/mach-exynos/Kconfig" source "arch/arm/mach-shmobile/Kconfig" @@ -2212,7 +2211,7 @@ menu "Power management options" source "kernel/power/Kconfig" config ARCH_SUSPEND_POSSIBLE - depends on !ARCH_S5P64X0 && !ARCH_S5PC100 + depends on !ARCH_S5PC100 depends on CPU_ARM920T || CPU_ARM926T || CPU_SA1100 || \ CPU_V6 || CPU_V6K || CPU_V7 || CPU_XSC3 || CPU_XSCALE def_bool y diff --git a/trunk/arch/arm/Makefile b/trunk/arch/arm/Makefile index b7c2d377a6c2..dfcf3b033e10 100644 --- a/trunk/arch/arm/Makefile +++ b/trunk/arch/arm/Makefile @@ -180,7 +180,7 @@ machine-$(CONFIG_ARCH_S3C64XX) := s3c64xx machine-$(CONFIG_ARCH_S5P64X0) := s5p64x0 machine-$(CONFIG_ARCH_S5PC100) := s5pc100 machine-$(CONFIG_ARCH_S5PV210) := s5pv210 -machine-$(CONFIG_ARCH_EXYNOS4) := exynos4 +machine-$(CONFIG_ARCH_EXYNOS4) := exynos machine-$(CONFIG_ARCH_SA1100) := sa1100 machine-$(CONFIG_ARCH_SHARK) := shark machine-$(CONFIG_ARCH_SHMOBILE) := shmobile diff --git a/trunk/arch/arm/configs/exynos4_defconfig b/trunk/arch/arm/configs/exynos4_defconfig index cd40bb56e568..bffe68e190a3 100644 --- a/trunk/arch/arm/configs/exynos4_defconfig +++ b/trunk/arch/arm/configs/exynos4_defconfig @@ -4,19 +4,18 @@ CONFIG_KALLSYMS_ALL=y CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y # CONFIG_BLK_DEV_BSG is not set -CONFIG_ARCH_EXYNOS4=y +CONFIG_ARCH_EXYNOS=y CONFIG_S3C_LOWLEVEL_UART_PORT=1 CONFIG_MACH_SMDKC210=y -CONFIG_MACH_SMDKV310=y CONFIG_MACH_ARMLEX4210=y CONFIG_MACH_UNIVERSAL_C210=y CONFIG_MACH_NURI=y CONFIG_MACH_ORIGEN=y +CONFIG_MACH_SMDK4412=y CONFIG_NO_HZ=y CONFIG_HIGH_RES_TIMERS=y CONFIG_SMP=y CONFIG_NR_CPUS=2 -CONFIG_HOTPLUG_CPU=y CONFIG_PREEMPT=y CONFIG_AEABI=y CONFIG_CMDLINE="root=/dev/ram0 rw ramdisk=8192 initrd=0x41000000,8M console=ttySAC1,115200 init=/linuxrc mem=256M" @@ -61,13 +60,9 @@ CONFIG_DETECT_HUNG_TASK=y CONFIG_DEBUG_RT_MUTEXES=y CONFIG_DEBUG_SPINLOCK=y CONFIG_DEBUG_MUTEXES=y -CONFIG_DEBUG_SPINLOCK_SLEEP=y CONFIG_DEBUG_INFO=y -# CONFIG_RCU_CPU_STALL_DETECTOR is not set CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_DEBUG_USER=y -CONFIG_DEBUG_ERRORS=y CONFIG_DEBUG_LL=y CONFIG_EARLY_PRINTK=y -CONFIG_DEBUG_S3C_UART=1 CONFIG_CRC_CCITT=y diff --git a/trunk/arch/arm/mach-exynos4/Kconfig b/trunk/arch/arm/mach-exynos/Kconfig similarity index 76% rename from trunk/arch/arm/mach-exynos4/Kconfig rename to trunk/arch/arm/mach-exynos/Kconfig index 44013e0672fe..724ec0f3560d 100644 --- a/trunk/arch/arm/mach-exynos4/Kconfig +++ b/trunk/arch/arm/mach-exynos/Kconfig @@ -1,4 +1,4 @@ -# arch/arm/mach-exynos4/Kconfig +# arch/arm/mach-exynos/Kconfig # # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. # http://www.samsung.com/ @@ -7,22 +7,47 @@ # Configuration options for the EXYNOS4 -if ARCH_EXYNOS4 +if ARCH_EXYNOS + +menu "SAMSUNG EXYNOS SoCs Support" + +choice + prompt "EXYNOS System Type" + default ARCH_EXYNOS4 + +config ARCH_EXYNOS4 + bool "SAMSUNG EXYNOS4" + help + Samsung EXYNOS4 SoCs based systems + +endchoice + +comment "EXYNOS SoCs" config CPU_EXYNOS4210 - bool + bool "SAMSUNG EXYNOS4210" + default y + depends on ARCH_EXYNOS4 select SAMSUNG_DMADEV select ARM_CPU_SUSPEND if PM + select S5P_PM if PM + select S5P_SLEEP if PM help Enable EXYNOS4210 CPU support config SOC_EXYNOS4212 - bool + bool "SAMSUNG EXYNOS4212" + default y + depends on ARCH_EXYNOS4 + select S5P_PM if PM + select S5P_SLEEP if PM help Enable EXYNOS4212 SoC support config SOC_EXYNOS4412 - bool + bool "SAMSUNG EXYNOS4412" + default y + depends on ARCH_EXYNOS4 help Enable EXYNOS4412 SoC support @@ -120,7 +145,7 @@ config EXYNOS4_SETUP_USB_PHY # machine support -menu "EXYNOS4 Machines" +if ARCH_EXYNOS4 comment "EXYNOS4210 Boards" @@ -137,6 +162,14 @@ config MACH_SMDKV310 select S3C_DEV_RTC select S3C_DEV_WDT select S3C_DEV_I2C1 + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 + select S5P_DEV_FIMC3 + select S5P_DEV_I2C_HDMIPHY + select S5P_DEV_MFC + select S5P_DEV_TV + select S5P_DEV_USB_EHCI select S3C_DEV_HSMMC select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC2 @@ -151,6 +184,7 @@ config MACH_SMDKV310 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_SDHCI + select EXYNOS4_SETUP_USB_PHY help Machine support for Samsung SMDKV310 @@ -176,19 +210,26 @@ config MACH_UNIVERSAL_C210 select S5P_DEV_FIMC1 select S5P_DEV_FIMC2 select S5P_DEV_FIMC3 + select S5P_DEV_CSIS0 + select S5P_DEV_FIMD0 select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3 select S3C_DEV_I2C1 select S3C_DEV_I2C3 select S3C_DEV_I2C5 + select S5P_DEV_I2C_HDMIPHY select S5P_DEV_MFC select S5P_DEV_ONENAND + select S5P_DEV_TV select EXYNOS4_DEV_PD + select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_SDHCI + select EXYNOS4_SETUP_FIMC + select S5P_SETUP_MIPIPHY help Machine support for Samsung Mobile Universal S5PC210 Reference Board. @@ -196,21 +237,33 @@ config MACH_UNIVERSAL_C210 config MACH_NURI bool "Mobile NURI Board" select CPU_EXYNOS4210 + select S5P_GPIO_INT select S3C_DEV_WDT + select S3C_DEV_RTC + select S5P_DEV_FIMD0 select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC3 select S3C_DEV_I2C1 select S3C_DEV_I2C3 select S3C_DEV_I2C5 + select S5P_DEV_CSIS0 + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 + select S5P_DEV_FIMC3 select S5P_DEV_MFC select S5P_DEV_USB_EHCI + select S5P_SETUP_MIPIPHY select EXYNOS4_DEV_PD + select EXYNOS4_SETUP_FIMC + select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C3 select EXYNOS4_SETUP_I2C5 select EXYNOS4_SETUP_SDHCI select EXYNOS4_SETUP_USB_PHY + select S5P_SETUP_MIPIPHY select SAMSUNG_DEV_PWM select SAMSUNG_DEV_ADC help @@ -221,8 +274,23 @@ config MACH_ORIGEN select CPU_EXYNOS4210 select S3C_DEV_RTC select S3C_DEV_WDT + select S3C_DEV_HSMMC select S3C_DEV_HSMMC2 + select S5P_DEV_FIMC0 + select S5P_DEV_FIMC1 + select S5P_DEV_FIMC2 + select S5P_DEV_FIMC3 + select S5P_DEV_FIMD0 + select S5P_DEV_I2C_HDMIPHY + select S5P_DEV_MFC + select S5P_DEV_TV + select S5P_DEV_USB_EHCI + select SAMSUNG_DEV_BACKLIGHT + select SAMSUNG_DEV_PWM + select EXYNOS4_DEV_PD + select EXYNOS4_SETUP_FIMD0 select EXYNOS4_SETUP_SDHCI + select EXYNOS4_SETUP_USB_PHY help Machine support for ORIGEN based on Samsung EXYNOS4210 @@ -257,12 +325,11 @@ config MACH_SMDK4412 select MACH_SMDK4212 help Machine support for Samsung SMDK4412 +endif -endmenu - -comment "Configuration for HSMMC bus width" +if ARCH_EXYNOS4 -menu "Use 8-bit bus width" +comment "Configuration for HSMMC 8-bit bus width" config EXYNOS4_SDHCI_CH0_8BIT bool "Channel 0 with 8-bit bus" @@ -275,6 +342,7 @@ config EXYNOS4_SDHCI_CH2_8BIT help Support HSMMC Channel 2 8-bit bus. If selected, Channel 3 is disabled. +endif endmenu diff --git a/trunk/arch/arm/mach-exynos4/Makefile b/trunk/arch/arm/mach-exynos/Makefile similarity index 88% rename from trunk/arch/arm/mach-exynos4/Makefile rename to trunk/arch/arm/mach-exynos/Makefile index c9b2e1f97e44..59069a35e40b 100644 --- a/trunk/arch/arm/mach-exynos4/Makefile +++ b/trunk/arch/arm/mach-exynos/Makefile @@ -1,4 +1,4 @@ -# arch/arm/mach-exynos4/Makefile +# arch/arm/mach-exynos/Makefile # # Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. # http://www.samsung.com/ @@ -12,11 +12,11 @@ obj- := # Core support for EXYNOS4 system -obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o -obj-$(CONFIG_ARCH_EXYNOS4) += setup-i2c0.o irq-eint.o dma.o pmu.o +obj-$(CONFIG_ARCH_EXYNOS4) += cpu.o init.o clock.o irq-combiner.o setup-i2c0.o +obj-$(CONFIG_ARCH_EXYNOS4) += irq-eint.o dma.o pmu.o obj-$(CONFIG_CPU_EXYNOS4210) += clock-exynos4210.o obj-$(CONFIG_SOC_EXYNOS4212) += clock-exynos4212.o -obj-$(CONFIG_PM) += pm.o sleep.o +obj-$(CONFIG_PM) += pm.o obj-$(CONFIG_CPU_IDLE) += cpuidle.o obj-$(CONFIG_SMP) += platsmp.o headsmp.o @@ -39,11 +39,11 @@ obj-$(CONFIG_MACH_SMDK4412) += mach-smdk4x12.o # device support -obj-y += dev-audio.o +obj-$(CONFIG_ARCH_EXYNOS4) += dev-audio.o obj-$(CONFIG_EXYNOS4_DEV_AHCI) += dev-ahci.o obj-$(CONFIG_EXYNOS4_DEV_PD) += dev-pd.o obj-$(CONFIG_EXYNOS4_DEV_SYSMMU) += dev-sysmmu.o -obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o +obj-$(CONFIG_EXYNOS4_DEV_DWMCI) += dev-dwmci.o obj-$(CONFIG_EXYNOS4_SETUP_FIMC) += setup-fimc.o obj-$(CONFIG_EXYNOS4_SETUP_FIMD0) += setup-fimd0.o @@ -57,5 +57,4 @@ obj-$(CONFIG_EXYNOS4_SETUP_I2C7) += setup-i2c7.o obj-$(CONFIG_EXYNOS4_SETUP_KEYPAD) += setup-keypad.o obj-$(CONFIG_EXYNOS4_SETUP_SDHCI) += setup-sdhci.o obj-$(CONFIG_EXYNOS4_SETUP_SDHCI_GPIO) += setup-sdhci-gpio.o - obj-$(CONFIG_EXYNOS4_SETUP_USB_PHY) += setup-usb-phy.o diff --git a/trunk/arch/arm/mach-exynos4/Makefile.boot b/trunk/arch/arm/mach-exynos/Makefile.boot similarity index 100% rename from trunk/arch/arm/mach-exynos4/Makefile.boot rename to trunk/arch/arm/mach-exynos/Makefile.boot diff --git a/trunk/arch/arm/mach-exynos4/clock-exynos4210.c b/trunk/arch/arm/mach-exynos/clock-exynos4210.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/clock-exynos4210.c rename to trunk/arch/arm/mach-exynos/clock-exynos4210.c diff --git a/trunk/arch/arm/mach-exynos4/clock-exynos4212.c b/trunk/arch/arm/mach-exynos/clock-exynos4212.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/clock-exynos4212.c rename to trunk/arch/arm/mach-exynos/clock-exynos4212.c diff --git a/trunk/arch/arm/mach-exynos4/clock.c b/trunk/arch/arm/mach-exynos/clock.c similarity index 86% rename from trunk/arch/arm/mach-exynos4/clock.c rename to trunk/arch/arm/mach-exynos/clock.c index e21952dfb7e1..2894f0adef5c 100644 --- a/trunk/arch/arm/mach-exynos4/clock.c +++ b/trunk/arch/arm/mach-exynos/clock.c @@ -151,6 +151,11 @@ static int exynos4_clk_ip_mfc_ctrl(struct clk *clk, int enable) return s5p_gatectrl(S5P_CLKGATE_IP_MFC, clk, enable); } +static int exynos4_clksrc_mask_tv_ctrl(struct clk *clk, int enable) +{ + return s5p_gatectrl(S5P_CLKSRC_MASK_TV, clk, enable); +} + static int exynos4_clk_ip_cam_ctrl(struct clk *clk, int enable) { return s5p_gatectrl(S5P_CLKGATE_IP_CAM, clk, enable); @@ -191,6 +196,16 @@ static int exynos4_clk_ip_perir_ctrl(struct clk *clk, int enable) return s5p_gatectrl(S5P_CLKGATE_IP_PERIR, clk, enable); } +static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable) +{ + return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable); +} + +static int exynos4_clk_dac_ctrl(struct clk *clk, int enable) +{ + return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable); +} + /* Core list of CMU_CPU side */ static struct clksrc_clk clk_mout_apll = { @@ -507,14 +522,44 @@ static struct clk init_clocks_off[] = { .parent = &clk_aclk_133.clk, .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 9), + }, { + .name = "dac", + .devname = "s5p-sdo", + .enable = exynos4_clk_ip_tv_ctrl, + .ctrlbit = (1 << 2), + }, { + .name = "mixer", + .devname = "s5p-mixer", + .enable = exynos4_clk_ip_tv_ctrl, + .ctrlbit = (1 << 1), + }, { + .name = "vp", + .devname = "s5p-mixer", + .enable = exynos4_clk_ip_tv_ctrl, + .ctrlbit = (1 << 0), + }, { + .name = "hdmi", + .devname = "exynos4-hdmi", + .enable = exynos4_clk_ip_tv_ctrl, + .ctrlbit = (1 << 3), + }, { + .name = "hdmiphy", + .devname = "exynos4-hdmi", + .enable = exynos4_clk_hdmiphy_ctrl, + .ctrlbit = (1 << 0), + }, { + .name = "dacphy", + .devname = "s5p-sdo", + .enable = exynos4_clk_dac_ctrl, + .ctrlbit = (1 << 0), }, { .name = "dma", - .devname = "s3c-pl330.0", + .devname = "dma-pl330.0", .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 0), }, { .name = "dma", - .devname = "s3c-pl330.1", + .devname = "dma-pl330.1", .enable = exynos4_clk_ip_fsys_ctrl, .ctrlbit = (1 << 1), }, { @@ -634,6 +679,12 @@ static struct clk init_clocks_off[] = { .parent = &clk_aclk_100.clk, .enable = exynos4_clk_ip_peril_ctrl, .ctrlbit = (1 << 13), + }, { + .name = "i2c", + .devname = "s3c2440-hdmiphy-i2c", + .parent = &clk_aclk_100.clk, + .enable = exynos4_clk_ip_peril_ctrl, + .ctrlbit = (1 << 14), }, { .name = "SYSMMU_MDMA", .enable = exynos4_clk_ip_image_ctrl, @@ -836,6 +887,81 @@ static struct clksrc_sources clkset_mout_mfc = { .nr_sources = ARRAY_SIZE(clkset_mout_mfc_list), }; +static struct clk *clkset_sclk_dac_list[] = { + [0] = &clk_sclk_vpll.clk, + [1] = &clk_sclk_hdmiphy, +}; + +static struct clksrc_sources clkset_sclk_dac = { + .sources = clkset_sclk_dac_list, + .nr_sources = ARRAY_SIZE(clkset_sclk_dac_list), +}; + +static struct clksrc_clk clk_sclk_dac = { + .clk = { + .name = "sclk_dac", + .enable = exynos4_clksrc_mask_tv_ctrl, + .ctrlbit = (1 << 8), + }, + .sources = &clkset_sclk_dac, + .reg_src = { .reg = S5P_CLKSRC_TV, .shift = 8, .size = 1 }, +}; + +static struct clksrc_clk clk_sclk_pixel = { + .clk = { + .name = "sclk_pixel", + .parent = &clk_sclk_vpll.clk, + }, + .reg_div = { .reg = S5P_CLKDIV_TV, .shift = 0, .size = 4 }, +}; + +static struct clk *clkset_sclk_hdmi_list[] = { + [0] = &clk_sclk_pixel.clk, + [1] = &clk_sclk_hdmiphy, +}; + +static struct clksrc_sources clkset_sclk_hdmi = { + .sources = clkset_sclk_hdmi_list, + .nr_sources = ARRAY_SIZE(clkset_sclk_hdmi_list), +}; + +static struct clksrc_clk clk_sclk_hdmi = { + .clk = { + .name = "sclk_hdmi", + .enable = exynos4_clksrc_mask_tv_ctrl, + .ctrlbit = (1 << 0), + }, + .sources = &clkset_sclk_hdmi, + .reg_src = { .reg = S5P_CLKSRC_TV, .shift = 0, .size = 1 }, +}; + +static struct clk *clkset_sclk_mixer_list[] = { + [0] = &clk_sclk_dac.clk, + [1] = &clk_sclk_hdmi.clk, +}; + +static struct clksrc_sources clkset_sclk_mixer = { + .sources = clkset_sclk_mixer_list, + .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list), +}; + +static struct clksrc_clk clk_sclk_mixer = { + .clk = { + .name = "sclk_mixer", + .enable = exynos4_clksrc_mask_tv_ctrl, + .ctrlbit = (1 << 4), + }, + .sources = &clkset_sclk_mixer, + .reg_src = { .reg = S5P_CLKSRC_TV, .shift = 4, .size = 1 }, +}; + +static struct clksrc_clk *sclk_tv[] = { + &clk_sclk_dac, + &clk_sclk_pixel, + &clk_sclk_hdmi, + &clk_sclk_mixer, +}; + static struct clksrc_clk clk_dout_mmc0 = { .clk = { .name = "dout_mmc0", @@ -1162,6 +1288,71 @@ static struct clk_ops exynos4_fout_apll_ops = { .get_rate = exynos4_fout_apll_get_rate, }; +static u32 vpll_div[][8] = { + { 54000000, 3, 53, 3, 1024, 0, 17, 0 }, + { 108000000, 3, 53, 2, 1024, 0, 17, 0 }, +}; + +static unsigned long exynos4_vpll_get_rate(struct clk *clk) +{ + return clk->rate; +} + +static int exynos4_vpll_set_rate(struct clk *clk, unsigned long rate) +{ + unsigned int vpll_con0, vpll_con1 = 0; + unsigned int i; + + /* Return if nothing changed */ + if (clk->rate == rate) + return 0; + + vpll_con0 = __raw_readl(S5P_VPLL_CON0); + vpll_con0 &= ~(0x1 << 27 | \ + PLL90XX_MDIV_MASK << PLL46XX_MDIV_SHIFT | \ + PLL90XX_PDIV_MASK << PLL46XX_PDIV_SHIFT | \ + PLL90XX_SDIV_MASK << PLL46XX_SDIV_SHIFT); + + vpll_con1 = __raw_readl(S5P_VPLL_CON1); + vpll_con1 &= ~(PLL46XX_MRR_MASK << PLL46XX_MRR_SHIFT | \ + PLL46XX_MFR_MASK << PLL46XX_MFR_SHIFT | \ + PLL4650C_KDIV_MASK << PLL46XX_KDIV_SHIFT); + + for (i = 0; i < ARRAY_SIZE(vpll_div); i++) { + if (vpll_div[i][0] == rate) { + vpll_con0 |= vpll_div[i][1] << PLL46XX_PDIV_SHIFT; + vpll_con0 |= vpll_div[i][2] << PLL46XX_MDIV_SHIFT; + vpll_con0 |= vpll_div[i][3] << PLL46XX_SDIV_SHIFT; + vpll_con1 |= vpll_div[i][4] << PLL46XX_KDIV_SHIFT; + vpll_con1 |= vpll_div[i][5] << PLL46XX_MFR_SHIFT; + vpll_con1 |= vpll_div[i][6] << PLL46XX_MRR_SHIFT; + vpll_con0 |= vpll_div[i][7] << 27; + break; + } + } + + if (i == ARRAY_SIZE(vpll_div)) { + printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n", + __func__); + return -EINVAL; + } + + __raw_writel(vpll_con0, S5P_VPLL_CON0); + __raw_writel(vpll_con1, S5P_VPLL_CON1); + + /* Wait for VPLL lock */ + while (!(__raw_readl(S5P_VPLL_CON0) & (1 << PLL46XX_LOCKED_SHIFT))) + continue; + + clk->rate = rate; + return 0; +} + +static struct clk_ops exynos4_vpll_ops = { + .get_rate = exynos4_vpll_get_rate, + .set_rate = exynos4_vpll_set_rate, +}; + void __init_or_cpufreq exynos4_setup_clocks(void) { struct clk *xtal_clk; @@ -1219,6 +1410,7 @@ void __init_or_cpufreq exynos4_setup_clocks(void) clk_fout_apll.ops = &exynos4_fout_apll_ops; clk_fout_mpll.rate = mpll; clk_fout_epll.rate = epll; + clk_fout_vpll.ops = &exynos4_vpll_ops; clk_fout_vpll.rate = vpll; printk(KERN_INFO "EXYNOS4: PLL settings, A=%ld, M=%ld, E=%ld V=%ld", @@ -1246,7 +1438,10 @@ void __init_or_cpufreq exynos4_setup_clocks(void) } static struct clk *clks[] __initdata = { - /* Nothing here yet */ + &clk_sclk_hdmi27m, + &clk_sclk_hdmiphy, + &clk_sclk_usbphy0, + &clk_sclk_usbphy1, }; #ifdef CONFIG_PM_SLEEP @@ -1280,17 +1475,17 @@ void __init exynos4_register_clocks(void) for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) s3c_register_clksrc(sysclks[ptr], 1); + for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++) + s3c_register_clksrc(sclk_tv[ptr], 1); + s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off)); -<<<<<<< HEAD register_syscore_ops(&exynos4_clock_syscore_ops); -======= s3c24xx_register_clock(&dummy_apb_pclk); ->>>>>>> 4598fc2c94b68740e0269db03c98a1e7ad5af773 s3c_pwmclk_init(); } diff --git a/trunk/arch/arm/mach-exynos4/cpu.c b/trunk/arch/arm/mach-exynos/cpu.c similarity index 90% rename from trunk/arch/arm/mach-exynos4/cpu.c rename to trunk/arch/arm/mach-exynos/cpu.c index a348434f17b5..90ec247f3b37 100644 --- a/trunk/arch/arm/mach-exynos4/cpu.c +++ b/trunk/arch/arm/mach-exynos/cpu.c @@ -1,4 +1,4 @@ -/* linux/arch/arm/mach-exynos4/cpu.c +/* linux/arch/arm/mach-exynos/cpu.c * * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. * http://www.samsung.com @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -39,27 +40,46 @@ extern int combiner_init(unsigned int combiner_nr, void __iomem *base, extern void combiner_cascade_irq(unsigned int combiner_nr, unsigned int irq); /* Initial IO mappings */ -static struct map_desc exynos4_iodesc[] __initdata = { +static struct map_desc exynos_iodesc[] __initdata = { { .virtual = (unsigned long)S5P_VA_SYSTIMER, - .pfn = __phys_to_pfn(EXYNOS4_PA_SYSTIMER), + .pfn = __phys_to_pfn(EXYNOS_PA_SYSTIMER), .length = SZ_4K, - .type = MT_DEVICE, - }, { - .virtual = (unsigned long)S5P_VA_CMU, - .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), - .length = SZ_128K, .type = MT_DEVICE, }, { .virtual = (unsigned long)S5P_VA_PMU, - .pfn = __phys_to_pfn(EXYNOS4_PA_PMU), + .pfn = __phys_to_pfn(EXYNOS_PA_PMU), .length = SZ_64K, .type = MT_DEVICE, }, { .virtual = (unsigned long)S5P_VA_COMBINER_BASE, - .pfn = __phys_to_pfn(EXYNOS4_PA_COMBINER), + .pfn = __phys_to_pfn(EXYNOS_PA_COMBINER), .length = SZ_4K, .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S5P_VA_GIC_CPU, + .pfn = __phys_to_pfn(EXYNOS_PA_GIC_CPU), + .length = SZ_64K, + .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S5P_VA_GIC_DIST, + .pfn = __phys_to_pfn(EXYNOS_PA_GIC_DIST), + .length = SZ_64K, + .type = MT_DEVICE, + }, { + .virtual = (unsigned long)S3C_VA_UART, + .pfn = __phys_to_pfn(S3C_PA_UART), + .length = SZ_512K, + .type = MT_DEVICE, + }, +}; + +static struct map_desc exynos4_iodesc[] __initdata = { + { + .virtual = (unsigned long)S5P_VA_CMU, + .pfn = __phys_to_pfn(EXYNOS4_PA_CMU), + .length = SZ_128K, + .type = MT_DEVICE, }, { .virtual = (unsigned long)S5P_VA_COREPERI_BASE, .pfn = __phys_to_pfn(EXYNOS4_PA_COREPERI), @@ -90,11 +110,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { .pfn = __phys_to_pfn(EXYNOS4_PA_DMC0), .length = SZ_4K, .type = MT_DEVICE, - }, { - .virtual = (unsigned long)S3C_VA_UART, - .pfn = __phys_to_pfn(S3C_PA_UART), - .length = SZ_512K, - .type = MT_DEVICE, }, { .virtual = (unsigned long)S5P_VA_SROMC, .pfn = __phys_to_pfn(EXYNOS4_PA_SROMC), @@ -105,16 +120,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { .pfn = __phys_to_pfn(EXYNOS4_PA_HSPHY), .length = SZ_4K, .type = MT_DEVICE, - }, { - .virtual = (unsigned long)S5P_VA_GIC_CPU, - .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_CPU), - .length = SZ_64K, - .type = MT_DEVICE, - }, { - .virtual = (unsigned long)S5P_VA_GIC_DIST, - .pfn = __phys_to_pfn(EXYNOS4_PA_GIC_DIST), - .length = SZ_64K, - .type = MT_DEVICE, }, }; @@ -136,7 +141,7 @@ static struct map_desc exynos4_iodesc1[] __initdata = { }, }; -static void exynos4_idle(void) +static void exynos_idle(void) { if (!need_resched()) cpu_do_idle(); @@ -150,12 +155,13 @@ static void exynos4_sw_reset(void) } /* - * exynos4_map_io + * exynos_map_io * * register the standard cpu IO areas */ void __init exynos4_map_io(void) { + iotable_init(exynos_iodesc, ARRAY_SIZE(exynos_iodesc)); iotable_init(exynos4_iodesc, ARRAY_SIZE(exynos4_iodesc)); if (soc_is_exynos4210() && samsung_rev() == EXYNOS4210_REV_0) @@ -182,6 +188,7 @@ void __init exynos4_map_io(void) s3c_i2c2_setname("s3c2440-i2c"); s5p_fb_setname(0, "exynos4-fb"); + s5p_hdmi_setname("exynos4-hdmi"); } void __init exynos4_init_clocks(int xtal) @@ -248,7 +255,6 @@ static int __init exynos4_core_init(void) { return sysdev_class_register(&exynos4_sysclass); } - core_initcall(exynos4_core_init); #ifdef CONFIG_CACHE_L2X0 @@ -277,15 +283,16 @@ static int __init exynos4_l2x0_cache_init(void) early_initcall(exynos4_l2x0_cache_init); #endif -int __init exynos4_init(void) +int __init exynos_init(void) { - printk(KERN_INFO "EXYNOS4: Initializing architecture\n"); + printk(KERN_INFO "EXYNOS: Initializing architecture\n"); /* set idle function */ - pm_idle = exynos4_idle; + pm_idle = exynos_idle; /* set sw_reset function */ - s5p_reset_hook = exynos4_sw_reset; + if (soc_is_exynos4210() || soc_is_exynos4212() || soc_is_exynos4412()) + s5p_reset_hook = exynos4_sw_reset; return sysdev_register(&exynos4_sysdev); } diff --git a/trunk/arch/arm/mach-exynos4/cpuidle.c b/trunk/arch/arm/mach-exynos/cpuidle.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/cpuidle.c rename to trunk/arch/arm/mach-exynos/cpuidle.c diff --git a/trunk/arch/arm/mach-exynos4/dev-ahci.c b/trunk/arch/arm/mach-exynos/dev-ahci.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/dev-ahci.c rename to trunk/arch/arm/mach-exynos/dev-ahci.c diff --git a/trunk/arch/arm/mach-exynos4/dev-audio.c b/trunk/arch/arm/mach-exynos/dev-audio.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/dev-audio.c rename to trunk/arch/arm/mach-exynos/dev-audio.c diff --git a/trunk/arch/arm/mach-exynos4/dev-dwmci.c b/trunk/arch/arm/mach-exynos/dev-dwmci.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/dev-dwmci.c rename to trunk/arch/arm/mach-exynos/dev-dwmci.c diff --git a/trunk/arch/arm/mach-exynos4/dev-pd.c b/trunk/arch/arm/mach-exynos/dev-pd.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/dev-pd.c rename to trunk/arch/arm/mach-exynos/dev-pd.c diff --git a/trunk/arch/arm/mach-exynos4/dev-sysmmu.c b/trunk/arch/arm/mach-exynos/dev-sysmmu.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/dev-sysmmu.c rename to trunk/arch/arm/mach-exynos/dev-sysmmu.c diff --git a/trunk/arch/arm/mach-exynos4/dma.c b/trunk/arch/arm/mach-exynos/dma.c similarity index 98% rename from trunk/arch/arm/mach-exynos4/dma.c rename to trunk/arch/arm/mach-exynos/dma.c index d57d66255021..9667c61e64fb 100644 --- a/trunk/arch/arm/mach-exynos4/dma.c +++ b/trunk/arch/arm/mach-exynos/dma.c @@ -243,6 +243,7 @@ struct amba_device exynos4_device_pdma1 = { static int __init exynos4_dma_init(void) { amba_device_register(&exynos4_device_pdma0, &iomem_resource); + amba_device_register(&exynos4_device_pdma1, &iomem_resource); return 0; } diff --git a/trunk/arch/arm/mach-exynos4/headsmp.S b/trunk/arch/arm/mach-exynos/headsmp.S similarity index 100% rename from trunk/arch/arm/mach-exynos4/headsmp.S rename to trunk/arch/arm/mach-exynos/headsmp.S diff --git a/trunk/arch/arm/mach-exynos4/hotplug.c b/trunk/arch/arm/mach-exynos/hotplug.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/hotplug.c rename to trunk/arch/arm/mach-exynos/hotplug.c diff --git a/trunk/arch/arm/mach-exynos4/include/mach/debug-macro.S b/trunk/arch/arm/mach-exynos/include/mach/debug-macro.S similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/debug-macro.S rename to trunk/arch/arm/mach-exynos/include/mach/debug-macro.S diff --git a/trunk/arch/arm/mach-exynos4/include/mach/dma.h b/trunk/arch/arm/mach-exynos/include/mach/dma.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/dma.h rename to trunk/arch/arm/mach-exynos/include/mach/dma.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/dwmci.h b/trunk/arch/arm/mach-exynos/include/mach/dwmci.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/dwmci.h rename to trunk/arch/arm/mach-exynos/include/mach/dwmci.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/entry-macro.S b/trunk/arch/arm/mach-exynos/include/mach/entry-macro.S similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/entry-macro.S rename to trunk/arch/arm/mach-exynos/include/mach/entry-macro.S diff --git a/trunk/arch/arm/mach-exynos4/include/mach/exynos4-clock.h b/trunk/arch/arm/mach-exynos/include/mach/exynos4-clock.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/exynos4-clock.h rename to trunk/arch/arm/mach-exynos/include/mach/exynos4-clock.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/gpio.h b/trunk/arch/arm/mach-exynos/include/mach/gpio.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/gpio.h rename to trunk/arch/arm/mach-exynos/include/mach/gpio.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/hardware.h b/trunk/arch/arm/mach-exynos/include/mach/hardware.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/hardware.h rename to trunk/arch/arm/mach-exynos/include/mach/hardware.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/io.h b/trunk/arch/arm/mach-exynos/include/mach/io.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/io.h rename to trunk/arch/arm/mach-exynos/include/mach/io.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/irqs.h b/trunk/arch/arm/mach-exynos/include/mach/irqs.h similarity index 97% rename from trunk/arch/arm/mach-exynos4/include/mach/irqs.h rename to trunk/arch/arm/mach-exynos/include/mach/irqs.h index 2d3f6bcd9bc0..dfd4b7eecb90 100644 --- a/trunk/arch/arm/mach-exynos4/include/mach/irqs.h +++ b/trunk/arch/arm/mach-exynos/include/mach/irqs.h @@ -95,7 +95,11 @@ #define IRQ_2D IRQ_SPI(89) #define IRQ_PCIE IRQ_SPI(90) +#define IRQ_MIXER IRQ_SPI(91) +#define IRQ_HDMI IRQ_SPI(92) +#define IRQ_IIC_HDMIPHY IRQ_SPI(93) #define IRQ_MFC IRQ_SPI(94) +#define IRQ_SDO IRQ_SPI(95) #define IRQ_AUDIO_SS IRQ_SPI(96) #define IRQ_I2S0 IRQ_SPI(97) diff --git a/trunk/arch/arm/mach-exynos4/include/mach/map.h b/trunk/arch/arm/mach-exynos/include/mach/map.h similarity index 87% rename from trunk/arch/arm/mach-exynos4/include/mach/map.h rename to trunk/arch/arm/mach-exynos/include/mach/map.h index 9f97eb8499ee..058541d45af0 100644 --- a/trunk/arch/arm/mach-exynos4/include/mach/map.h +++ b/trunk/arch/arm/mach-exynos/include/mach/map.h @@ -1,4 +1,4 @@ -/* linux/arch/arm/mach-exynos4/include/mach/map.h +/* linux/arch/arm/mach-exynos/include/mach/map.h * * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. * http://www.samsung.com/ @@ -112,6 +112,12 @@ #define EXYNOS4_PA_UART 0x13800000 +#define EXYNOS4_PA_VP 0x12C00000 +#define EXYNOS4_PA_MIXER 0x12C10000 +#define EXYNOS4_PA_SDO 0x12C20000 +#define EXYNOS4_PA_HDMI 0x12D00000 +#define EXYNOS4_PA_IIC_HDMIPHY 0x138E0000 + #define EXYNOS4_PA_IIC(x) (0x13860000 + ((x) * 0x10000)) #define EXYNOS4_PA_ADC 0x13910000 @@ -139,33 +145,45 @@ #define S3C_PA_IIC5 EXYNOS4_PA_IIC(5) #define S3C_PA_IIC6 EXYNOS4_PA_IIC(6) #define S3C_PA_IIC7 EXYNOS4_PA_IIC(7) -#define SAMSUNG_PA_ADC EXYNOS4_PA_ADC -#define SAMSUNG_PA_ADC1 EXYNOS4_PA_ADC1 #define S3C_PA_RTC EXYNOS4_PA_RTC #define S3C_PA_WDT EXYNOS4_PA_WATCHDOG +#define S3C_PA_UART EXYNOS4_PA_UART #define S5P_PA_CHIPID EXYNOS4_PA_CHIPID +#define S5P_PA_EHCI EXYNOS4_PA_EHCI #define S5P_PA_FIMC0 EXYNOS4_PA_FIMC0 #define S5P_PA_FIMC1 EXYNOS4_PA_FIMC1 #define S5P_PA_FIMC2 EXYNOS4_PA_FIMC2 #define S5P_PA_FIMC3 EXYNOS4_PA_FIMC3 +#define S5P_PA_FIMD0 EXYNOS4_PA_FIMD0 +#define S5P_PA_HDMI EXYNOS4_PA_HDMI +#define S5P_PA_IIC_HDMIPHY EXYNOS4_PA_IIC_HDMIPHY +#define S5P_PA_MFC EXYNOS4_PA_MFC #define S5P_PA_MIPI_CSIS0 EXYNOS4_PA_MIPI_CSIS0 #define S5P_PA_MIPI_CSIS1 EXYNOS4_PA_MIPI_CSIS1 -#define S5P_PA_FIMD0 EXYNOS4_PA_FIMD0 +#define S5P_PA_MIXER EXYNOS4_PA_MIXER #define S5P_PA_ONENAND EXYNOS4_PA_ONENAND #define S5P_PA_ONENAND_DMA EXYNOS4_PA_ONENAND_DMA +#define S5P_PA_SDO EXYNOS4_PA_SDO #define S5P_PA_SDRAM EXYNOS4_PA_SDRAM #define S5P_PA_SROMC EXYNOS4_PA_SROMC -#define S5P_PA_MFC EXYNOS4_PA_MFC #define S5P_PA_SYSCON EXYNOS4_PA_SYSCON #define S5P_PA_TIMER EXYNOS4_PA_TIMER -#define S5P_PA_EHCI EXYNOS4_PA_EHCI +#define S5P_PA_VP EXYNOS4_PA_VP +#define SAMSUNG_PA_ADC EXYNOS4_PA_ADC +#define SAMSUNG_PA_ADC1 EXYNOS4_PA_ADC1 #define SAMSUNG_PA_KEYPAD EXYNOS4_PA_KEYPAD -/* UART */ +#define EXYNOS_PA_COMBINER EXYNOS4_PA_COMBINER +#define EXYNOS_PA_GIC_CPU EXYNOS4_PA_GIC_CPU +#define EXYNOS_PA_GIC_DIST EXYNOS4_PA_GIC_DIST +#define EXYNOS_PA_PMU EXYNOS4_PA_PMU +#define EXYNOS_PA_SYSTIMER EXYNOS4_PA_SYSTIMER -#define S3C_PA_UART EXYNOS4_PA_UART +/* Compatibility UART */ + +#define S3C_VA_UARTx(x) (S3C_VA_UART + ((x) * S3C_UART_OFFSET)) #define S5P_PA_UART(x) (S3C_PA_UART + ((x) * S3C_UART_OFFSET)) #define S5P_PA_UART0 S5P_PA_UART(0) diff --git a/trunk/arch/arm/mach-exynos4/include/mach/memory.h b/trunk/arch/arm/mach-exynos/include/mach/memory.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/memory.h rename to trunk/arch/arm/mach-exynos/include/mach/memory.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/pm-core.h b/trunk/arch/arm/mach-exynos/include/mach/pm-core.h similarity index 89% rename from trunk/arch/arm/mach-exynos4/include/mach/pm-core.h rename to trunk/arch/arm/mach-exynos/include/mach/pm-core.h index 1df3b81f96e8..9d8da51e35ca 100644 --- a/trunk/arch/arm/mach-exynos4/include/mach/pm-core.h +++ b/trunk/arch/arm/mach-exynos/include/mach/pm-core.h @@ -14,6 +14,10 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ + +#ifndef __ASM_ARCH_PM_CORE_H +#define __ASM_ARCH_PM_CORE_H __FILE__ + #include static inline void s3c_pm_debug_init_uart(void) @@ -53,7 +57,9 @@ static inline void s3c_pm_restored_gpios(void) /* nothing here yet */ } -static inline void s3c_pm_saved_gpios(void) +static inline void samsung_pm_saved_gpios(void) { /* nothing here yet */ } + +#endif /* __ASM_ARCH_PM_CORE_H */ diff --git a/trunk/arch/arm/mach-exynos4/include/mach/pmu.h b/trunk/arch/arm/mach-exynos/include/mach/pmu.h similarity index 84% rename from trunk/arch/arm/mach-exynos4/include/mach/pmu.h rename to trunk/arch/arm/mach-exynos/include/mach/pmu.h index a952904b010e..632dd5630138 100644 --- a/trunk/arch/arm/mach-exynos4/include/mach/pmu.h +++ b/trunk/arch/arm/mach-exynos/include/mach/pmu.h @@ -13,6 +13,8 @@ #ifndef __ASM_ARCH_PMU_H #define __ASM_ARCH_PMU_H __FILE__ +#define PMU_TABLE_END NULL + enum sys_powerdown { SYS_AFTR, SYS_LPA, @@ -20,6 +22,11 @@ enum sys_powerdown { NUM_SYS_POWERDOWN, }; +struct exynos4_pmu_conf { + void __iomem *reg; + unsigned int val[NUM_SYS_POWERDOWN]; +}; + extern void exynos4_sys_powerdown_conf(enum sys_powerdown mode); #endif /* __ASM_ARCH_PMU_H */ diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-audss.h b/trunk/arch/arm/mach-exynos/include/mach/regs-audss.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-audss.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-audss.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-clock.h b/trunk/arch/arm/mach-exynos/include/mach/regs-clock.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-clock.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-clock.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-gpio.h b/trunk/arch/arm/mach-exynos/include/mach/regs-gpio.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-gpio.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-gpio.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-irq.h b/trunk/arch/arm/mach-exynos/include/mach/regs-irq.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-irq.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-irq.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-mct.h b/trunk/arch/arm/mach-exynos/include/mach/regs-mct.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-mct.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-mct.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-mem.h b/trunk/arch/arm/mach-exynos/include/mach/regs-mem.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-mem.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-mem.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-pmu.h b/trunk/arch/arm/mach-exynos/include/mach/regs-pmu.h similarity index 69% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-pmu.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-pmu.h index cdf9b47c303c..4fff8e938fec 100644 --- a/trunk/arch/arm/mach-exynos4/include/mach/regs-pmu.h +++ b/trunk/arch/arm/mach-exynos/include/mach/regs-pmu.h @@ -25,9 +25,10 @@ #define S5P_USE_STANDBY_WFI0 (1 << 16) #define S5P_USE_STANDBY_WFI1 (1 << 17) +#define S5P_USE_STANDBYWFI_ISP_ARM (1 << 18) #define S5P_USE_STANDBY_WFE0 (1 << 24) #define S5P_USE_STANDBY_WFE1 (1 << 25) -#define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) +#define S5P_USE_STANDBYWFE_ISP_ARM (1 << 26) #define S5P_SWRESET S5P_PMUREG(0x0400) @@ -35,15 +36,17 @@ #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) -#define S5P_USBHOST_PHY_CONTROL S5P_PMUREG(0x0708) -#define S5P_USBHOST_PHY_ENABLE (1 << 0) +#define S5P_HDMI_PHY_CONTROL S5P_PMUREG(0x0700) +#define S5P_HDMI_PHY_ENABLE (1 << 0) + +#define S5P_DAC_PHY_CONTROL S5P_PMUREG(0x070C) +#define S5P_DAC_PHY_ENABLE (1 << 0) #define S5P_MIPI_DPHY_CONTROL(n) S5P_PMUREG(0x0710 + (n) * 4) #define S5P_MIPI_DPHY_ENABLE (1 << 0) #define S5P_MIPI_DPHY_SRESETN (1 << 1) #define S5P_MIPI_DPHY_MRESETN (1 << 2) -#define S5P_PMU_SATA_PHY_CONTROL S5P_PMUREG(0x0720) #define S5P_INFORM0 S5P_PMUREG(0x0800) #define S5P_INFORM1 S5P_PMUREG(0x0804) #define S5P_INFORM2 S5P_PMUREG(0x0808) @@ -76,7 +79,6 @@ #define S5P_CMU_CLKSTOP_MFC_LOWPWR S5P_PMUREG(0x1148) #define S5P_CMU_CLKSTOP_G3D_LOWPWR S5P_PMUREG(0x114C) #define S5P_CMU_CLKSTOP_LCD0_LOWPWR S5P_PMUREG(0x1150) -#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) #define S5P_CMU_CLKSTOP_MAUDIO_LOWPWR S5P_PMUREG(0x1158) #define S5P_CMU_CLKSTOP_GPS_LOWPWR S5P_PMUREG(0x115C) #define S5P_CMU_RESET_CAM_LOWPWR S5P_PMUREG(0x1160) @@ -84,7 +86,6 @@ #define S5P_CMU_RESET_MFC_LOWPWR S5P_PMUREG(0x1168) #define S5P_CMU_RESET_G3D_LOWPWR S5P_PMUREG(0x116C) #define S5P_CMU_RESET_LCD0_LOWPWR S5P_PMUREG(0x1170) -#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174) #define S5P_CMU_RESET_MAUDIO_LOWPWR S5P_PMUREG(0x1178) #define S5P_CMU_RESET_GPS_LOWPWR S5P_PMUREG(0x117C) #define S5P_TOP_BUS_LOWPWR S5P_PMUREG(0x1180) @@ -92,14 +93,11 @@ #define S5P_TOP_PWR_LOWPWR S5P_PMUREG(0x1188) #define S5P_LOGIC_RESET_LOWPWR S5P_PMUREG(0x11A0) #define S5P_ONENAND_MEM_LOWPWR S5P_PMUREG(0x11C0) -#define S5P_MODIMIF_MEM_LOWPWR S5P_PMUREG(0x11C4) #define S5P_G2D_ACP_MEM_LOWPWR S5P_PMUREG(0x11C8) #define S5P_USBOTG_MEM_LOWPWR S5P_PMUREG(0x11CC) #define S5P_HSMMC_MEM_LOWPWR S5P_PMUREG(0x11D0) #define S5P_CSSYS_MEM_LOWPWR S5P_PMUREG(0x11D4) #define S5P_SECSS_MEM_LOWPWR S5P_PMUREG(0x11D8) -#define S5P_PCIE_MEM_LOWPWR S5P_PMUREG(0x11E0) -#define S5P_SATA_MEM_LOWPWR S5P_PMUREG(0x11E4) #define S5P_PAD_RETENTION_DRAM_LOWPWR S5P_PMUREG(0x1200) #define S5P_PAD_RETENTION_MAUDIO_LOWPWR S5P_PMUREG(0x1204) #define S5P_PAD_RETENTION_GPIO_LOWPWR S5P_PMUREG(0x1220) @@ -120,7 +118,6 @@ #define S5P_MFC_LOWPWR S5P_PMUREG(0x1388) #define S5P_G3D_LOWPWR S5P_PMUREG(0x138C) #define S5P_LCD0_LOWPWR S5P_PMUREG(0x1390) -#define S5P_LCD1_LOWPWR S5P_PMUREG(0x1394) #define S5P_MAUDIO_LOWPWR S5P_PMUREG(0x1398) #define S5P_GPS_LOWPWR S5P_PMUREG(0x139C) #define S5P_GPS_ALIVE_LOWPWR S5P_PMUREG(0x13A0) @@ -156,7 +153,6 @@ #define S5P_PMU_MFC_CONF S5P_PMUREG(0x3C40) #define S5P_PMU_G3D_CONF S5P_PMUREG(0x3C60) #define S5P_PMU_LCD0_CONF S5P_PMUREG(0x3C80) -#define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) #define S5P_PMU_GPS_CONF S5P_PMUREG(0x3CE0) #define S5P_PMU_SATA_PHY_CONTROL_EN 0x1 @@ -165,4 +161,60 @@ #define S5P_CHECK_SLEEP 0x00000BAD +/* Only for EXYNOS4210 */ +#define S5P_USBHOST_PHY_CONTROL S5P_PMUREG(0x0708) +#define S5P_USBHOST_PHY_ENABLE (1 << 0) + +#define S5P_PMU_SATA_PHY_CONTROL S5P_PMUREG(0x0720) + +#define S5P_CMU_CLKSTOP_LCD1_LOWPWR S5P_PMUREG(0x1154) +#define S5P_CMU_RESET_LCD1_LOWPWR S5P_PMUREG(0x1174) +#define S5P_MODIMIF_MEM_LOWPWR S5P_PMUREG(0x11C4) +#define S5P_PCIE_MEM_LOWPWR S5P_PMUREG(0x11E0) +#define S5P_SATA_MEM_LOWPWR S5P_PMUREG(0x11E4) +#define S5P_LCD1_LOWPWR S5P_PMUREG(0x1394) + +#define S5P_PMU_LCD1_CONF S5P_PMUREG(0x3CA0) + +/* Only for EXYNOS4212 */ +#define S5P_ISP_ARM_LOWPWR S5P_PMUREG(0x1050) +#define S5P_DIS_IRQ_ISP_ARM_LOCAL_LOWPWR S5P_PMUREG(0x1054) +#define S5P_DIS_IRQ_ISP_ARM_CENTRAL_LOWPWR S5P_PMUREG(0x1058) +#define S5P_CMU_ACLKSTOP_COREBLK_LOWPWR S5P_PMUREG(0x1110) +#define S5P_CMU_SCLKSTOP_COREBLK_LOWPWR S5P_PMUREG(0x1114) +#define S5P_CMU_RESET_COREBLK_LOWPWR S5P_PMUREG(0x111C) +#define S5P_MPLLUSER_SYSCLK_LOWPWR S5P_PMUREG(0x1130) +#define S5P_CMU_CLKSTOP_ISP_LOWPWR S5P_PMUREG(0x1154) +#define S5P_CMU_RESET_ISP_LOWPWR S5P_PMUREG(0x1174) +#define S5P_TOP_BUS_COREBLK_LOWPWR S5P_PMUREG(0x1190) +#define S5P_TOP_RETENTION_COREBLK_LOWPWR S5P_PMUREG(0x1194) +#define S5P_TOP_PWR_COREBLK_LOWPWR S5P_PMUREG(0x1198) +#define S5P_OSCCLK_GATE_LOWPWR S5P_PMUREG(0x11A4) +#define S5P_LOGIC_RESET_COREBLK_LOWPWR S5P_PMUREG(0x11B0) +#define S5P_OSCCLK_GATE_COREBLK_LOWPWR S5P_PMUREG(0x11B4) +#define S5P_HSI_MEM_LOWPWR S5P_PMUREG(0x11C4) +#define S5P_ROTATOR_MEM_LOWPWR S5P_PMUREG(0x11DC) +#define S5P_PAD_RETENTION_GPIO_COREBLK_LOWPWR S5P_PMUREG(0x123C) +#define S5P_PAD_ISOLATION_COREBLK_LOWPWR S5P_PMUREG(0x1250) +#define S5P_GPIO_MODE_COREBLK_LOWPWR S5P_PMUREG(0x1320) +#define S5P_TOP_ASB_RESET_LOWPWR S5P_PMUREG(0x1344) +#define S5P_TOP_ASB_ISOLATION_LOWPWR S5P_PMUREG(0x1348) +#define S5P_ISP_LOWPWR S5P_PMUREG(0x1394) +#define S5P_DRAM_FREQ_DOWN_LOWPWR S5P_PMUREG(0x13B0) +#define S5P_DDRPHY_DLLOFF_LOWPWR S5P_PMUREG(0x13B4) +#define S5P_CMU_SYSCLK_ISP_LOWPWR S5P_PMUREG(0x13B8) +#define S5P_CMU_SYSCLK_GPS_LOWPWR S5P_PMUREG(0x13BC) +#define S5P_LPDDR_PHY_DLL_LOCK_LOWPWR S5P_PMUREG(0x13C0) + +#define S5P_ARM_L2_0_OPTION S5P_PMUREG(0x2608) +#define S5P_ARM_L2_1_OPTION S5P_PMUREG(0x2628) +#define S5P_ONENAND_MEM_OPTION S5P_PMUREG(0x2E08) +#define S5P_HSI_MEM_OPTION S5P_PMUREG(0x2E28) +#define S5P_G2D_ACP_MEM_OPTION S5P_PMUREG(0x2E48) +#define S5P_USBOTG_MEM_OPTION S5P_PMUREG(0x2E68) +#define S5P_HSMMC_MEM_OPTION S5P_PMUREG(0x2E88) +#define S5P_CSSYS_MEM_OPTION S5P_PMUREG(0x2EA8) +#define S5P_SECSS_MEM_OPTION S5P_PMUREG(0x2EC8) +#define S5P_ROTATOR_MEM_OPTION S5P_PMUREG(0x2F48) + #endif /* __ASM_ARCH_REGS_PMU_H */ diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-sysmmu.h b/trunk/arch/arm/mach-exynos/include/mach/regs-sysmmu.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-sysmmu.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-sysmmu.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h b/trunk/arch/arm/mach-exynos/include/mach/regs-usb-phy.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/regs-usb-phy.h rename to trunk/arch/arm/mach-exynos/include/mach/regs-usb-phy.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/sysmmu.h b/trunk/arch/arm/mach-exynos/include/mach/sysmmu.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/sysmmu.h rename to trunk/arch/arm/mach-exynos/include/mach/sysmmu.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/system.h b/trunk/arch/arm/mach-exynos/include/mach/system.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/system.h rename to trunk/arch/arm/mach-exynos/include/mach/system.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/timex.h b/trunk/arch/arm/mach-exynos/include/mach/timex.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/timex.h rename to trunk/arch/arm/mach-exynos/include/mach/timex.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/uncompress.h b/trunk/arch/arm/mach-exynos/include/mach/uncompress.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/uncompress.h rename to trunk/arch/arm/mach-exynos/include/mach/uncompress.h diff --git a/trunk/arch/arm/mach-exynos4/include/mach/vmalloc.h b/trunk/arch/arm/mach-exynos/include/mach/vmalloc.h similarity index 100% rename from trunk/arch/arm/mach-exynos4/include/mach/vmalloc.h rename to trunk/arch/arm/mach-exynos/include/mach/vmalloc.h diff --git a/trunk/arch/arm/mach-exynos4/init.c b/trunk/arch/arm/mach-exynos/init.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/init.c rename to trunk/arch/arm/mach-exynos/init.c diff --git a/trunk/arch/arm/mach-exynos4/irq-combiner.c b/trunk/arch/arm/mach-exynos/irq-combiner.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/irq-combiner.c rename to trunk/arch/arm/mach-exynos/irq-combiner.c diff --git a/trunk/arch/arm/mach-exynos4/irq-eint.c b/trunk/arch/arm/mach-exynos/irq-eint.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/irq-eint.c rename to trunk/arch/arm/mach-exynos/irq-eint.c diff --git a/trunk/arch/arm/mach-exynos4/mach-armlex4210.c b/trunk/arch/arm/mach-exynos/mach-armlex4210.c similarity index 100% rename from trunk/arch/arm/mach-exynos4/mach-armlex4210.c rename to trunk/arch/arm/mach-exynos/mach-armlex4210.c diff --git a/trunk/arch/arm/mach-exynos4/mach-nuri.c b/trunk/arch/arm/mach-exynos/mach-nuri.c similarity index 85% rename from trunk/arch/arm/mach-exynos4/mach-nuri.c rename to trunk/arch/arm/mach-exynos/mach-nuri.c index 6e0536818bf5..236bbe187163 100644 --- a/trunk/arch/arm/mach-exynos4/mach-nuri.c +++ b/trunk/arch/arm/mach-exynos/mach-nuri.c @@ -27,15 +27,20 @@ #include #include