提交 ab2a0e0d 编写于 作者: A Arnd Bergmann

Merge branch 'next-samsung-cleanup' of...

Merge branch 'next-samsung-cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup
...@@ -2,13 +2,7 @@ Intro ...@@ -2,13 +2,7 @@ Intro
===== =====
This document is designed to provide a list of the minimum levels of This document is designed to provide a list of the minimum levels of
software necessary to run the 2.6 kernels, as well as provide brief software necessary to run the 3.0 kernels.
instructions regarding any other "Gotchas" users may encounter when
trying life on the Bleeding Edge. If upgrading from a pre-2.4.x
kernel, please consult the Changes file included with 2.4.x kernels for
additional information; most of that information will not be repeated
here. Basically, this document assumes that your system is already
functional and running at least 2.4.x kernels.
This document is originally based on my "Changes" file for 2.0.x kernels This document is originally based on my "Changes" file for 2.0.x kernels
and therefore owes credit to the same people as that file (Jared Mauch, and therefore owes credit to the same people as that file (Jared Mauch,
...@@ -22,11 +16,10 @@ Upgrade to at *least* these software revisions before thinking you've ...@@ -22,11 +16,10 @@ Upgrade to at *least* these software revisions before thinking you've
encountered a bug! If you're unsure what version you're currently encountered a bug! If you're unsure what version you're currently
running, the suggested command should tell you. running, the suggested command should tell you.
Again, keep in mind that this list assumes you are already Again, keep in mind that this list assumes you are already functionally
functionally running a Linux 2.4 kernel. Also, not all tools are running a Linux kernel. Also, not all tools are necessary on all
necessary on all systems; obviously, if you don't have any ISDN systems; obviously, if you don't have any ISDN hardware, for example,
hardware, for example, you probably needn't concern yourself with you probably needn't concern yourself with isdn4k-utils.
isdn4k-utils.
o Gnu C 3.2 # gcc --version o Gnu C 3.2 # gcc --version
o Gnu make 3.80 # make --version o Gnu make 3.80 # make --version
...@@ -114,12 +107,12 @@ Ksymoops ...@@ -114,12 +107,12 @@ Ksymoops
If the unthinkable happens and your kernel oopses, you may need the If the unthinkable happens and your kernel oopses, you may need the
ksymoops tool to decode it, but in most cases you don't. ksymoops tool to decode it, but in most cases you don't.
In the 2.6 kernel it is generally preferred to build the kernel with It is generally preferred to build the kernel with CONFIG_KALLSYMS so
CONFIG_KALLSYMS so that it produces readable dumps that can be used as-is that it produces readable dumps that can be used as-is (this also
(this also produces better output than ksymoops). produces better output than ksymoops). If for some reason your kernel
If for some reason your kernel is not build with CONFIG_KALLSYMS and is not build with CONFIG_KALLSYMS and you have no way to rebuild and
you have no way to rebuild and reproduce the Oops with that option, then reproduce the Oops with that option, then you can still decode that Oops
you can still decode that Oops with ksymoops. with ksymoops.
Module-Init-Tools Module-Init-Tools
----------------- -----------------
...@@ -261,8 +254,8 @@ needs to be recompiled or (preferably) upgraded. ...@@ -261,8 +254,8 @@ needs to be recompiled or (preferably) upgraded.
NFS-utils NFS-utils
--------- ---------
In 2.4 and earlier kernels, the nfs server needed to know about any In ancient (2.4 and earlier) kernels, the nfs server needed to know
client that expected to be able to access files via NFS. This about any client that expected to be able to access files via NFS. This
information would be given to the kernel by "mountd" when the client information would be given to the kernel by "mountd" when the client
mounted the filesystem, or by "exportfs" at system startup. exportfs mounted the filesystem, or by "exportfs" at system startup. exportfs
would take information about active clients from /var/lib/nfs/rmtab. would take information about active clients from /var/lib/nfs/rmtab.
...@@ -272,11 +265,11 @@ which is not always easy, particularly when trying to implement ...@@ -272,11 +265,11 @@ which is not always easy, particularly when trying to implement
fail-over. Even when the system is working well, rmtab suffers from fail-over. Even when the system is working well, rmtab suffers from
getting lots of old entries that never get removed. getting lots of old entries that never get removed.
With 2.6 we have the option of having the kernel tell mountd when it With modern kernels we have the option of having the kernel tell mountd
gets a request from an unknown host, and mountd can give appropriate when it gets a request from an unknown host, and mountd can give
export information to the kernel. This removes the dependency on appropriate export information to the kernel. This removes the
rmtab and means that the kernel only needs to know about currently dependency on rmtab and means that the kernel only needs to know about
active clients. currently active clients.
To enable this new functionality, you need to: To enable this new functionality, you need to:
......
...@@ -680,8 +680,8 @@ ones already enabled by DEBUG. ...@@ -680,8 +680,8 @@ ones already enabled by DEBUG.
Chapter 14: Allocating memory Chapter 14: Allocating memory
The kernel provides the following general purpose memory allocators: The kernel provides the following general purpose memory allocators:
kmalloc(), kzalloc(), kcalloc(), and vmalloc(). Please refer to the API kmalloc(), kzalloc(), kcalloc(), vmalloc(), and vzalloc(). Please refer to
documentation for further information about them. the API documentation for further information about them.
The preferred form for passing a size of a struct is the following: The preferred form for passing a size of a struct is the following:
......
...@@ -77,7 +77,7 @@ Throttling/Upper Limit policy ...@@ -77,7 +77,7 @@ Throttling/Upper Limit policy
- Specify a bandwidth rate on particular device for root group. The format - Specify a bandwidth rate on particular device for root group. The format
for policy is "<major>:<minor> <byes_per_second>". for policy is "<major>:<minor> <byes_per_second>".
echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.read_bps_device echo "8:16 1048576" > /sys/fs/cgroup/blkio/blkio.throttle.read_bps_device
Above will put a limit of 1MB/second on reads happening for root group Above will put a limit of 1MB/second on reads happening for root group
on device having major/minor number 8:16. on device having major/minor number 8:16.
...@@ -90,7 +90,7 @@ Throttling/Upper Limit policy ...@@ -90,7 +90,7 @@ Throttling/Upper Limit policy
1024+0 records out 1024+0 records out
4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s 4194304 bytes (4.2 MB) copied, 4.0001 s, 1.0 MB/s
Limits for writes can be put using blkio.write_bps_device file. Limits for writes can be put using blkio.throttle.write_bps_device file.
Hierarchical Cgroups Hierarchical Cgroups
==================== ====================
...@@ -286,28 +286,28 @@ Throttling/Upper limit policy files ...@@ -286,28 +286,28 @@ Throttling/Upper limit policy files
specified in bytes per second. Rules are per deivce. Following is specified in bytes per second. Rules are per deivce. Following is
the format. the format.
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.read_bps_device echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.read_bps_device
- blkio.throttle.write_bps_device - blkio.throttle.write_bps_device
- Specifies upper limit on WRITE rate to the device. IO rate is - Specifies upper limit on WRITE rate to the device. IO rate is
specified in bytes per second. Rules are per deivce. Following is specified in bytes per second. Rules are per deivce. Following is
the format. the format.
echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.write_bps_device echo "<major>:<minor> <rate_bytes_per_second>" > /cgrp/blkio.throttle.write_bps_device
- blkio.throttle.read_iops_device - blkio.throttle.read_iops_device
- Specifies upper limit on READ rate from the device. IO rate is - Specifies upper limit on READ rate from the device. IO rate is
specified in IO per second. Rules are per deivce. Following is specified in IO per second. Rules are per deivce. Following is
the format. the format.
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.read_iops_device echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.read_iops_device
- blkio.throttle.write_iops_device - blkio.throttle.write_iops_device
- Specifies upper limit on WRITE rate to the device. IO rate is - Specifies upper limit on WRITE rate to the device. IO rate is
specified in io per second. Rules are per deivce. Following is specified in io per second. Rules are per deivce. Following is
the format. the format.
echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.write_iops_device echo "<major>:<minor> <rate_io_per_second>" > /cgrp/blkio.throttle.write_iops_device
Note: If both BW and IOPS rules are specified for a device, then IO is Note: If both BW and IOPS rules are specified for a device, then IO is
subjectd to both the constraints. subjectd to both the constraints.
......
...@@ -583,3 +583,25 @@ Why: Superseded by the UVCIOC_CTRL_QUERY ioctl. ...@@ -583,3 +583,25 @@ Why: Superseded by the UVCIOC_CTRL_QUERY ioctl.
Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Who: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---------------------------- ----------------------------
What: For VIDIOC_S_FREQUENCY the type field must match the device node's type.
If not, return -EINVAL.
When: 3.2
Why: It makes no sense to switch the tuner to radio mode by calling
VIDIOC_S_FREQUENCY on a video node, or to switch the tuner to tv mode by
calling VIDIOC_S_FREQUENCY on a radio node. This is the first step of a
move to more consistent handling of tv and radio tuners.
Who: Hans Verkuil <hans.verkuil@cisco.com>
----------------------------
What: Opening a radio device node will no longer automatically switch the
tuner mode from tv to radio.
When: 3.3
Why: Just opening a V4L device should not change the state of the hardware
like that. It's very unexpected and against the V4L spec. Instead, you
switch to radio mode by calling VIDIOC_S_FREQUENCY. This is the second
and last step of the move to consistent handling of tv and radio tuners.
Who: Hans Verkuil <hans.verkuil@cisco.com>
----------------------------
...@@ -673,6 +673,22 @@ storage request to complete, or it may attempt to cancel the storage request - ...@@ -673,6 +673,22 @@ storage request to complete, or it may attempt to cancel the storage request -
in which case the page will not be stored in the cache this time. in which case the page will not be stored in the cache this time.
BULK INODE PAGE UNCACHE
-----------------------
A convenience routine is provided to perform an uncache on all the pages
attached to an inode. This assumes that the pages on the inode correspond on a
1:1 basis with the pages in the cache.
void fscache_uncache_all_inode_pages(struct fscache_cookie *cookie,
struct inode *inode);
This takes the netfs cookie that the pages were cached with and the inode that
the pages are attached to. This function will wait for pages to finish being
written to the cache and for the cache to finish with the page generally. No
error is returned.
========================== ==========================
INDEX AND DATA FILE UPDATE INDEX AND DATA FILE UPDATE
========================== ==========================
......
...@@ -2015,6 +2015,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. ...@@ -2015,6 +2015,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
the default. the default.
off: Turn ECRC off off: Turn ECRC off
on: Turn ECRC on. on: Turn ECRC on.
realloc reallocate PCI resources if allocations done by BIOS
are erroneous.
pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power pcie_aspm= [PCIE] Forcibly enable or disable PCIe Active State Power
Management. Management.
......
...@@ -534,6 +534,8 @@ Events that are never propagated by the driver: ...@@ -534,6 +534,8 @@ Events that are never propagated by the driver:
0x2404 System is waking up from hibernation to undock 0x2404 System is waking up from hibernation to undock
0x2405 System is waking up from hibernation to eject bay 0x2405 System is waking up from hibernation to eject bay
0x5010 Brightness level changed/control event 0x5010 Brightness level changed/control event
0x6000 KEYBOARD: Numlock key pressed
0x6005 KEYBOARD: Fn key pressed (TO BE VERIFIED)
Events that are propagated by the driver to userspace: Events that are propagated by the driver to userspace:
...@@ -545,6 +547,8 @@ Events that are propagated by the driver to userspace: ...@@ -545,6 +547,8 @@ Events that are propagated by the driver to userspace:
0x3006 Bay hotplug request (hint to power up SATA link when 0x3006 Bay hotplug request (hint to power up SATA link when
the optical drive tray is ejected) the optical drive tray is ejected)
0x4003 Undocked (see 0x2x04), can sleep again 0x4003 Undocked (see 0x2x04), can sleep again
0x4010 Docked into hotplug port replicator (non-ACPI dock)
0x4011 Undocked from hotplug port replicator (non-ACPI dock)
0x500B Tablet pen inserted into its storage bay 0x500B Tablet pen inserted into its storage bay
0x500C Tablet pen removed from its storage bay 0x500C Tablet pen removed from its storage bay
0x6011 ALARM: battery is too hot 0x6011 ALARM: battery is too hot
...@@ -552,6 +556,7 @@ Events that are propagated by the driver to userspace: ...@@ -552,6 +556,7 @@ Events that are propagated by the driver to userspace:
0x6021 ALARM: a sensor is too hot 0x6021 ALARM: a sensor is too hot
0x6022 ALARM: a sensor is extremely hot 0x6022 ALARM: a sensor is extremely hot
0x6030 System thermal table changed 0x6030 System thermal table changed
0x6040 Nvidia Optimus/AC adapter related (TO BE VERIFIED)
Battery nearly empty alarms are a last resort attempt to get the Battery nearly empty alarms are a last resort attempt to get the
operating system to hibernate or shutdown cleanly (0x2313), or shutdown operating system to hibernate or shutdown cleanly (0x2313), or shutdown
......
...@@ -13,18 +13,8 @@ static DEFINE_SPINLOCK(xxx_lock); ...@@ -13,18 +13,8 @@ static DEFINE_SPINLOCK(xxx_lock);
The above is always safe. It will disable interrupts _locally_, but the The above is always safe. It will disable interrupts _locally_, but the
spinlock itself will guarantee the global lock, so it will guarantee that spinlock itself will guarantee the global lock, so it will guarantee that
there is only one thread-of-control within the region(s) protected by that there is only one thread-of-control within the region(s) protected by that
lock. This works well even under UP. The above sequence under UP lock. This works well even under UP also, so the code does _not_ need to
essentially is just the same as doing worry about UP vs SMP issues: the spinlocks work correctly under both.
unsigned long flags;
save_flags(flags); cli();
... critical section ...
restore_flags(flags);
so the code does _not_ need to worry about UP vs SMP issues: the spinlocks
work correctly under both (and spinlocks are actually more efficient on
architectures that allow doing the "save_flags + cli" in one operation).
NOTE! Implications of spin_locks for memory are further described in: NOTE! Implications of spin_locks for memory are further described in:
...@@ -36,27 +26,7 @@ The above is usually pretty simple (you usually need and want only one ...@@ -36,27 +26,7 @@ The above is usually pretty simple (you usually need and want only one
spinlock for most things - using more than one spinlock can make things a spinlock for most things - using more than one spinlock can make things a
lot more complex and even slower and is usually worth it only for lot more complex and even slower and is usually worth it only for
sequences that you _know_ need to be split up: avoid it at all cost if you sequences that you _know_ need to be split up: avoid it at all cost if you
aren't sure). HOWEVER, it _does_ mean that if you have some code that does aren't sure).
cli();
.. critical section ..
sti();
and another sequence that does
spin_lock_irqsave(flags);
.. critical section ..
spin_unlock_irqrestore(flags);
then they are NOT mutually exclusive, and the critical regions can happen
at the same time on two different CPU's. That's fine per se, but the
critical regions had better be critical for different things (ie they
can't stomp on each other).
The above is a problem mainly if you end up mixing code - for example the
routines in ll_rw_block() tend to use cli/sti to protect the atomicity of
their actions, and if a driver uses spinlocks instead then you should
think about issues like the above.
This is really the only really hard part about spinlocks: once you start This is really the only really hard part about spinlocks: once you start
using spinlocks they tend to expand to areas you might not have noticed using spinlocks they tend to expand to areas you might not have noticed
...@@ -120,11 +90,10 @@ Lesson 3: spinlocks revisited. ...@@ -120,11 +90,10 @@ Lesson 3: spinlocks revisited.
The single spin-lock primitives above are by no means the only ones. They The single spin-lock primitives above are by no means the only ones. They
are the most safe ones, and the ones that work under all circumstances, are the most safe ones, and the ones that work under all circumstances,
but partly _because_ they are safe they are also fairly slow. They are but partly _because_ they are safe they are also fairly slow. They are slower
much faster than a generic global cli/sti pair, but slower than they'd than they'd need to be, because they do have to disable interrupts
need to be, because they do have to disable interrupts (which is just a (which is just a single instruction on a x86, but it's an expensive one -
single instruction on a x86, but it's an expensive one - and on other and on other architectures it can be worse).
architectures it can be worse).
If you have a case where you have to protect a data structure across If you have a case where you have to protect a data structure across
several CPU's and you want to use spinlocks you can potentially use several CPU's and you want to use spinlocks you can potentially use
......
...@@ -594,6 +594,16 @@ S: Maintained ...@@ -594,6 +594,16 @@ S: Maintained
F: arch/arm/lib/floppydma.S F: arch/arm/lib/floppydma.S
F: arch/arm/include/asm/floppy.h F: arch/arm/include/asm/floppy.h
ARM PMU PROFILING AND DEBUGGING
M: Will Deacon <will.deacon@arm.com>
S: Maintained
F: arch/arm/kernel/perf_event*
F: arch/arm/oprofile/common.c
F: arch/arm/kernel/pmu.c
F: arch/arm/include/asm/pmu.h
F: arch/arm/kernel/hw_breakpoint.c
F: arch/arm/include/asm/hw_breakpoint.h
ARM PORT ARM PORT
M: Russell King <linux@arm.linux.org.uk> M: Russell King <linux@arm.linux.org.uk>
L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
...@@ -2197,7 +2207,7 @@ F: drivers/acpi/dock.c ...@@ -2197,7 +2207,7 @@ F: drivers/acpi/dock.c
DOCUMENTATION DOCUMENTATION
M: Randy Dunlap <rdunlap@xenotime.net> M: Randy Dunlap <rdunlap@xenotime.net>
L: linux-doc@vger.kernel.org L: linux-doc@vger.kernel.org
T: quilt oss.oracle.com/~rdunlap/kernel-doc-patches/current/ T: quilt http://userweb.kernel.org/~rdunlap/kernel-doc-patches/current/
S: Maintained S: Maintained
F: Documentation/ F: Documentation/
...@@ -4982,7 +4992,7 @@ F: drivers/power/power_supply* ...@@ -4982,7 +4992,7 @@ F: drivers/power/power_supply*
PNP SUPPORT PNP SUPPORT
M: Adam Belay <abelay@mit.edu> M: Adam Belay <abelay@mit.edu>
M: Bjorn Helgaas <bjorn.helgaas@hp.com> M: Bjorn Helgaas <bhelgaas@google.com>
S: Maintained S: Maintained
F: drivers/pnp/ F: drivers/pnp/
...@@ -6733,6 +6743,7 @@ F: fs/fat/ ...@@ -6733,6 +6743,7 @@ F: fs/fat/
VIDEOBUF2 FRAMEWORK VIDEOBUF2 FRAMEWORK
M: Pawel Osciak <pawel@osciak.com> M: Pawel Osciak <pawel@osciak.com>
M: Marek Szyprowski <m.szyprowski@samsung.com> M: Marek Szyprowski <m.szyprowski@samsung.com>
M: Kyungmin Park <kyungmin.park@samsung.com>
L: linux-media@vger.kernel.org L: linux-media@vger.kernel.org
S: Maintained S: Maintained
F: drivers/media/video/videobuf2-* F: drivers/media/video/videobuf2-*
......
VERSION = 3 VERSION = 3
PATCHLEVEL = 0 PATCHLEVEL = 0
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc6 EXTRAVERSION = -rc7
NAME = Sneaky Weasel NAME = Sneaky Weasel
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -682,6 +682,7 @@ config ARCH_S3C2410 ...@@ -682,6 +682,7 @@ config ARCH_S3C2410
select GENERIC_GPIO select GENERIC_GPIO
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select ARCH_USES_GETTIMEOFFSET select ARCH_USES_GETTIMEOFFSET
select HAVE_S3C2410_I2C if I2C select HAVE_S3C2410_I2C if I2C
help help
...@@ -699,6 +700,7 @@ config ARCH_S3C64XX ...@@ -699,6 +700,7 @@ config ARCH_S3C64XX
select CPU_V6 select CPU_V6
select ARM_VIC select ARM_VIC
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select NO_IOPORT select NO_IOPORT
select ARCH_USES_GETTIMEOFFSET select ARCH_USES_GETTIMEOFFSET
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
...@@ -723,6 +725,8 @@ config ARCH_S5P64X0 ...@@ -723,6 +725,8 @@ config ARCH_S5P64X0
select CPU_V6 select CPU_V6
select GENERIC_GPIO select GENERIC_GPIO
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C2410_WATCHDOG if WATCHDOG
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_SCHED_CLOCK select HAVE_SCHED_CLOCK
...@@ -736,6 +740,7 @@ config ARCH_S5PC100 ...@@ -736,6 +740,7 @@ config ARCH_S5PC100
bool "Samsung S5PC100" bool "Samsung S5PC100"
select GENERIC_GPIO select GENERIC_GPIO
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select CPU_V7 select CPU_V7
select ARM_L1_CACHE_SHIFT_6 select ARM_L1_CACHE_SHIFT_6
select ARCH_USES_GETTIMEOFFSET select ARCH_USES_GETTIMEOFFSET
...@@ -751,6 +756,8 @@ config ARCH_S5PV210 ...@@ -751,6 +756,8 @@ config ARCH_S5PV210
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO select GENERIC_GPIO
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select CLKSRC_MMIO
select ARM_L1_CACHE_SHIFT_6 select ARM_L1_CACHE_SHIFT_6
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
...@@ -767,6 +774,7 @@ config ARCH_EXYNOS4 ...@@ -767,6 +774,7 @@ config ARCH_EXYNOS4
select ARCH_SPARSEMEM_ENABLE select ARCH_SPARSEMEM_ENABLE
select GENERIC_GPIO select GENERIC_GPIO
select HAVE_CLK select HAVE_CLK
select CLKDEV_LOOKUP
select ARCH_HAS_CPUFREQ select ARCH_HAS_CPUFREQ
select GENERIC_CLOCKEVENTS select GENERIC_CLOCKEVENTS
select HAVE_S3C_RTC if RTC_CLASS select HAVE_S3C_RTC if RTC_CLASS
......
...@@ -255,7 +255,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size, ...@@ -255,7 +255,7 @@ static inline dma_addr_t map_single(struct device *dev, void *ptr, size_t size,
if (buf == 0) { if (buf == 0) {
dev_err(dev, "%s: unable to map unsafe buffer %p!\n", dev_err(dev, "%s: unable to map unsafe buffer %p!\n",
__func__, ptr); __func__, ptr);
return 0; return ~0;
} }
dev_dbg(dev, dev_dbg(dev,
......
...@@ -583,7 +583,7 @@ static int armpmu_event_init(struct perf_event *event) ...@@ -583,7 +583,7 @@ static int armpmu_event_init(struct perf_event *event)
static void armpmu_enable(struct pmu *pmu) static void armpmu_enable(struct pmu *pmu)
{ {
/* Enable all of the perf events on hardware. */ /* Enable all of the perf events on hardware. */
int idx; int idx, enabled = 0;
struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events); struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
if (!armpmu) if (!armpmu)
...@@ -596,8 +596,10 @@ static void armpmu_enable(struct pmu *pmu) ...@@ -596,8 +596,10 @@ static void armpmu_enable(struct pmu *pmu)
continue; continue;
armpmu->enable(&event->hw, idx); armpmu->enable(&event->hw, idx);
enabled = 1;
} }
if (enabled)
armpmu->start(); armpmu->start();
} }
......
...@@ -73,6 +73,7 @@ __setup("fpe=", fpe_setup); ...@@ -73,6 +73,7 @@ __setup("fpe=", fpe_setup);
#endif #endif
extern void paging_init(struct machine_desc *desc); extern void paging_init(struct machine_desc *desc);
extern void sanity_check_meminfo(void);
extern void reboot_setup(char *str); extern void reboot_setup(char *str);
unsigned int processor_id; unsigned int processor_id;
...@@ -900,6 +901,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -900,6 +901,7 @@ void __init setup_arch(char **cmdline_p)
parse_early_param(); parse_early_param();
sanity_check_meminfo();
arm_memblock_init(&meminfo, mdesc); arm_memblock_init(&meminfo, mdesc);
paging_init(mdesc); paging_init(mdesc);
......
...@@ -115,7 +115,7 @@ static void __cpuinit twd_calibrate_rate(void) ...@@ -115,7 +115,7 @@ static void __cpuinit twd_calibrate_rate(void)
twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5); twd_timer_rate = (0xFFFFFFFFU - count) * (HZ / 5);
printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000, printk("%lu.%02luMHz.\n", twd_timer_rate / 1000000,
(twd_timer_rate / 1000000) % 100); (twd_timer_rate / 10000) % 100);
} }
} }
......
...@@ -251,9 +251,9 @@ static void ep93xx_uart_set_mctrl(struct amba_device *dev, ...@@ -251,9 +251,9 @@ static void ep93xx_uart_set_mctrl(struct amba_device *dev,
unsigned int mcr; unsigned int mcr;
mcr = 0; mcr = 0;
if (!(mctrl & TIOCM_RTS)) if (mctrl & TIOCM_RTS)
mcr |= 2; mcr |= 2;
if (!(mctrl & TIOCM_DTR)) if (mctrl & TIOCM_DTR)
mcr |= 1; mcr |= 1;
__raw_writel(mcr, base + EP93XX_UART_MCR_OFFSET); __raw_writel(mcr, base + EP93XX_UART_MCR_OFFSET);
......
...@@ -110,6 +110,8 @@ config MACH_SMDKC210 ...@@ -110,6 +110,8 @@ config MACH_SMDKC210
select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3 select S3C_DEV_HSMMC3
select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_BACKLIGHT
select EXYNOS4_DEV_PD select EXYNOS4_DEV_PD
select EXYNOS4_DEV_SYSMMU select EXYNOS4_DEV_SYSMMU
select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C1
...@@ -127,8 +129,10 @@ config MACH_SMDKV310 ...@@ -127,8 +129,10 @@ config MACH_SMDKV310
select S3C_DEV_HSMMC1 select S3C_DEV_HSMMC1
select S3C_DEV_HSMMC2 select S3C_DEV_HSMMC2
select S3C_DEV_HSMMC3 select S3C_DEV_HSMMC3
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_KEYPAD
select EXYNOS4_DEV_PD select EXYNOS4_DEV_PD
select SAMSUNG_DEV_PWM
select EXYNOS4_DEV_SYSMMU select EXYNOS4_DEV_SYSMMU
select EXYNOS4_SETUP_I2C1 select EXYNOS4_SETUP_I2C1
select EXYNOS4_SETUP_KEYPAD select EXYNOS4_SETUP_KEYPAD
......
此差异已折叠。
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fimc-core.h> #include <plat/fimc-core.h>
#include <plat/iic-core.h>
#include <mach/regs-irq.h> #include <mach/regs-irq.h>
...@@ -132,6 +133,11 @@ void __init exynos4_map_io(void) ...@@ -132,6 +133,11 @@ void __init exynos4_map_io(void)
s3c_fimc_setname(1, "exynos4-fimc"); s3c_fimc_setname(1, "exynos4-fimc");
s3c_fimc_setname(2, "exynos4-fimc"); s3c_fimc_setname(2, "exynos4-fimc");
s3c_fimc_setname(3, "exynos4-fimc"); s3c_fimc_setname(3, "exynos4-fimc");
/* The I2C bus controllers are directly compatible with s3c2440 */
s3c_i2c0_setname("s3c2440-i2c");
s3c_i2c1_setname("s3c2440-i2c");
s3c_i2c2_setname("s3c2440-i2c");
} }
void __init exynos4_init_clocks(int xtal) void __init exynos4_init_clocks(int xtal)
......
...@@ -330,7 +330,7 @@ struct platform_device exynos4_device_ac97 = { ...@@ -330,7 +330,7 @@ struct platform_device exynos4_device_ac97 = {
static int exynos4_spdif_cfg_gpio(struct platform_device *pdev) static int exynos4_spdif_cfg_gpio(struct platform_device *pdev)
{ {
s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 2, S3C_GPIO_SFN(3)); s3c_gpio_cfgpin_range(EXYNOS4_GPC1(0), 2, S3C_GPIO_SFN(4));
return 0; return 0;
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/linkage.h> #include <linux/linkage.h>
#include <linux/init.h> #include <linux/init.h>
__INIT __CPUINIT
/* /*
* exynos4 specific entry point for secondary CPUs. This provides * exynos4 specific entry point for secondary CPUs. This provides
......
#ifndef __MACH_CLKDEV_H__
#define __MACH_CLKDEV_H__
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do {} while (0)
#endif
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/smsc911x.h> #include <linux/smsc911x.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -27,6 +28,8 @@ ...@@ -27,6 +28,8 @@
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/iic.h> #include <plat/iic.h>
#include <plat/pd.h> #include <plat/pd.h>
#include <plat/gpio-cfg.h>
#include <plat/backlight.h>
#include <mach/map.h> #include <mach/map.h>
...@@ -191,6 +194,17 @@ static void __init smdkc210_smsc911x_init(void) ...@@ -191,6 +194,17 @@ static void __init smdkc210_smsc911x_init(void)
(0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
} }
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkc210_bl_gpio_info = {
.no = EXYNOS4_GPD0(1),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkc210_bl_data = {
.pwm_id = 1,
.pwm_period_ns = 1000,
};
static void __init smdkc210_map_io(void) static void __init smdkc210_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P_VA_CHIPID); s5p_init_io(NULL, 0, S5P_VA_CHIPID);
...@@ -210,6 +224,8 @@ static void __init smdkc210_machine_init(void) ...@@ -210,6 +224,8 @@ static void __init smdkc210_machine_init(void)
s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/pwm_backlight.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
...@@ -29,6 +30,8 @@ ...@@ -29,6 +30,8 @@
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/iic.h> #include <plat/iic.h>
#include <plat/pd.h> #include <plat/pd.h>
#include <plat/gpio-cfg.h>
#include <plat/backlight.h>
#include <mach/map.h> #include <mach/map.h>
...@@ -78,9 +81,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = { ...@@ -78,9 +81,7 @@ static struct s3c2410_uartcfg smdkv310_uartcfgs[] __initdata = {
}; };
static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = { static struct s3c_sdhci_platdata smdkv310_hsmmc0_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO, .cd_type = S3C_SDHCI_CD_INTERNAL,
.ext_cd_gpio = EXYNOS4_GPK0(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT #ifdef CONFIG_EXYNOS4_SDHCI_CH0_8BIT
.max_width = 8, .max_width = 8,
...@@ -96,9 +97,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = { ...@@ -96,9 +97,7 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc1_pdata __initdata = {
}; };
static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = { static struct s3c_sdhci_platdata smdkv310_hsmmc2_pdata __initdata = {
.cd_type = S3C_SDHCI_CD_GPIO, .cd_type = S3C_SDHCI_CD_INTERNAL,
.ext_cd_gpio = EXYNOS4_GPK2(2),
.ext_cd_gpio_invert = 1,
.clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT #ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
.max_width = 8, .max_width = 8,
...@@ -213,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void) ...@@ -213,6 +212,17 @@ static void __init smdkv310_smsc911x_init(void)
(0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1); (0x1 << S5P_SROM_BCX__TACS__SHIFT), S5P_SROM_BC1);
} }
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkv310_bl_gpio_info = {
.no = EXYNOS4_GPD0(1),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkv310_bl_data = {
.pwm_id = 1,
.pwm_period_ns = 1000,
};
static void __init smdkv310_map_io(void) static void __init smdkv310_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P_VA_CHIPID); s5p_init_io(NULL, 0, S5P_VA_CHIPID);
...@@ -234,6 +244,8 @@ static void __init smdkv310_machine_init(void) ...@@ -234,6 +244,8 @@ static void __init smdkv310_machine_init(void)
samsung_keypad_set_platdata(&smdkv310_keypad_data); samsung_keypad_set_platdata(&smdkv310_keypad_data);
samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
} }
......
...@@ -215,7 +215,7 @@ static struct omap_kp_platform_data ams_delta_kp_data __initdata = { ...@@ -215,7 +215,7 @@ static struct omap_kp_platform_data ams_delta_kp_data __initdata = {
.delay = 9, .delay = 9,
}; };
static struct platform_device ams_delta_kp_device __initdata = { static struct platform_device ams_delta_kp_device = {
.name = "omap-keypad", .name = "omap-keypad",
.id = -1, .id = -1,
.dev = { .dev = {
...@@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device __initdata = { ...@@ -225,12 +225,12 @@ static struct platform_device ams_delta_kp_device __initdata = {
.resource = ams_delta_kp_resources, .resource = ams_delta_kp_resources,
}; };
static struct platform_device ams_delta_lcd_device __initdata = { static struct platform_device ams_delta_lcd_device = {
.name = "lcd_ams_delta", .name = "lcd_ams_delta",
.id = -1, .id = -1,
}; };
static struct platform_device ams_delta_led_device __initdata = { static struct platform_device ams_delta_led_device = {
.name = "ams-delta-led", .name = "ams-delta-led",
.id = -1 .id = -1
}; };
...@@ -267,7 +267,7 @@ static struct soc_camera_link ams_delta_iclink = { ...@@ -267,7 +267,7 @@ static struct soc_camera_link ams_delta_iclink = {
.power = ams_delta_camera_power, .power = ams_delta_camera_power,
}; };
static struct platform_device ams_delta_camera_device __initdata = { static struct platform_device ams_delta_camera_device = {
.name = "soc-camera-pdrv", .name = "soc-camera-pdrv",
.id = 0, .id = 0,
.dev = { .dev = {
......
...@@ -41,7 +41,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = { ...@@ -41,7 +41,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_mpu_gpio_config = {
.bank_stride = 1, .bank_stride = 1,
}; };
static struct __initdata platform_device omap15xx_mpu_gpio = { static struct platform_device omap15xx_mpu_gpio = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 0, .id = 0,
.dev = { .dev = {
...@@ -70,7 +70,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = { ...@@ -70,7 +70,7 @@ static struct __initdata omap_gpio_platform_data omap15xx_gpio_config = {
.bank_width = 16, .bank_width = 16,
}; };
static struct __initdata platform_device omap15xx_gpio = { static struct platform_device omap15xx_gpio = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 1, .id = 1,
.dev = { .dev = {
......
...@@ -44,7 +44,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = { ...@@ -44,7 +44,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_mpu_gpio_config = {
.bank_stride = 1, .bank_stride = 1,
}; };
static struct __initdata platform_device omap16xx_mpu_gpio = { static struct platform_device omap16xx_mpu_gpio = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 0, .id = 0,
.dev = { .dev = {
...@@ -73,7 +73,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = { ...@@ -73,7 +73,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio1_config = {
.bank_width = 16, .bank_width = 16,
}; };
static struct __initdata platform_device omap16xx_gpio1 = { static struct platform_device omap16xx_gpio1 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 1, .id = 1,
.dev = { .dev = {
...@@ -102,7 +102,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = { ...@@ -102,7 +102,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio2_config = {
.bank_width = 16, .bank_width = 16,
}; };
static struct __initdata platform_device omap16xx_gpio2 = { static struct platform_device omap16xx_gpio2 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 2, .id = 2,
.dev = { .dev = {
...@@ -131,7 +131,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = { ...@@ -131,7 +131,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio3_config = {
.bank_width = 16, .bank_width = 16,
}; };
static struct __initdata platform_device omap16xx_gpio3 = { static struct platform_device omap16xx_gpio3 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 3, .id = 3,
.dev = { .dev = {
...@@ -160,7 +160,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = { ...@@ -160,7 +160,7 @@ static struct __initdata omap_gpio_platform_data omap16xx_gpio4_config = {
.bank_width = 16, .bank_width = 16,
}; };
static struct __initdata platform_device omap16xx_gpio4 = { static struct platform_device omap16xx_gpio4 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 4, .id = 4,
.dev = { .dev = {
......
...@@ -46,7 +46,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = { ...@@ -46,7 +46,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_mpu_gpio_config = {
.bank_stride = 2, .bank_stride = 2,
}; };
static struct __initdata platform_device omap7xx_mpu_gpio = { static struct platform_device omap7xx_mpu_gpio = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 0, .id = 0,
.dev = { .dev = {
...@@ -75,7 +75,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = { ...@@ -75,7 +75,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio1_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio1 = { static struct platform_device omap7xx_gpio1 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 1, .id = 1,
.dev = { .dev = {
...@@ -104,7 +104,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = { ...@@ -104,7 +104,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio2_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio2 = { static struct platform_device omap7xx_gpio2 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 2, .id = 2,
.dev = { .dev = {
...@@ -133,7 +133,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = { ...@@ -133,7 +133,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio3_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio3 = { static struct platform_device omap7xx_gpio3 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 3, .id = 3,
.dev = { .dev = {
...@@ -162,7 +162,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = { ...@@ -162,7 +162,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio4_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio4 = { static struct platform_device omap7xx_gpio4 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 4, .id = 4,
.dev = { .dev = {
...@@ -191,7 +191,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = { ...@@ -191,7 +191,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio5_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio5 = { static struct platform_device omap7xx_gpio5 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 5, .id = 5,
.dev = { .dev = {
...@@ -220,7 +220,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = { ...@@ -220,7 +220,7 @@ static struct __initdata omap_gpio_platform_data omap7xx_gpio6_config = {
.bank_width = 32, .bank_width = 32,
}; };
static struct __initdata platform_device omap7xx_gpio6 = { static struct platform_device omap7xx_gpio6 = {
.name = "omap_gpio", .name = "omap_gpio",
.id = 6, .id = 6,
.dev = { .dev = {
......
...@@ -538,7 +538,7 @@ static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = ...@@ -538,7 +538,7 @@ static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module =
.subdev_board_info = &rx51_si4713_board_info, .subdev_board_info = &rx51_si4713_board_info,
}; };
static struct platform_device rx51_si4713_dev __initdata_or_module = { static struct platform_device rx51_si4713_dev = {
.name = "radio-si4713", .name = "radio-si4713",
.id = -1, .id = -1,
.dev = { .dev = {
......
...@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable) ...@@ -95,12 +95,10 @@ static int s3c2412_upll_enable(struct clk *clk, int enable)
static struct clk clk_erefclk = { static struct clk clk_erefclk = {
.name = "erefclk", .name = "erefclk",
.id = -1,
}; };
static struct clk clk_urefclk = { static struct clk clk_urefclk = {
.name = "urefclk", .name = "urefclk",
.id = -1,
}; };
static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
...@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent) ...@@ -122,7 +120,6 @@ static int s3c2412_setparent_usysclk(struct clk *clk, struct clk *parent)
static struct clk clk_usysclk = { static struct clk clk_usysclk = {
.name = "usysclk", .name = "usysclk",
.id = -1,
.parent = &clk_xtal, .parent = &clk_xtal,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_usysclk, .set_parent = s3c2412_setparent_usysclk,
...@@ -132,13 +129,11 @@ static struct clk clk_usysclk = { ...@@ -132,13 +129,11 @@ static struct clk clk_usysclk = {
static struct clk clk_mrefclk = { static struct clk clk_mrefclk = {
.name = "mrefclk", .name = "mrefclk",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}; };
static struct clk clk_mdivclk = { static struct clk clk_mdivclk = {
.name = "mdivclk", .name = "mdivclk",
.parent = &clk_xtal, .parent = &clk_xtal,
.id = -1,
}; };
static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent) static int s3c2412_setparent_usbsrc(struct clk *clk, struct clk *parent)
...@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate) ...@@ -200,7 +195,6 @@ static int s3c2412_setrate_usbsrc(struct clk *clk, unsigned long rate)
static struct clk clk_usbsrc = { static struct clk clk_usbsrc = {
.name = "usbsrc", .name = "usbsrc",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_usbsrc, .get_rate = s3c2412_getrate_usbsrc,
.set_rate = s3c2412_setrate_usbsrc, .set_rate = s3c2412_setrate_usbsrc,
...@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent) ...@@ -228,7 +222,6 @@ static int s3c2412_setparent_msysclk(struct clk *clk, struct clk *parent)
static struct clk clk_msysclk = { static struct clk clk_msysclk = {
.name = "msysclk", .name = "msysclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_msysclk, .set_parent = s3c2412_setparent_msysclk,
}, },
...@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent) ...@@ -268,7 +261,6 @@ static int s3c2412_setparent_armclk(struct clk *clk, struct clk *parent)
static struct clk clk_armclk = { static struct clk clk_armclk = {
.name = "armclk", .name = "armclk",
.id = -1,
.parent = &clk_msysclk, .parent = &clk_msysclk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_parent = s3c2412_setparent_armclk, .set_parent = s3c2412_setparent_armclk,
...@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate) ...@@ -344,7 +336,6 @@ static int s3c2412_setrate_uart(struct clk *clk, unsigned long rate)
static struct clk clk_uart = { static struct clk clk_uart = {
.name = "uartclk", .name = "uartclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_uart, .get_rate = s3c2412_getrate_uart,
.set_rate = s3c2412_setrate_uart, .set_rate = s3c2412_setrate_uart,
...@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate) ...@@ -397,7 +388,6 @@ static int s3c2412_setrate_i2s(struct clk *clk, unsigned long rate)
static struct clk clk_i2s = { static struct clk clk_i2s = {
.name = "i2sclk", .name = "i2sclk",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_i2s, .get_rate = s3c2412_getrate_i2s,
.set_rate = s3c2412_setrate_i2s, .set_rate = s3c2412_setrate_i2s,
...@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate) ...@@ -449,7 +439,6 @@ static int s3c2412_setrate_cam(struct clk *clk, unsigned long rate)
static struct clk clk_cam = { static struct clk clk_cam = {
.name = "camif-upll", /* same as 2440 name */ .name = "camif-upll", /* same as 2440 name */
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c2412_getrate_cam, .get_rate = s3c2412_getrate_cam,
.set_rate = s3c2412_setrate_cam, .set_rate = s3c2412_setrate_cam,
...@@ -463,37 +452,31 @@ static struct clk clk_cam = { ...@@ -463,37 +452,31 @@ static struct clk clk_cam = {
static struct clk init_clocks_disable[] = { static struct clk init_clocks_disable[] = {
{ {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_NAND, .ctrlbit = S3C2412_CLKCON_NAND,
}, { }, {
.name = "sdi", .name = "sdi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_SDI, .ctrlbit = S3C2412_CLKCON_SDI,
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_ADC, .ctrlbit = S3C2412_CLKCON_ADC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_IIC, .ctrlbit = S3C2412_CLKCON_IIC,
}, { }, {
.name = "iis", .name = "iis",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_IIS, .ctrlbit = S3C2412_CLKCON_IIS,
}, { }, {
.name = "spi", .name = "spi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_SPI, .ctrlbit = S3C2412_CLKCON_SPI,
...@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = { ...@@ -503,96 +486,83 @@ static struct clk init_clocks_disable[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "dma", .name = "dma",
.id = 0,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA0, .ctrlbit = S3C2412_CLKCON_DMA0,
}, { }, {
.name = "dma", .name = "dma",
.id = 1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA1, .ctrlbit = S3C2412_CLKCON_DMA1,
}, { }, {
.name = "dma", .name = "dma",
.id = 2,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA2, .ctrlbit = S3C2412_CLKCON_DMA2,
}, { }, {
.name = "dma", .name = "dma",
.id = 3,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_DMA3, .ctrlbit = S3C2412_CLKCON_DMA3,
}, { }, {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_LCDC, .ctrlbit = S3C2412_CLKCON_LCDC,
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_GPIO, .ctrlbit = S3C2412_CLKCON_GPIO,
}, { }, {
.name = "usb-host", .name = "usb-host",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USBH, .ctrlbit = S3C2412_CLKCON_USBH,
}, { }, {
.name = "usb-device", .name = "usb-device",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USBD, .ctrlbit = S3C2412_CLKCON_USBD,
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_PWMT, .ctrlbit = S3C2412_CLKCON_PWMT,
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c2412-uart.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART0, .ctrlbit = S3C2412_CLKCON_UART0,
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c2412-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART1, .ctrlbit = S3C2412_CLKCON_UART1,
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c2412-uart.2",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_UART2, .ctrlbit = S3C2412_CLKCON_UART2,
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_RTC, .ctrlbit = S3C2412_CLKCON_RTC,
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = 0, .ctrlbit = 0,
}, { }, {
.name = "usb-bus-gadget", .name = "usb-bus-gadget",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USB_DEV48, .ctrlbit = S3C2412_CLKCON_USB_DEV48,
}, { }, {
.name = "usb-bus-host", .name = "usb-bus-host",
.id = -1,
.parent = &clk_usb_bus, .parent = &clk_usb_bus,
.enable = s3c2412_clkcon_enable, .enable = s3c2412_clkcon_enable,
.ctrlbit = S3C2412_CLKCON_USB_HOST48, .ctrlbit = S3C2412_CLKCON_USB_HOST48,
......
...@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -42,7 +42,7 @@ static struct clksrc_clk hsmmc_div[] = {
[0] = { [0] = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2416_CLKDIV2, .size = 2, .shift = 6 },
...@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -50,7 +50,7 @@ static struct clksrc_clk hsmmc_div[] = {
[1] = { [1] = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
...@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = { ...@@ -60,8 +60,8 @@ static struct clksrc_clk hsmmc_div[] = {
static struct clksrc_clk hsmmc_mux[] = { static struct clksrc_clk hsmmc_mux[] = {
[0] = { [0] = {
.clk = { .clk = {
.id = 0,
.name = "hsmmc-if", .name = "hsmmc-if",
.devname = "s3c-sdhci.0",
.ctrlbit = (1 << 6), .ctrlbit = (1 << 6),
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
}, },
...@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = { ...@@ -76,8 +76,8 @@ static struct clksrc_clk hsmmc_mux[] = {
}, },
[1] = { [1] = {
.clk = { .clk = {
.id = 1,
.name = "hsmmc-if", .name = "hsmmc-if",
.devname = "s3c-sdhci.1",
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
}, },
...@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = { ...@@ -94,7 +94,7 @@ static struct clksrc_clk hsmmc_mux[] = {
static struct clk hsmmc0_clk = { static struct clk hsmmc0_clk = {
.name = "hsmmc", .name = "hsmmc",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_h, .parent = &clk_h,
.enable = s3c2443_clkcon_enable_h, .enable = s3c2443_clkcon_enable_h,
.ctrlbit = S3C2416_HCLKCON_HSMMC0, .ctrlbit = S3C2416_HCLKCON_HSMMC0,
......
...@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate) ...@@ -90,14 +90,12 @@ static int s3c2440_camif_upll_setrate(struct clk *clk, unsigned long rate)
static struct clk s3c2440_clk_cam = { static struct clk s3c2440_clk_cam = {
.name = "camif", .name = "camif",
.id = -1,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA, .ctrlbit = S3C2440_CLKCON_CAMERA,
}; };
static struct clk s3c2440_clk_cam_upll = { static struct clk s3c2440_clk_cam_upll = {
.name = "camif-upll", .name = "camif-upll",
.id = -1,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.set_rate = s3c2440_camif_upll_setrate, .set_rate = s3c2440_camif_upll_setrate,
.round_rate = s3c2440_camif_upll_round, .round_rate = s3c2440_camif_upll_round,
...@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = { ...@@ -106,7 +104,6 @@ static struct clk s3c2440_clk_cam_upll = {
static struct clk s3c2440_clk_ac97 = { static struct clk s3c2440_clk_ac97 = {
.name = "ac97", .name = "ac97",
.id = -1,
.enable = s3c2410_clkcon_enable, .enable = s3c2410_clkcon_enable,
.ctrlbit = S3C2440_CLKCON_CAMERA, .ctrlbit = S3C2440_CLKCON_CAMERA,
}; };
......
...@@ -552,7 +552,7 @@ struct mini2440_features_t { ...@@ -552,7 +552,7 @@ struct mini2440_features_t {
struct platform_device *optional[8]; struct platform_device *optional[8];
}; };
static void mini2440_parse_features( static void __init mini2440_parse_features(
struct mini2440_features_t * features, struct mini2440_features_t * features,
const char * features_str ) const char * features_str )
{ {
......
...@@ -59,7 +59,6 @@ ...@@ -59,7 +59,6 @@
static struct clk clk_i2s_ext = { static struct clk clk_i2s_ext = {
.name = "i2s-ext", .name = "i2s-ext",
.id = -1,
}; };
/* armdiv /* armdiv
...@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate) ...@@ -139,7 +138,6 @@ static int s3c2443_armclk_setrate(struct clk *clk, unsigned long rate)
static struct clk clk_armdiv = { static struct clk clk_armdiv = {
.name = "armdiv", .name = "armdiv",
.id = -1,
.parent = &clk_msysclk.clk, .parent = &clk_msysclk.clk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.round_rate = s3c2443_armclk_roundrate, .round_rate = s3c2443_armclk_roundrate,
...@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = { ...@@ -160,7 +158,6 @@ static struct clk *clk_arm_sources[] = {
static struct clksrc_clk clk_arm = { static struct clksrc_clk clk_arm = {
.clk = { .clk = {
.name = "armclk", .name = "armclk",
.id = -1,
}, },
.sources = &(struct clksrc_sources) { .sources = &(struct clksrc_sources) {
.sources = clk_arm_sources, .sources = clk_arm_sources,
...@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = { ...@@ -177,7 +174,6 @@ static struct clksrc_clk clk_arm = {
static struct clksrc_clk clk_hsspi = { static struct clksrc_clk clk_hsspi = {
.clk = { .clk = {
.name = "hsspi", .name = "hsspi",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
.ctrlbit = S3C2443_SCLKCON_HSSPICLK, .ctrlbit = S3C2443_SCLKCON_HSSPICLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = { ...@@ -196,7 +192,7 @@ static struct clksrc_clk clk_hsspi = {
static struct clksrc_clk clk_hsmmc_div = { static struct clksrc_clk clk_hsmmc_div = {
.clk = { .clk = {
.name = "hsmmc-div", .name = "hsmmc-div",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 2, .shift = 6 },
...@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable) ...@@ -231,7 +227,7 @@ static int s3c2443_enable_hsmmc(struct clk *clk, int enable)
static struct clk clk_hsmmc = { static struct clk clk_hsmmc = {
.name = "hsmmc-if", .name = "hsmmc-if",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_hsmmc_div.clk, .parent = &clk_hsmmc_div.clk,
.enable = s3c2443_enable_hsmmc, .enable = s3c2443_enable_hsmmc,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
...@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = { ...@@ -248,7 +244,6 @@ static struct clk clk_hsmmc = {
static struct clksrc_clk clk_i2s_eplldiv = { static struct clksrc_clk clk_i2s_eplldiv = {
.clk = { .clk = {
.name = "i2s-eplldiv", .name = "i2s-eplldiv",
.id = -1,
.parent = &clk_esysclk.clk, .parent = &clk_esysclk.clk,
}, },
.reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, }, .reg_div = { .reg = S3C2443_CLKDIV1, .size = 4, .shift = 12, },
...@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = { ...@@ -271,7 +266,6 @@ struct clk *clk_i2s_srclist[] = {
static struct clksrc_clk clk_i2s = { static struct clksrc_clk clk_i2s = {
.clk = { .clk = {
.name = "i2s-if", .name = "i2s-if",
.id = -1,
.ctrlbit = S3C2443_SCLKCON_I2SCLK, .ctrlbit = S3C2443_SCLKCON_I2SCLK,
.enable = s3c2443_clkcon_enable_s, .enable = s3c2443_clkcon_enable_s,
...@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = { ...@@ -288,25 +282,23 @@ static struct clksrc_clk clk_i2s = {
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "sdi", .name = "sdi",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SDI, .ctrlbit = S3C2443_PCLKCON_SDI,
}, { }, {
.name = "iis", .name = "iis",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_IIS, .ctrlbit = S3C2443_PCLKCON_IIS,
}, { }, {
.name = "spi", .name = "spi",
.id = 0, .devname = "s3c2410-spi.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SPI0, .ctrlbit = S3C2443_PCLKCON_SPI0,
}, { }, {
.name = "spi", .name = "spi",
.id = 1, .devname = "s3c2410-spi.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c2443_clkcon_enable_p, .enable = s3c2443_clkcon_enable_p,
.ctrlbit = S3C2443_PCLKCON_SPI1, .ctrlbit = S3C2443_PCLKCON_SPI1,
......
...@@ -142,6 +142,7 @@ config MACH_SMDK6410 ...@@ -142,6 +142,7 @@ config MACH_SMDK6410
select S3C_DEV_USB_HOST select S3C_DEV_USB_HOST
select S3C_DEV_USB_HSOTG select S3C_DEV_USB_HSOTG
select S3C_DEV_WDT select S3C_DEV_WDT
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM select SAMSUNG_DEV_PWM
select HAVE_S3C2410_WATCHDOG if WATCHDOG select HAVE_S3C2410_WATCHDOG if WATCHDOG
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
static struct clk clk_ext_xtal_mux = { static struct clk clk_ext_xtal_mux = {
.name = "ext_xtal", .name = "ext_xtal",
.id = -1,
}; };
#define clk_fin_apll clk_ext_xtal_mux #define clk_fin_apll clk_ext_xtal_mux
...@@ -51,13 +50,11 @@ static struct clk clk_ext_xtal_mux = { ...@@ -51,13 +50,11 @@ static struct clk clk_ext_xtal_mux = {
struct clk clk_h2 = { struct clk clk_h2 = {
.name = "hclk2", .name = "hclk2",
.id = -1,
.rate = 0, .rate = 0,
}; };
struct clk clk_27m = { struct clk clk_27m = {
.name = "clk_27m", .name = "clk_27m",
.id = -1,
.rate = 27000000, .rate = 27000000,
}; };
...@@ -83,14 +80,12 @@ static int clk_48m_ctrl(struct clk *clk, int enable) ...@@ -83,14 +80,12 @@ static int clk_48m_ctrl(struct clk *clk, int enable)
struct clk clk_48m = { struct clk clk_48m = {
.name = "clk_48m", .name = "clk_48m",
.id = -1,
.rate = 48000000, .rate = 48000000,
.enable = clk_48m_ctrl, .enable = clk_48m_ctrl,
}; };
struct clk clk_xusbxti = { struct clk clk_xusbxti = {
.name = "xusbxti", .name = "xusbxti",
.id = -1,
.rate = 48000000, .rate = 48000000,
}; };
...@@ -130,109 +125,101 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable) ...@@ -130,109 +125,101 @@ int s3c64xx_sclk_ctrl(struct clk *clk, int enable)
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_RTC, .ctrlbit = S3C_CLKCON_PCLK_RTC,
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_TSADC, .ctrlbit = S3C_CLKCON_PCLK_TSADC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_IIC, .ctrlbit = S3C_CLKCON_PCLK_IIC,
}, { }, {
.name = "i2c", .name = "i2c",
.id = 1, .devname = "s3c2440-i2c.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C6410_CLKCON_PCLK_I2C1, .ctrlbit = S3C6410_CLKCON_PCLK_I2C1,
}, { }, {
.name = "iis", .name = "iis",
.id = 0, .devname = "samsung-i2s.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_IIS0, .ctrlbit = S3C_CLKCON_PCLK_IIS0,
}, { }, {
.name = "iis", .name = "iis",
.id = 1, .devname = "samsung-i2s.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_IIS1, .ctrlbit = S3C_CLKCON_PCLK_IIS1,
}, { }, {
#ifdef CONFIG_CPU_S3C6410 #ifdef CONFIG_CPU_S3C6410
.name = "iis", .name = "iis",
.id = -1, /* There's only one IISv4 port */
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C6410_CLKCON_PCLK_IIS2, .ctrlbit = S3C6410_CLKCON_PCLK_IIS2,
}, { }, {
#endif #endif
.name = "keypad", .name = "keypad",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_KEYPAD, .ctrlbit = S3C_CLKCON_PCLK_KEYPAD,
}, { }, {
.name = "spi", .name = "spi",
.id = 0, .devname = "s3c64xx-spi.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_SPI0, .ctrlbit = S3C_CLKCON_PCLK_SPI0,
}, { }, {
.name = "spi", .name = "spi",
.id = 1, .devname = "s3c64xx-spi.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_SPI1, .ctrlbit = S3C_CLKCON_PCLK_SPI1,
}, { }, {
.name = "spi_48m", .name = "spi_48m",
.id = 0, .devname = "s3c64xx-spi.0",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
.ctrlbit = S3C_CLKCON_SCLK_SPI0_48, .ctrlbit = S3C_CLKCON_SCLK_SPI0_48,
}, { }, {
.name = "spi_48m", .name = "spi_48m",
.id = 1, .devname = "s3c64xx-spi.1",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
.ctrlbit = S3C_CLKCON_SCLK_SPI1_48, .ctrlbit = S3C_CLKCON_SCLK_SPI1_48,
}, { }, {
.name = "48m", .name = "48m",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
.ctrlbit = S3C_CLKCON_SCLK_MMC0_48, .ctrlbit = S3C_CLKCON_SCLK_MMC0_48,
}, { }, {
.name = "48m", .name = "48m",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
.ctrlbit = S3C_CLKCON_SCLK_MMC1_48, .ctrlbit = S3C_CLKCON_SCLK_MMC1_48,
}, { }, {
.name = "48m", .name = "48m",
.id = 2, .devname = "s3c-sdhci.2",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
.ctrlbit = S3C_CLKCON_SCLK_MMC2_48, .ctrlbit = S3C_CLKCON_SCLK_MMC2_48,
}, { }, {
.name = "dma0", .name = "dma0",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_DMA0, .ctrlbit = S3C_CLKCON_HCLK_DMA0,
}, { }, {
.name = "dma1", .name = "dma1",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_DMA1, .ctrlbit = S3C_CLKCON_HCLK_DMA1,
...@@ -242,89 +229,81 @@ static struct clk init_clocks_off[] = { ...@@ -242,89 +229,81 @@ static struct clk init_clocks_off[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_LCD, .ctrlbit = S3C_CLKCON_HCLK_LCD,
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_GPIO, .ctrlbit = S3C_CLKCON_PCLK_GPIO,
}, { }, {
.name = "usb-host", .name = "usb-host",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_UHOST, .ctrlbit = S3C_CLKCON_HCLK_UHOST,
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_HSMMC0, .ctrlbit = S3C_CLKCON_HCLK_HSMMC0,
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_HSMMC1, .ctrlbit = S3C_CLKCON_HCLK_HSMMC1,
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 2, .devname = "s3c-sdhci.2",
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_HSMMC2, .ctrlbit = S3C_CLKCON_HCLK_HSMMC2,
}, { }, {
.name = "otg", .name = "otg",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_USB, .ctrlbit = S3C_CLKCON_HCLK_USB,
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_PWM, .ctrlbit = S3C_CLKCON_PCLK_PWM,
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c6400-uart.0",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_UART0, .ctrlbit = S3C_CLKCON_PCLK_UART0,
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c6400-uart.1",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_UART1, .ctrlbit = S3C_CLKCON_PCLK_UART1,
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c6400-uart.2",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_UART2, .ctrlbit = S3C_CLKCON_PCLK_UART2,
}, { }, {
.name = "uart", .name = "uart",
.id = 3, .devname = "s3c6400-uart.3",
.parent = &clk_p, .parent = &clk_p,
.enable = s3c64xx_pclk_ctrl, .enable = s3c64xx_pclk_ctrl,
.ctrlbit = S3C_CLKCON_PCLK_UART3, .ctrlbit = S3C_CLKCON_PCLK_UART3,
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = S3C_CLKCON_PCLK_WDT, .ctrlbit = S3C_CLKCON_PCLK_WDT,
}, { }, {
.name = "ac97", .name = "ac97",
.id = -1,
.parent = &clk_p, .parent = &clk_p,
.ctrlbit = S3C_CLKCON_PCLK_AC97, .ctrlbit = S3C_CLKCON_PCLK_AC97,
}, { }, {
.name = "cfcon", .name = "cfcon",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s3c64xx_hclk_ctrl, .enable = s3c64xx_hclk_ctrl,
.ctrlbit = S3C_CLKCON_HCLK_IHOST, .ctrlbit = S3C_CLKCON_HCLK_IHOST,
...@@ -334,7 +313,6 @@ static struct clk init_clocks[] = { ...@@ -334,7 +313,6 @@ static struct clk init_clocks[] = {
static struct clk clk_fout_apll = { static struct clk clk_fout_apll = {
.name = "fout_apll", .name = "fout_apll",
.id = -1,
}; };
static struct clk *clk_src_apll_list[] = { static struct clk *clk_src_apll_list[] = {
...@@ -350,7 +328,6 @@ static struct clksrc_sources clk_src_apll = { ...@@ -350,7 +328,6 @@ static struct clksrc_sources clk_src_apll = {
static struct clksrc_clk clk_mout_apll = { static struct clksrc_clk clk_mout_apll = {
.clk = { .clk = {
.name = "mout_apll", .name = "mout_apll",
.id = -1,
}, },
.reg_src = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1 }, .reg_src = { .reg = S3C_CLK_SRC, .shift = 0, .size = 1 },
.sources = &clk_src_apll, .sources = &clk_src_apll,
...@@ -369,7 +346,6 @@ static struct clksrc_sources clk_src_epll = { ...@@ -369,7 +346,6 @@ static struct clksrc_sources clk_src_epll = {
static struct clksrc_clk clk_mout_epll = { static struct clksrc_clk clk_mout_epll = {
.clk = { .clk = {
.name = "mout_epll", .name = "mout_epll",
.id = -1,
}, },
.reg_src = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1 }, .reg_src = { .reg = S3C_CLK_SRC, .shift = 2, .size = 1 },
.sources = &clk_src_epll, .sources = &clk_src_epll,
...@@ -388,7 +364,6 @@ static struct clksrc_sources clk_src_mpll = { ...@@ -388,7 +364,6 @@ static struct clksrc_sources clk_src_mpll = {
static struct clksrc_clk clk_mout_mpll = { static struct clksrc_clk clk_mout_mpll = {
.clk = { .clk = {
.name = "mout_mpll", .name = "mout_mpll",
.id = -1,
}, },
.reg_src = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1 }, .reg_src = { .reg = S3C_CLK_SRC, .shift = 1, .size = 1 },
.sources = &clk_src_mpll, .sources = &clk_src_mpll,
...@@ -446,7 +421,6 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate) ...@@ -446,7 +421,6 @@ static int s3c64xx_clk_arm_set_rate(struct clk *clk, unsigned long rate)
static struct clk clk_arm = { static struct clk clk_arm = {
.name = "armclk", .name = "armclk",
.id = -1,
.parent = &clk_mout_apll.clk, .parent = &clk_mout_apll.clk,
.ops = &(struct clk_ops) { .ops = &(struct clk_ops) {
.get_rate = s3c64xx_clk_arm_get_rate, .get_rate = s3c64xx_clk_arm_get_rate,
...@@ -473,7 +447,6 @@ static struct clk_ops clk_dout_ops = { ...@@ -473,7 +447,6 @@ static struct clk_ops clk_dout_ops = {
static struct clk clk_dout_mpll = { static struct clk clk_dout_mpll = {
.name = "dout_mpll", .name = "dout_mpll",
.id = -1,
.parent = &clk_mout_mpll.clk, .parent = &clk_mout_mpll.clk,
.ops = &clk_dout_ops, .ops = &clk_dout_ops,
}; };
...@@ -540,22 +513,18 @@ static struct clksrc_sources clkset_uhost = { ...@@ -540,22 +513,18 @@ static struct clksrc_sources clkset_uhost = {
static struct clk clk_iis_cd0 = { static struct clk clk_iis_cd0 = {
.name = "iis_cdclk0", .name = "iis_cdclk0",
.id = -1,
}; };
static struct clk clk_iis_cd1 = { static struct clk clk_iis_cd1 = {
.name = "iis_cdclk1", .name = "iis_cdclk1",
.id = -1,
}; };
static struct clk clk_iisv4_cd = { static struct clk clk_iisv4_cd = {
.name = "iis_cdclk_v4", .name = "iis_cdclk_v4",
.id = -1,
}; };
static struct clk clk_pcm_cd = { static struct clk clk_pcm_cd = {
.name = "pcm_cdclk", .name = "pcm_cdclk",
.id = -1,
}; };
static struct clk *clkset_audio0_list[] = { static struct clk *clkset_audio0_list[] = {
...@@ -610,7 +579,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -610,7 +579,7 @@ static struct clksrc_clk clksrcs[] = {
{ {
.clk = { .clk = {
.name = "mmc_bus", .name = "mmc_bus",
.id = 0, .devname = "s3c-sdhci.0",
.ctrlbit = S3C_CLKCON_SCLK_MMC0, .ctrlbit = S3C_CLKCON_SCLK_MMC0,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -620,7 +589,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -620,7 +589,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "mmc_bus", .name = "mmc_bus",
.id = 1, .devname = "s3c-sdhci.1",
.ctrlbit = S3C_CLKCON_SCLK_MMC1, .ctrlbit = S3C_CLKCON_SCLK_MMC1,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -630,7 +599,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -630,7 +599,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "mmc_bus", .name = "mmc_bus",
.id = 2, .devname = "s3c-sdhci.2",
.ctrlbit = S3C_CLKCON_SCLK_MMC2, .ctrlbit = S3C_CLKCON_SCLK_MMC2,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -640,7 +609,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -640,7 +609,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "usb-bus-host", .name = "usb-bus-host",
.id = -1,
.ctrlbit = S3C_CLKCON_SCLK_UHOST, .ctrlbit = S3C_CLKCON_SCLK_UHOST,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -650,7 +618,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -650,7 +618,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "uclk1", .name = "uclk1",
.id = -1,
.ctrlbit = S3C_CLKCON_SCLK_UART, .ctrlbit = S3C_CLKCON_SCLK_UART,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -661,7 +628,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -661,7 +628,7 @@ static struct clksrc_clk clksrcs[] = {
/* Where does UCLK0 come from? */ /* Where does UCLK0 come from? */
.clk = { .clk = {
.name = "spi-bus", .name = "spi-bus",
.id = 0, .devname = "s3c64xx-spi.0",
.ctrlbit = S3C_CLKCON_SCLK_SPI0, .ctrlbit = S3C_CLKCON_SCLK_SPI0,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -671,8 +638,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -671,8 +638,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "spi-bus", .name = "spi-bus",
.id = 1, .devname = "s3c64xx-spi.1",
.ctrlbit = S3C_CLKCON_SCLK_SPI1,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
.reg_src = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2 }, .reg_src = { .reg = S3C_CLK_SRC, .shift = 16, .size = 2 },
...@@ -681,7 +647,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -681,7 +647,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "audio-bus", .name = "audio-bus",
.id = 0, .devname = "samsung-i2s.0",
.ctrlbit = S3C_CLKCON_SCLK_AUDIO0, .ctrlbit = S3C_CLKCON_SCLK_AUDIO0,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -691,7 +657,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -691,7 +657,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "audio-bus", .name = "audio-bus",
.id = 1, .devname = "samsung-i2s.1",
.ctrlbit = S3C_CLKCON_SCLK_AUDIO1, .ctrlbit = S3C_CLKCON_SCLK_AUDIO1,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -701,7 +667,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -701,7 +667,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "audio-bus", .name = "audio-bus",
.id = 2, .devname = "samsung-i2s.2",
.ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2, .ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -711,7 +677,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -711,7 +677,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "irda-bus", .name = "irda-bus",
.id = 0,
.ctrlbit = S3C_CLKCON_SCLK_IRDA, .ctrlbit = S3C_CLKCON_SCLK_IRDA,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
...@@ -721,7 +686,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -721,7 +686,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "camera", .name = "camera",
.id = -1,
.ctrlbit = S3C_CLKCON_SCLK_CAM, .ctrlbit = S3C_CLKCON_SCLK_CAM,
.enable = s3c64xx_sclk_ctrl, .enable = s3c64xx_sclk_ctrl,
}, },
......
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
#include <mach/irqs.h> #include <mach/irqs.h>
#include <mach/map.h> #include <mach/map.h>
#include <plat/devs.h>
static struct resource s3c64xx_onenand1_resources[] = { static struct resource s3c64xx_onenand1_resources[] = {
[0] = { [0] = {
.start = S3C64XX_PA_ONENAND1, .start = S3C64XX_PA_ONENAND1,
...@@ -46,10 +48,6 @@ struct platform_device s3c64xx_device_onenand1 = { ...@@ -46,10 +48,6 @@ struct platform_device s3c64xx_device_onenand1 = {
void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata) void s3c64xx_onenand1_set_platdata(struct onenand_platform_data *pdata)
{ {
struct onenand_platform_data *pd; s3c_set_platdata(pdata, sizeof(struct onenand_platform_data),
&s3c64xx_device_onenand1);
pd = kmemdup(pdata, sizeof(struct onenand_platform_data), GFP_KERNEL);
if (!pd)
printk(KERN_ERR "%s: no memory for platform data\n", __func__);
s3c64xx_device_onenand1.dev.platform_data = pd;
} }
...@@ -88,6 +88,7 @@ static struct s3c64xx_spi_info s3c64xx_spi0_pdata = { ...@@ -88,6 +88,7 @@ static struct s3c64xx_spi_info s3c64xx_spi0_pdata = {
.cfg_gpio = s3c64xx_spi_cfg_gpio, .cfg_gpio = s3c64xx_spi_cfg_gpio,
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 13, .rx_lvl_offset = 13,
.tx_st_done = 21,
}; };
static u64 spi_dmamask = DMA_BIT_MASK(32); static u64 spi_dmamask = DMA_BIT_MASK(32);
...@@ -132,6 +133,7 @@ static struct s3c64xx_spi_info s3c64xx_spi1_pdata = { ...@@ -132,6 +133,7 @@ static struct s3c64xx_spi_info s3c64xx_spi1_pdata = {
.cfg_gpio = s3c64xx_spi_cfg_gpio, .cfg_gpio = s3c64xx_spi_cfg_gpio,
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 13, .rx_lvl_offset = 13,
.tx_st_done = 21,
}; };
struct platform_device s3c64xx_device_spi1 = { struct platform_device s3c64xx_device_spi1 = {
......
#ifndef __MACH_CLKDEV_H__
#define __MACH_CLKDEV_H__
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do {} while (0)
#endif
/*
* Copyright 2008 Openmoko, Inc.
* Copyright 2008 Simtec Electronics
* Copyright 2009 Samsung Electronics Co.
*
* Pawel Osciak <p.osciak@samsung.com>
* Based on plat-s3c/include/plat/regs-fb.h by Ben Dooks <ben@simtec.co.uk>
*
* Framebuffer register definitions for Samsung S3C64xx.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_MACH_REGS_FB_H
#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
#include <plat/regs-fb-v4.h>
#endif /* __ASM_ARCH_MACH_REGS_FB_H */
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
#include <plat/iic.h> #include <plat/iic.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/regs-fb-v4.h>
#include <mach/s3c6410.h> #include <mach/s3c6410.h>
#include <plat/clock.h> #include <plat/clock.h>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/regs-fb-v4.h>
#define UCON S3C2410_UCON_DEFAULT #define UCON S3C2410_UCON_DEFAULT
#define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE) #define ULCON (S3C2410_LCON_CS8 | S3C2410_LCON_PNONE)
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <mach/regs-modem.h> #include <mach/regs-modem.h>
#include <mach/regs-srom.h> #include <mach/regs-srom.h>
...@@ -42,6 +41,7 @@ ...@@ -42,6 +41,7 @@
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/regs-fb-v4.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -44,6 +43,7 @@ ...@@ -44,6 +43,7 @@
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/cpu.h> #include <plat/cpu.h>
#include <plat/regs-fb-v4.h>
#define UCON S3C2410_UCON_DEFAULT #define UCON S3C2410_UCON_DEFAULT
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <mach/regs-modem.h> #include <mach/regs-modem.h>
#include <mach/regs-srom.h> #include <mach/regs-srom.h>
...@@ -43,6 +42,7 @@ ...@@ -43,6 +42,7 @@
#include <plat/nand.h> #include <plat/nand.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/regs-fb-v4.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <mach/s3c6410.h> #include <mach/s3c6410.h>
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-fb-v4.h>
#include "mach-smartq.h" #include "mach-smartq.h"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <mach/s3c6410.h> #include <mach/s3c6410.h>
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
#include <plat/devs.h> #include <plat/devs.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-fb-v4.h>
#include "mach-smartq.h" #include "mach-smartq.h"
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -71,6 +70,8 @@ ...@@ -71,6 +70,8 @@
#include <plat/adc.h> #include <plat/adc.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/backlight.h>
#include <plat/regs-fb-v4.h>
#define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK
#define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB
...@@ -209,17 +210,9 @@ static struct platform_device smdk6410_smsc911x = { ...@@ -209,17 +210,9 @@ static struct platform_device smdk6410_smsc911x = {
}; };
#ifdef CONFIG_REGULATOR #ifdef CONFIG_REGULATOR
static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] = { static struct regulator_consumer_supply smdk6410_b_pwr_5v_consumers[] __initdata = {
{ REGULATOR_SUPPLY("PVDD", "0-001b"),
/* WM8580 */ REGULATOR_SUPPLY("AVDD", "0-001b"),
.supply = "PVDD",
.dev_name = "0-001b",
},
{
/* WM8580 */
.supply = "AVDD",
.dev_name = "0-001b",
},
}; };
static struct regulator_init_data smdk6410_b_pwr_5v_data = { static struct regulator_init_data smdk6410_b_pwr_5v_data = {
...@@ -337,16 +330,12 @@ static struct platform_device *smdk6410_devices[] __initdata = { ...@@ -337,16 +330,12 @@ static struct platform_device *smdk6410_devices[] __initdata = {
&s3c_device_rtc, &s3c_device_rtc,
&s3c_device_ts, &s3c_device_ts,
&s3c_device_wdt, &s3c_device_wdt,
&s3c_device_timer[1],
&smdk6410_backlight_device,
}; };
#ifdef CONFIG_REGULATOR #ifdef CONFIG_REGULATOR
/* ARM core */ /* ARM core */
static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = { static struct regulator_consumer_supply smdk6410_vddarm_consumers[] = {
{ REGULATOR_SUPPLY("vddarm", NULL),
.supply = "vddarm",
}
}; };
/* VDDARM, BUCK1 on J5 */ /* VDDARM, BUCK1 on J5 */
...@@ -484,11 +473,7 @@ static struct regulator_init_data wm8350_dcdc3_data = { ...@@ -484,11 +473,7 @@ static struct regulator_init_data wm8350_dcdc3_data = {
/* USB, EXT, PCM, ADC/DAC, USB, MMC */ /* USB, EXT, PCM, ADC/DAC, USB, MMC */
static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = { static struct regulator_consumer_supply wm8350_dcdc4_consumers[] = {
{ REGULATOR_SUPPLY("DVDD", "0-001b"),
/* WM8580 */
.supply = "DVDD",
.dev_name = "0-001b",
},
}; };
static struct regulator_init_data wm8350_dcdc4_data = { static struct regulator_init_data wm8350_dcdc4_data = {
...@@ -599,7 +584,7 @@ static struct regulator_init_data wm1192_dcdc3 = { ...@@ -599,7 +584,7 @@ static struct regulator_init_data wm1192_dcdc3 = {
}; };
static struct regulator_consumer_supply wm1192_ldo1_consumers[] = { static struct regulator_consumer_supply wm1192_ldo1_consumers[] = {
{ .supply = "DVDD", .dev_name = "0-001b", }, /* WM8580 */ REGULATOR_SUPPLY("DVDD", "0-001b"), /* WM8580 */
}; };
static struct regulator_init_data wm1192_ldo1 = { static struct regulator_init_data wm1192_ldo1 = {
...@@ -679,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { ...@@ -679,6 +664,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.oversampling_shift = 2, .oversampling_shift = 2,
}; };
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdk6410_bl_gpio_info = {
.no = S3C64XX_GPF(15),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdk6410_bl_data = {
.pwm_id = 1,
};
static void __init smdk6410_map_io(void) static void __init smdk6410_map_io(void)
{ {
u32 tmp; u32 tmp;
...@@ -740,6 +735,8 @@ static void __init smdk6410_machine_init(void) ...@@ -740,6 +735,8 @@ static void __init smdk6410_machine_init(void)
s3c_ide_set_platdata(&smdk6410_ide_pdata); s3c_ide_set_platdata(&smdk6410_ide_pdata);
samsung_bl_set(&smdk6410_bl_gpio_info, &smdk6410_bl_data);
platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices)); platform_add_devices(smdk6410_devices, ARRAY_SIZE(smdk6410_devices));
} }
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <mach/regs-fb.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
......
...@@ -36,6 +36,7 @@ config MACH_SMDK6440 ...@@ -36,6 +36,7 @@ config MACH_SMDK6440
select S3C_DEV_WDT select S3C_DEV_WDT
select S3C64XX_DEV_SPI select S3C64XX_DEV_SPI
select SAMSUNG_DEV_ADC select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_PWM select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS select SAMSUNG_DEV_TS
select S5P64X0_SETUP_I2C1 select S5P64X0_SETUP_I2C1
...@@ -50,6 +51,7 @@ config MACH_SMDK6450 ...@@ -50,6 +51,7 @@ config MACH_SMDK6450
select S3C_DEV_WDT select S3C_DEV_WDT
select S3C64XX_DEV_SPI select S3C64XX_DEV_SPI
select SAMSUNG_DEV_ADC select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_PWM select SAMSUNG_DEV_PWM
select SAMSUNG_DEV_TS select SAMSUNG_DEV_TS
select S5P64X0_SETUP_I2C1 select S5P64X0_SETUP_I2C1
......
...@@ -95,7 +95,6 @@ static struct clk_ops s5p6440_epll_ops = { ...@@ -95,7 +95,6 @@ static struct clk_ops s5p6440_epll_ops = {
static struct clksrc_clk clk_hclk = { static struct clksrc_clk clk_hclk = {
.clk = { .clk = {
.name = "clk_hclk", .name = "clk_hclk",
.id = -1,
.parent = &clk_armclk.clk, .parent = &clk_armclk.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 8, .size = 4 },
...@@ -104,7 +103,6 @@ static struct clksrc_clk clk_hclk = { ...@@ -104,7 +103,6 @@ static struct clksrc_clk clk_hclk = {
static struct clksrc_clk clk_pclk = { static struct clksrc_clk clk_pclk = {
.clk = { .clk = {
.name = "clk_pclk", .name = "clk_pclk",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
...@@ -112,7 +110,6 @@ static struct clksrc_clk clk_pclk = { ...@@ -112,7 +110,6 @@ static struct clksrc_clk clk_pclk = {
static struct clksrc_clk clk_hclk_low = { static struct clksrc_clk clk_hclk_low = {
.clk = { .clk = {
.name = "clk_hclk_low", .name = "clk_hclk_low",
.id = -1,
}, },
.sources = &clkset_hclk_low, .sources = &clkset_hclk_low,
.reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 }, .reg_src = { .reg = S5P64X0_SYS_OTHERS, .shift = 6, .size = 1 },
...@@ -122,7 +119,6 @@ static struct clksrc_clk clk_hclk_low = { ...@@ -122,7 +119,6 @@ static struct clksrc_clk clk_hclk_low = {
static struct clksrc_clk clk_pclk_low = { static struct clksrc_clk clk_pclk_low = {
.clk = { .clk = {
.name = "clk_pclk_low", .name = "clk_pclk_low",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
...@@ -136,187 +132,167 @@ static struct clksrc_clk clk_pclk_low = { ...@@ -136,187 +132,167 @@ static struct clksrc_clk clk_pclk_low = {
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "nand", .name = "nand",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_mem_ctrl, .enable = s5p64x0_mem_ctrl,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
}, { }, {
.name = "post", .name = "post",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 5) .ctrlbit = (1 << 5)
}, { }, {
.name = "2d", .name = "2d",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 8), .ctrlbit = (1 << 8),
}, { }, {
.name = "pdma", .name = "pdma",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 17), .ctrlbit = (1 << 17),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 18), .ctrlbit = (1 << 18),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 2, .devname = "s3c-sdhci.2",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 19), .ctrlbit = (1 << 19),
}, { }, {
.name = "otg", .name = "otg",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 20) .ctrlbit = (1 << 20)
}, { }, {
.name = "irom", .name = "irom",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 25), .ctrlbit = (1 << 25),
}, { }, {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk1_ctrl, .enable = s5p64x0_hclk1_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "hclk_fimgvg", .name = "hclk_fimgvg",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk1_ctrl, .enable = s5p64x0_hclk1_ctrl,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
}, { }, {
.name = "tsi", .name = "tsi",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk1_ctrl, .enable = s5p64x0_hclk1_ctrl,
.ctrlbit = (1 << 0), .ctrlbit = (1 << 0),
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 5), .ctrlbit = (1 << 5),
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 6), .ctrlbit = (1 << 6),
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 7), .ctrlbit = (1 << 7),
}, { }, {
.name = "pcm", .name = "pcm",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 8), .ctrlbit = (1 << 8),
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
}, { }, {
.name = "i2c", .name = "i2c",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 17), .ctrlbit = (1 << 17),
}, { }, {
.name = "spi", .name = "spi",
.id = 0, .devname = "s3c64xx-spi.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
}, { }, {
.name = "spi", .name = "spi",
.id = 1, .devname = "s3c64xx-spi.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 22), .ctrlbit = (1 << 22),
}, { }, {
.name = "gps", .name = "gps",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 25), .ctrlbit = (1 << 25),
}, { }, {
.name = "iis", .name = "iis",
.id = 0, .devname = "samsung-i2s.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
}, { }, {
.name = "dsim", .name = "dsim",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 28), .ctrlbit = (1 << 28),
}, { }, {
.name = "etm", .name = "etm",
.id = -1,
.parent = &clk_pclk.clk, .parent = &clk_pclk.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 29), .ctrlbit = (1 << 29),
}, { }, {
.name = "dmc0", .name = "dmc0",
.id = -1,
.parent = &clk_pclk.clk, .parent = &clk_pclk.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 30), .ctrlbit = (1 << 30),
}, { }, {
.name = "pclk_fimgvg", .name = "pclk_fimgvg",
.id = -1,
.parent = &clk_pclk.clk, .parent = &clk_pclk.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 31), .ctrlbit = (1 << 31),
}, { }, {
.name = "sclk_spi_48", .name = "sclk_spi_48",
.id = 0, .devname = "s3c64xx-spi.0",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 22), .ctrlbit = (1 << 22),
}, { }, {
.name = "sclk_spi_48", .name = "sclk_spi_48",
.id = 1, .devname = "s3c64xx-spi.1",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 23), .ctrlbit = (1 << 23),
}, { }, {
.name = "mmc_48m", .name = "mmc_48m",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 27), .ctrlbit = (1 << 27),
}, { }, {
.name = "mmc_48m", .name = "mmc_48m",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 28), .ctrlbit = (1 << 28),
}, { }, {
.name = "mmc_48m", .name = "mmc_48m",
.id = 2, .devname = "s3c-sdhci.2",
.parent = &clk_48m, .parent = &clk_48m,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 29), .ctrlbit = (1 << 29),
...@@ -329,43 +305,40 @@ static struct clk init_clocks_off[] = { ...@@ -329,43 +305,40 @@ static struct clk init_clocks_off[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "intc", .name = "intc",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "mem", .name = "mem",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c6400-uart.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c6400-uart.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c6400-uart.2",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 3), .ctrlbit = (1 << 3),
}, { }, {
.name = "uart", .name = "uart",
.id = 3, .devname = "s3c6400-uart.3",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 4), .ctrlbit = (1 << 4),
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 18), .ctrlbit = (1 << 18),
...@@ -374,12 +347,10 @@ static struct clk init_clocks[] = { ...@@ -374,12 +347,10 @@ static struct clk init_clocks[] = {
static struct clk clk_iis_cd_v40 = { static struct clk clk_iis_cd_v40 = {
.name = "iis_cdclk_v40", .name = "iis_cdclk_v40",
.id = -1,
}; };
static struct clk clk_pcm_cd = { static struct clk clk_pcm_cd = {
.name = "pcm_cdclk", .name = "pcm_cdclk",
.id = -1,
}; };
static struct clk *clkset_group1_list[] = { static struct clk *clkset_group1_list[] = {
...@@ -420,7 +391,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -420,7 +391,7 @@ static struct clksrc_clk clksrcs[] = {
{ {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 0, .devname = "s3c-sdhci.0",
.ctrlbit = (1 << 24), .ctrlbit = (1 << 24),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -430,7 +401,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -430,7 +401,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 1, .devname = "s3c-sdhci.1",
.ctrlbit = (1 << 25), .ctrlbit = (1 << 25),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -440,7 +411,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -440,7 +411,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 2, .devname = "s3c-sdhci.2",
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -450,7 +421,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -450,7 +421,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "uclk1", .name = "uclk1",
.id = -1,
.ctrlbit = (1 << 5), .ctrlbit = (1 << 5),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -460,7 +430,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -460,7 +430,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_spi", .name = "sclk_spi",
.id = 0, .devname = "s3c64xx-spi.0",
.ctrlbit = (1 << 20), .ctrlbit = (1 << 20),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -470,7 +440,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -470,7 +440,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_spi", .name = "sclk_spi",
.id = 1, .devname = "s3c64xx-spi.1",
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -480,7 +450,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -480,7 +450,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_post", .name = "sclk_post",
.id = -1,
.ctrlbit = (1 << 10), .ctrlbit = (1 << 10),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -490,7 +459,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -490,7 +459,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_dispcon", .name = "sclk_dispcon",
.id = -1,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
.enable = s5p64x0_sclk1_ctrl, .enable = s5p64x0_sclk1_ctrl,
}, },
...@@ -500,7 +468,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -500,7 +468,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_fimgvg", .name = "sclk_fimgvg",
.id = -1,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
.enable = s5p64x0_sclk1_ctrl, .enable = s5p64x0_sclk1_ctrl,
}, },
...@@ -510,7 +477,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -510,7 +477,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_audio2", .name = "sclk_audio2",
.id = -1,
.ctrlbit = (1 << 11), .ctrlbit = (1 << 11),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
static struct clksrc_clk clk_mout_dpll = { static struct clksrc_clk clk_mout_dpll = {
.clk = { .clk = {
.name = "mout_dpll", .name = "mout_dpll",
.id = -1,
}, },
.sources = &clk_src_dpll, .sources = &clk_src_dpll,
.reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 }, .reg_src = { .reg = S5P64X0_CLK_SRC0, .shift = 5, .size = 1 },
...@@ -96,7 +95,6 @@ static struct clk_ops s5p6450_epll_ops = { ...@@ -96,7 +95,6 @@ static struct clk_ops s5p6450_epll_ops = {
static struct clksrc_clk clk_dout_epll = { static struct clksrc_clk clk_dout_epll = {
.clk = { .clk = {
.name = "dout_epll", .name = "dout_epll",
.id = -1,
.parent = &clk_mout_epll.clk, .parent = &clk_mout_epll.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV1, .shift = 24, .size = 4 },
...@@ -105,7 +103,6 @@ static struct clksrc_clk clk_dout_epll = { ...@@ -105,7 +103,6 @@ static struct clksrc_clk clk_dout_epll = {
static struct clksrc_clk clk_mout_hclk_sel = { static struct clksrc_clk clk_mout_hclk_sel = {
.clk = { .clk = {
.name = "mout_hclk_sel", .name = "mout_hclk_sel",
.id = -1,
}, },
.sources = &clkset_hclk_low, .sources = &clkset_hclk_low,
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 }, .reg_src = { .reg = S5P64X0_OTHERS, .shift = 15, .size = 1 },
...@@ -124,7 +121,6 @@ static struct clksrc_sources clkset_hclk = { ...@@ -124,7 +121,6 @@ static struct clksrc_sources clkset_hclk = {
static struct clksrc_clk clk_hclk = { static struct clksrc_clk clk_hclk = {
.clk = { .clk = {
.name = "clk_hclk", .name = "clk_hclk",
.id = -1,
}, },
.sources = &clkset_hclk, .sources = &clkset_hclk,
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 }, .reg_src = { .reg = S5P64X0_OTHERS, .shift = 14, .size = 1 },
...@@ -134,7 +130,6 @@ static struct clksrc_clk clk_hclk = { ...@@ -134,7 +130,6 @@ static struct clksrc_clk clk_hclk = {
static struct clksrc_clk clk_pclk = { static struct clksrc_clk clk_pclk = {
.clk = { .clk = {
.name = "clk_pclk", .name = "clk_pclk",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV0, .shift = 12, .size = 4 },
...@@ -142,7 +137,6 @@ static struct clksrc_clk clk_pclk = { ...@@ -142,7 +137,6 @@ static struct clksrc_clk clk_pclk = {
static struct clksrc_clk clk_dout_pwm_ratio0 = { static struct clksrc_clk clk_dout_pwm_ratio0 = {
.clk = { .clk = {
.name = "clk_dout_pwm_ratio0", .name = "clk_dout_pwm_ratio0",
.id = -1,
.parent = &clk_mout_hclk_sel.clk, .parent = &clk_mout_hclk_sel.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 16, .size = 4 },
...@@ -151,7 +145,6 @@ static struct clksrc_clk clk_dout_pwm_ratio0 = { ...@@ -151,7 +145,6 @@ static struct clksrc_clk clk_dout_pwm_ratio0 = {
static struct clksrc_clk clk_pclk_to_wdt_pwm = { static struct clksrc_clk clk_pclk_to_wdt_pwm = {
.clk = { .clk = {
.name = "clk_pclk_to_wdt_pwm", .name = "clk_pclk_to_wdt_pwm",
.id = -1,
.parent = &clk_dout_pwm_ratio0.clk, .parent = &clk_dout_pwm_ratio0.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 20, .size = 4 },
...@@ -160,7 +153,6 @@ static struct clksrc_clk clk_pclk_to_wdt_pwm = { ...@@ -160,7 +153,6 @@ static struct clksrc_clk clk_pclk_to_wdt_pwm = {
static struct clksrc_clk clk_hclk_low = { static struct clksrc_clk clk_hclk_low = {
.clk = { .clk = {
.name = "clk_hclk_low", .name = "clk_hclk_low",
.id = -1,
}, },
.sources = &clkset_hclk_low, .sources = &clkset_hclk_low,
.reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 }, .reg_src = { .reg = S5P64X0_OTHERS, .shift = 6, .size = 1 },
...@@ -170,7 +162,6 @@ static struct clksrc_clk clk_hclk_low = { ...@@ -170,7 +162,6 @@ static struct clksrc_clk clk_hclk_low = {
static struct clksrc_clk clk_pclk_low = { static struct clksrc_clk clk_pclk_low = {
.clk = { .clk = {
.name = "clk_pclk_low", .name = "clk_pclk_low",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
}, },
.reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 }, .reg_div = { .reg = S5P64X0_CLK_DIV3, .shift = 12, .size = 4 },
...@@ -184,109 +175,101 @@ static struct clksrc_clk clk_pclk_low = { ...@@ -184,109 +175,101 @@ static struct clksrc_clk clk_pclk_low = {
static struct clk init_clocks_off[] = { static struct clk init_clocks_off[] = {
{ {
.name = "usbhost", .name = "usbhost",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 3), .ctrlbit = (1 << 3),
}, { }, {
.name = "pdma", .name = "pdma",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 0, .devname = "s3c-sdhci.0",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 17), .ctrlbit = (1 << 17),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 1, .devname = "s3c-sdhci.1",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 18), .ctrlbit = (1 << 18),
}, { }, {
.name = "hsmmc", .name = "hsmmc",
.id = 2, .devname = "s3c-sdhci.2",
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 19), .ctrlbit = (1 << 19),
}, { }, {
.name = "usbotg", .name = "usbotg",
.id = -1,
.parent = &clk_hclk_low.clk, .parent = &clk_hclk_low.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 20), .ctrlbit = (1 << 20),
}, { }, {
.name = "lcd", .name = "lcd",
.id = -1,
.parent = &clk_h, .parent = &clk_h,
.enable = s5p64x0_hclk1_ctrl, .enable = s5p64x0_hclk1_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "watchdog", .name = "watchdog",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 5), .ctrlbit = (1 << 5),
}, { }, {
.name = "rtc", .name = "rtc",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 6), .ctrlbit = (1 << 6),
}, { }, {
.name = "adc", .name = "adc",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
}, { }, {
.name = "i2c", .name = "i2c",
.id = 0, .devname = "s3c2440-i2c.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 17), .ctrlbit = (1 << 17),
}, { }, {
.name = "spi", .name = "spi",
.id = 0, .devname = "s3c64xx-spi.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
}, { }, {
.name = "spi", .name = "spi",
.id = 1, .devname = "s3c64xx-spi.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 22), .ctrlbit = (1 << 22),
}, { }, {
.name = "iis", .name = "iis",
.id = 0, .devname = "samsung-i2s.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
}, { }, {
.name = "iis", .name = "iis",
.id = 1, .devname = "samsung-i2s.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 15), .ctrlbit = (1 << 15),
}, { }, {
.name = "iis", .name = "iis",
.id = 2, .devname = "samsung-i2s.2",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 16), .ctrlbit = (1 << 16),
}, { }, {
.name = "i2c", .name = "i2c",
.id = 1, .devname = "s3c2440-i2c.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 27), .ctrlbit = (1 << 27),
}, { }, {
.name = "dmc0", .name = "dmc0",
.id = -1,
.parent = &clk_pclk.clk, .parent = &clk_pclk.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 30), .ctrlbit = (1 << 30),
...@@ -299,49 +282,45 @@ static struct clk init_clocks_off[] = { ...@@ -299,49 +282,45 @@ static struct clk init_clocks_off[] = {
static struct clk init_clocks[] = { static struct clk init_clocks[] = {
{ {
.name = "intc", .name = "intc",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "mem", .name = "mem",
.id = -1,
.parent = &clk_hclk.clk, .parent = &clk_hclk.clk,
.enable = s5p64x0_hclk0_ctrl, .enable = s5p64x0_hclk0_ctrl,
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
}, { }, {
.name = "uart", .name = "uart",
.id = 0, .devname = "s3c6400-uart.0",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
}, { }, {
.name = "uart", .name = "uart",
.id = 1, .devname = "s3c6400-uart.1",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
}, { }, {
.name = "uart", .name = "uart",
.id = 2, .devname = "s3c6400-uart.2",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 3), .ctrlbit = (1 << 3),
}, { }, {
.name = "uart", .name = "uart",
.id = 3, .devname = "s3c6400-uart.3",
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 4), .ctrlbit = (1 << 4),
}, { }, {
.name = "timers", .name = "timers",
.id = -1,
.parent = &clk_pclk_to_wdt_pwm.clk, .parent = &clk_pclk_to_wdt_pwm.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 7), .ctrlbit = (1 << 7),
}, { }, {
.name = "gpio", .name = "gpio",
.id = -1,
.parent = &clk_pclk_low.clk, .parent = &clk_pclk_low.clk,
.enable = s5p64x0_pclk_ctrl, .enable = s5p64x0_pclk_ctrl,
.ctrlbit = (1 << 18), .ctrlbit = (1 << 18),
...@@ -421,7 +400,6 @@ static struct clksrc_sources clkset_sclk_audio0 = { ...@@ -421,7 +400,6 @@ static struct clksrc_sources clkset_sclk_audio0 = {
static struct clksrc_clk clk_sclk_audio0 = { static struct clksrc_clk clk_sclk_audio0 = {
.clk = { .clk = {
.name = "audio-bus", .name = "audio-bus",
.id = -1,
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
.ctrlbit = (1 << 8), .ctrlbit = (1 << 8),
.parent = &clk_dout_epll.clk, .parent = &clk_dout_epll.clk,
...@@ -435,7 +413,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -435,7 +413,7 @@ static struct clksrc_clk clksrcs[] = {
{ {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 0, .devname = "s3c-sdhci.0",
.ctrlbit = (1 << 24), .ctrlbit = (1 << 24),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -445,7 +423,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -445,7 +423,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 1, .devname = "s3c-sdhci.1",
.ctrlbit = (1 << 25), .ctrlbit = (1 << 25),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -455,7 +433,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -455,7 +433,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_mmc", .name = "sclk_mmc",
.id = 2, .devname = "s3c-sdhci.2",
.ctrlbit = (1 << 26), .ctrlbit = (1 << 26),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -465,7 +443,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -465,7 +443,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "uclk1", .name = "uclk1",
.id = -1,
.ctrlbit = (1 << 5), .ctrlbit = (1 << 5),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -475,7 +452,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -475,7 +452,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_spi", .name = "sclk_spi",
.id = 0, .devname = "s3c64xx-spi.0",
.ctrlbit = (1 << 20), .ctrlbit = (1 << 20),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -485,7 +462,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -485,7 +462,7 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_spi", .name = "sclk_spi",
.id = 1, .devname = "s3c64xx-spi.1",
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -495,7 +472,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -495,7 +472,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_fimc", .name = "sclk_fimc",
.id = -1,
.ctrlbit = (1 << 10), .ctrlbit = (1 << 10),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -505,7 +481,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -505,7 +481,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "aclk_mali", .name = "aclk_mali",
.id = -1,
.ctrlbit = (1 << 2), .ctrlbit = (1 << 2),
.enable = s5p64x0_sclk1_ctrl, .enable = s5p64x0_sclk1_ctrl,
}, },
...@@ -515,7 +490,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -515,7 +490,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_2d", .name = "sclk_2d",
.id = -1,
.ctrlbit = (1 << 12), .ctrlbit = (1 << 12),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -525,7 +499,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -525,7 +499,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_usi", .name = "sclk_usi",
.id = -1,
.ctrlbit = (1 << 7), .ctrlbit = (1 << 7),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -535,7 +508,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -535,7 +508,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_camif", .name = "sclk_camif",
.id = -1,
.ctrlbit = (1 << 6), .ctrlbit = (1 << 6),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
...@@ -545,7 +517,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -545,7 +517,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_dispcon", .name = "sclk_dispcon",
.id = -1,
.ctrlbit = (1 << 1), .ctrlbit = (1 << 1),
.enable = s5p64x0_sclk1_ctrl, .enable = s5p64x0_sclk1_ctrl,
}, },
...@@ -555,7 +526,6 @@ static struct clksrc_clk clksrcs[] = { ...@@ -555,7 +526,6 @@ static struct clksrc_clk clksrcs[] = {
}, { }, {
.clk = { .clk = {
.name = "sclk_hsmmc44", .name = "sclk_hsmmc44",
.id = -1,
.ctrlbit = (1 << 30), .ctrlbit = (1 << 30),
.enable = s5p64x0_sclk_ctrl, .enable = s5p64x0_sclk_ctrl,
}, },
......
...@@ -112,12 +112,14 @@ static struct s3c64xx_spi_info s5p6440_spi0_pdata = { ...@@ -112,12 +112,14 @@ static struct s3c64xx_spi_info s5p6440_spi0_pdata = {
.cfg_gpio = s5p6440_spi_cfg_gpio, .cfg_gpio = s5p6440_spi_cfg_gpio,
.fifo_lvl_mask = 0x1ff, .fifo_lvl_mask = 0x1ff,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.tx_st_done = 25,
}; };
static struct s3c64xx_spi_info s5p6450_spi0_pdata = { static struct s3c64xx_spi_info s5p6450_spi0_pdata = {
.cfg_gpio = s5p6450_spi_cfg_gpio, .cfg_gpio = s5p6450_spi_cfg_gpio,
.fifo_lvl_mask = 0x1ff, .fifo_lvl_mask = 0x1ff,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.tx_st_done = 25,
}; };
static u64 spi_dmamask = DMA_BIT_MASK(32); static u64 spi_dmamask = DMA_BIT_MASK(32);
...@@ -160,12 +162,14 @@ static struct s3c64xx_spi_info s5p6440_spi1_pdata = { ...@@ -160,12 +162,14 @@ static struct s3c64xx_spi_info s5p6440_spi1_pdata = {
.cfg_gpio = s5p6440_spi_cfg_gpio, .cfg_gpio = s5p6440_spi_cfg_gpio,
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.tx_st_done = 25,
}; };
static struct s3c64xx_spi_info s5p6450_spi1_pdata = { static struct s3c64xx_spi_info s5p6450_spi1_pdata = {
.cfg_gpio = s5p6450_spi_cfg_gpio, .cfg_gpio = s5p6450_spi_cfg_gpio,
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.tx_st_done = 25,
}; };
struct platform_device s5p64x0_device_spi1 = { struct platform_device s5p64x0_device_spi1 = {
......
#ifndef __MACH_CLKDEV_H__
#define __MACH_CLKDEV_H__
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do {} while (0)
#endif
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <plat/adc.h> #include <plat/adc.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/backlight.h>
#define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define SMDK6440_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \ S3C2410_UCON_RXILEVEL | \
...@@ -91,45 +92,6 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = { ...@@ -91,45 +92,6 @@ static struct s3c2410_uartcfg smdk6440_uartcfgs[] __initdata = {
}, },
}; };
static int smdk6440_backlight_init(struct device *dev)
{
int ret;
ret = gpio_request(S5P6440_GPF(15), "Backlight");
if (ret) {
printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
return ret;
}
/* Configure GPIO pin with S5P6440_GPF15_PWM_TOUT1 */
s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_SFN(2));
return 0;
}
static void smdk6440_backlight_exit(struct device *dev)
{
s3c_gpio_cfgpin(S5P6440_GPF(15), S3C_GPIO_OUTPUT);
gpio_free(S5P6440_GPF(15));
}
static struct platform_pwm_backlight_data smdk6440_backlight_data = {
.pwm_id = 1,
.max_brightness = 255,
.dft_brightness = 255,
.pwm_period_ns = 78770,
.init = smdk6440_backlight_init,
.exit = smdk6440_backlight_exit,
};
static struct platform_device smdk6440_backlight_device = {
.name = "pwm-backlight",
.dev = {
.parent = &s3c_device_timer[1].dev,
.platform_data = &smdk6440_backlight_data,
},
};
static struct platform_device *smdk6440_devices[] __initdata = { static struct platform_device *smdk6440_devices[] __initdata = {
&s3c_device_adc, &s3c_device_adc,
&s3c_device_rtc, &s3c_device_rtc,
...@@ -139,8 +101,6 @@ static struct platform_device *smdk6440_devices[] __initdata = { ...@@ -139,8 +101,6 @@ static struct platform_device *smdk6440_devices[] __initdata = {
&s3c_device_wdt, &s3c_device_wdt,
&samsung_asoc_dma, &samsung_asoc_dma,
&s5p6440_device_iis, &s5p6440_device_iis,
&s3c_device_timer[1],
&smdk6440_backlight_device,
}; };
static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = { static struct s3c2410_platform_i2c s5p6440_i2c0_data __initdata = {
...@@ -175,6 +135,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { ...@@ -175,6 +135,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.oversampling_shift = 2, .oversampling_shift = 2,
}; };
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdk6440_bl_gpio_info = {
.no = S5P6440_GPF(15),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdk6440_bl_data = {
.pwm_id = 1,
};
static void __init smdk6440_map_io(void) static void __init smdk6440_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P64X0_SYS_ID); s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
...@@ -194,6 +164,8 @@ static void __init smdk6440_machine_init(void) ...@@ -194,6 +164,8 @@ static void __init smdk6440_machine_init(void)
i2c_register_board_info(1, smdk6440_i2c_devs1, i2c_register_board_info(1, smdk6440_i2c_devs1,
ARRAY_SIZE(smdk6440_i2c_devs1)); ARRAY_SIZE(smdk6440_i2c_devs1));
samsung_bl_set(&smdk6440_bl_gpio_info, &smdk6440_bl_data);
platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices)); platform_add_devices(smdk6440_devices, ARRAY_SIZE(smdk6440_devices));
} }
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <plat/adc.h> #include <plat/adc.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/backlight.h>
#define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define SMDK6450_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
S3C2410_UCON_RXILEVEL | \ S3C2410_UCON_RXILEVEL | \
...@@ -109,45 +110,6 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = { ...@@ -109,45 +110,6 @@ static struct s3c2410_uartcfg smdk6450_uartcfgs[] __initdata = {
#endif #endif
}; };
static int smdk6450_backlight_init(struct device *dev)
{
int ret;
ret = gpio_request(S5P6450_GPF(15), "Backlight");
if (ret) {
printk(KERN_ERR "failed to request GPF for PWM-OUT1\n");
return ret;
}
/* Configure GPIO pin with S5P6450_GPF15_PWM_TOUT1 */
s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_SFN(2));
return 0;
}
static void smdk6450_backlight_exit(struct device *dev)
{
s3c_gpio_cfgpin(S5P6450_GPF(15), S3C_GPIO_OUTPUT);
gpio_free(S5P6450_GPF(15));
}
static struct platform_pwm_backlight_data smdk6450_backlight_data = {
.pwm_id = 1,
.max_brightness = 255,
.dft_brightness = 255,
.pwm_period_ns = 78770,
.init = smdk6450_backlight_init,
.exit = smdk6450_backlight_exit,
};
static struct platform_device smdk6450_backlight_device = {
.name = "pwm-backlight",
.dev = {
.parent = &s3c_device_timer[1].dev,
.platform_data = &smdk6450_backlight_data,
},
};
static struct platform_device *smdk6450_devices[] __initdata = { static struct platform_device *smdk6450_devices[] __initdata = {
&s3c_device_adc, &s3c_device_adc,
&s3c_device_rtc, &s3c_device_rtc,
...@@ -157,8 +119,6 @@ static struct platform_device *smdk6450_devices[] __initdata = { ...@@ -157,8 +119,6 @@ static struct platform_device *smdk6450_devices[] __initdata = {
&s3c_device_wdt, &s3c_device_wdt,
&samsung_asoc_dma, &samsung_asoc_dma,
&s5p6450_device_iis0, &s5p6450_device_iis0,
&s3c_device_timer[1],
&smdk6450_backlight_device,
/* s5p6450_device_spi0 will be added */ /* s5p6450_device_spi0 will be added */
}; };
...@@ -194,6 +154,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { ...@@ -194,6 +154,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.oversampling_shift = 2, .oversampling_shift = 2,
}; };
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdk6450_bl_gpio_info = {
.no = S5P6450_GPF(15),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdk6450_bl_data = {
.pwm_id = 1,
};
static void __init smdk6450_map_io(void) static void __init smdk6450_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P64X0_SYS_ID); s5p_init_io(NULL, 0, S5P64X0_SYS_ID);
...@@ -213,6 +183,8 @@ static void __init smdk6450_machine_init(void) ...@@ -213,6 +183,8 @@ static void __init smdk6450_machine_init(void)
i2c_register_board_info(1, smdk6450_i2c_devs1, i2c_register_board_info(1, smdk6450_i2c_devs1,
ARRAY_SIZE(smdk6450_i2c_devs1)); ARRAY_SIZE(smdk6450_i2c_devs1));
samsung_bl_set(&smdk6450_bl_gpio_info, &smdk6450_bl_data);
platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices)); platform_add_devices(smdk6450_devices, ARRAY_SIZE(smdk6450_devices));
} }
......
...@@ -56,6 +56,7 @@ config MACH_SMDKC100 ...@@ -56,6 +56,7 @@ config MACH_SMDKC100
select S3C_DEV_RTC select S3C_DEV_RTC
select S3C_DEV_WDT select S3C_DEV_WDT
select SAMSUNG_DEV_ADC select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_IDE select SAMSUNG_DEV_IDE
select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM select SAMSUNG_DEV_PWM
......
此差异已折叠。
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <mach/dma.h> #include <mach/dma.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/spi-clocks.h> #include <mach/spi-clocks.h>
#include <mach/irqs.h>
#include <plat/s3c64xx-spi.h> #include <plat/s3c64xx-spi.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
...@@ -90,6 +91,7 @@ static struct s3c64xx_spi_info s5pc100_spi0_pdata = { ...@@ -90,6 +91,7 @@ static struct s3c64xx_spi_info s5pc100_spi0_pdata = {
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 13, .rx_lvl_offset = 13,
.high_speed = 1, .high_speed = 1,
.tx_st_done = 21,
}; };
static u64 spi_dmamask = DMA_BIT_MASK(32); static u64 spi_dmamask = DMA_BIT_MASK(32);
...@@ -134,6 +136,7 @@ static struct s3c64xx_spi_info s5pc100_spi1_pdata = { ...@@ -134,6 +136,7 @@ static struct s3c64xx_spi_info s5pc100_spi1_pdata = {
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 13, .rx_lvl_offset = 13,
.high_speed = 1, .high_speed = 1,
.tx_st_done = 21,
}; };
struct platform_device s5pc100_device_spi1 = { struct platform_device s5pc100_device_spi1 = {
...@@ -176,6 +179,7 @@ static struct s3c64xx_spi_info s5pc100_spi2_pdata = { ...@@ -176,6 +179,7 @@ static struct s3c64xx_spi_info s5pc100_spi2_pdata = {
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 13, .rx_lvl_offset = 13,
.high_speed = 1, .high_speed = 1,
.tx_st_done = 21,
}; };
struct platform_device s5pc100_device_spi2 = { struct platform_device s5pc100_device_spi2 = {
......
#ifndef __MACH_CLKDEV_H__
#define __MACH_CLKDEV_H__
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do {} while (0)
#endif
/* arch/arm/mach-s5pc100/include/mach/regs-fb.h
*
* Copyright 2009 Samsung Electronics Co.
* Pawel Osciak <p.osciak@samsung.com>
*
* Framebuffer register definitions for Samsung S5PC100.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_REGS_FB_H
#define __ASM_ARCH_REGS_FB_H __FILE__
#include <plat/regs-fb-v4.h>
/* VP1 interface timing control */
#define VP1CON0 (0x118)
#define VP1_RATECON_EN (1 << 31)
#define VP1_CLKRATE_MASK (0xff)
#define VP1CON1 (0x11c)
#define VP1_VTREGCON_EN (1 << 31)
#define VP1_VBPD_MASK (0xfff)
#define VP1_VBPD_SHIFT (16)
#define WPALCON_H (0x19c)
#define WPALCON_L (0x1a0)
/* Palette control for WPAL0 and WPAL1 is the same as in S3C64xx, but
* different for WPAL2-4
*/
/* In WPALCON_L (aka WPALCON) */
#define WPALCON_W1PAL_32BPP_A888 (0x7 << 3)
#define WPALCON_W0PAL_32BPP_A888 (0x7 << 0)
/* To set W2PAL-W4PAL consist of one bit from WPALCON_L and two from WPALCON_H,
* e.g. W2PAL[2..0] is made of (WPALCON_H[10..9], WPALCON_L[6]).
*/
#define WPALCON_L_WxPAL_L_MASK (0x1)
#define WPALCON_L_W2PAL_L_SHIFT (6)
#define WPALCON_L_W3PAL_L_SHIFT (7)
#define WPALCON_L_W4PAL_L_SHIFT (8)
#define WPALCON_L_WxPAL_H_MASK (0x3)
#define WPALCON_H_W2PAL_H_SHIFT (9)
#define WPALCON_H_W3PAL_H_SHIFT (13)
#define WPALCON_H_W4PAL_H_SHIFT (17)
/* Per-window alpha value registers */
/* For window 0 8-bit alpha values are in VIDW0ALPHAx,
* for windows 1-4 alpha values consist of two parts, the 4 low bits are
* taken from VIDWxALPHAx and 4 high bits are from VIDOSDxC,
* e.g. WIN1_ALPHA0_B[7..0] = (VIDOSD1C[3..0], VIDW1ALPHA0[3..0])
*/
#define VIDWxALPHA0(_win) (0x200 + (_win * 8))
#define VIDWxALPHA1(_win) (0x204 + (_win * 8))
/* Only for window 0 in VIDW0ALPHAx. */
#define VIDW0ALPHAx_R(_x) ((_x) << 16)
#define VIDW0ALPHAx_R_MASK (0xff << 16)
#define VIDW0ALPHAx_R_SHIFT (16)
#define VIDW0ALPHAx_G(_x) ((_x) << 8)
#define VIDW0ALPHAx_G_MASK (0xff << 8)
#define VIDW0ALPHAx_G_SHIFT (8)
#define VIDW0ALPHAx_B(_x) ((_x) << 0)
#define VIDW0ALPHAx_B_MASK (0xff << 0)
#define VIDW0ALPHAx_B_SHIFT (0)
/* Low 4 bits of alpha0-1 for windows 1-4 */
#define VIDW14ALPHAx_R_L(_x) ((_x) << 16)
#define VIDW14ALPHAx_R_L_MASK (0xf << 16)
#define VIDW14ALPHAx_R_L_SHIFT (16)
#define VIDW14ALPHAx_G_L(_x) ((_x) << 8)
#define VIDW14ALPHAx_G_L_MASK (0xf << 8)
#define VIDW14ALPHAx_G_L_SHIFT (8)
#define VIDW14ALPHAx_B_L(_x) ((_x) << 0)
#define VIDW14ALPHAx_B_L_MASK (0xf << 0)
#define VIDW14ALPHAx_B_L_SHIFT (0)
/* Per-window blending equation control registers */
#define BLENDEQx(_win) (0x244 + ((_win) * 4))
#define BLENDEQ1 (0x244)
#define BLENDEQ2 (0x248)
#define BLENDEQ3 (0x24c)
#define BLENDEQ4 (0x250)
#define BLENDEQx_Q_FUNC(_x) ((_x) << 18)
#define BLENDEQx_Q_FUNC_MASK (0xf << 18)
#define BLENDEQx_P_FUNC(_x) ((_x) << 12)
#define BLENDEQx_P_FUNC_MASK (0xf << 12)
#define BLENDEQx_B_FUNC(_x) ((_x) << 6)
#define BLENDEQx_B_FUNC_MASK (0xf << 6)
#define BLENDEQx_A_FUNC(_x) ((_x) << 0)
#define BLENDEQx_A_FUNC_MASK (0xf << 0)
#define BLENDCON (0x260)
#define BLENDCON_8BIT_ALPHA (1 << 0)
#endif /* __ASM_ARCH_REGS_FB_H */
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-fb.h>
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <video/platform_lcd.h> #include <video/platform_lcd.h>
...@@ -51,6 +50,8 @@ ...@@ -51,6 +50,8 @@
#include <plat/keypad.h> #include <plat/keypad.h>
#include <plat/ts.h> #include <plat/ts.h>
#include <plat/audio.h> #include <plat/audio.h>
#include <plat/backlight.h>
#include <plat/regs-fb-v4.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */ /* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define SMDKC100_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
...@@ -179,45 +180,6 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = { ...@@ -179,45 +180,6 @@ static struct samsung_keypad_platdata smdkc100_keypad_data __initdata = {
.cols = 8, .cols = 8,
}; };
static int smdkc100_backlight_init(struct device *dev)
{
int ret;
ret = gpio_request(S5PC100_GPD(0), "Backlight");
if (ret) {
printk(KERN_ERR "failed to request GPF for PWM-OUT0\n");
return ret;
}
/* Configure GPIO pin with S5PC100_GPD_TOUT_0 */
s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_SFN(2));
return 0;
}
static void smdkc100_backlight_exit(struct device *dev)
{
s3c_gpio_cfgpin(S5PC100_GPD(0), S3C_GPIO_OUTPUT);
gpio_free(S5PC100_GPD(0));
}
static struct platform_pwm_backlight_data smdkc100_backlight_data = {
.pwm_id = 0,
.max_brightness = 255,
.dft_brightness = 255,
.pwm_period_ns = 78770,
.init = smdkc100_backlight_init,
.exit = smdkc100_backlight_exit,
};
static struct platform_device smdkc100_backlight_device = {
.name = "pwm-backlight",
.dev = {
.parent = &s3c_device_timer[0].dev,
.platform_data = &smdkc100_backlight_data,
},
};
static struct platform_device *smdkc100_devices[] __initdata = { static struct platform_device *smdkc100_devices[] __initdata = {
&s3c_device_adc, &s3c_device_adc,
&s3c_device_cfcon, &s3c_device_cfcon,
...@@ -239,8 +201,6 @@ static struct platform_device *smdkc100_devices[] __initdata = { ...@@ -239,8 +201,6 @@ static struct platform_device *smdkc100_devices[] __initdata = {
&s5p_device_fimc1, &s5p_device_fimc1,
&s5p_device_fimc2, &s5p_device_fimc2,
&s5pc100_device_spdif, &s5pc100_device_spdif,
&s3c_device_timer[0],
&smdkc100_backlight_device,
}; };
static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
...@@ -249,6 +209,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { ...@@ -249,6 +209,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.oversampling_shift = 2, .oversampling_shift = 2,
}; };
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkc100_bl_gpio_info = {
.no = S5PC100_GPD(0),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkc100_bl_data = {
.pwm_id = 0,
};
static void __init smdkc100_map_io(void) static void __init smdkc100_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P_VA_CHIPID); s5p_init_io(NULL, 0, S5P_VA_CHIPID);
...@@ -276,6 +246,9 @@ static void __init smdkc100_machine_init(void) ...@@ -276,6 +246,9 @@ static void __init smdkc100_machine_init(void)
/* LCD init */ /* LCD init */
gpio_request(S5PC100_GPH0(6), "GPH0"); gpio_request(S5PC100_GPH0(6), "GPH0");
smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0); smdkc100_lcd_power_set(&smdkc100_lcd_power_data, 0);
samsung_bl_set(&smdkc100_bl_gpio_info, &smdkc100_bl_data);
platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices)); platform_add_devices(smdkc100_devices, ARRAY_SIZE(smdkc100_devices));
} }
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
......
...@@ -134,6 +134,7 @@ config MACH_SMDKV210 ...@@ -134,6 +134,7 @@ config MACH_SMDKV210
select S3C_DEV_RTC select S3C_DEV_RTC
select S3C_DEV_WDT select S3C_DEV_WDT
select SAMSUNG_DEV_ADC select SAMSUNG_DEV_ADC
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_IDE select SAMSUNG_DEV_IDE
select SAMSUNG_DEV_KEYPAD select SAMSUNG_DEV_KEYPAD
select SAMSUNG_DEV_PWM select SAMSUNG_DEV_PWM
......
此差异已折叠。
...@@ -85,6 +85,7 @@ static struct s3c64xx_spi_info s5pv210_spi0_pdata = { ...@@ -85,6 +85,7 @@ static struct s3c64xx_spi_info s5pv210_spi0_pdata = {
.fifo_lvl_mask = 0x1ff, .fifo_lvl_mask = 0x1ff,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.high_speed = 1, .high_speed = 1,
.tx_st_done = 25,
}; };
static u64 spi_dmamask = DMA_BIT_MASK(32); static u64 spi_dmamask = DMA_BIT_MASK(32);
...@@ -129,6 +130,7 @@ static struct s3c64xx_spi_info s5pv210_spi1_pdata = { ...@@ -129,6 +130,7 @@ static struct s3c64xx_spi_info s5pv210_spi1_pdata = {
.fifo_lvl_mask = 0x7f, .fifo_lvl_mask = 0x7f,
.rx_lvl_offset = 15, .rx_lvl_offset = 15,
.high_speed = 1, .high_speed = 1,
.tx_st_done = 25,
}; };
struct platform_device s5pv210_device_spi1 = { struct platform_device s5pv210_device_spi1 = {
......
#ifndef __MACH_CLKDEV_H__
#define __MACH_CLKDEV_H__
#define __clk_get(clk) ({ 1; })
#define __clk_put(clk) do {} while (0)
#endif
/*
* Copyright 2010 Ben Dooks <ben-linux@fluff.org>
*
* Dummy framebuffer to allow build for the moment.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
#ifndef __ASM_ARCH_MACH_REGS_FB_H
#define __ASM_ARCH_MACH_REGS_FB_H __FILE__
#include <plat/regs-fb-v4.h>
static inline unsigned int s3c_fb_pal_reg(unsigned int window, int reg)
{
return 0x2400 + (window * 256 *4 ) + reg;
}
#endif /* __ASM_ARCH_MACH_REGS_FB_H */
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-clock.h> #include <mach/regs-clock.h>
#include <mach/regs-fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
...@@ -40,6 +39,7 @@ ...@@ -40,6 +39,7 @@
#include <plat/fimc-core.h> #include <plat/fimc-core.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/regs-fb-v4.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */ /* Following are default values for UCON, ULCON and UFCON UART registers */
#define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define AQUILA_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-clock.h> #include <mach/regs-clock.h>
#include <mach/regs-fb.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
...@@ -47,6 +46,7 @@ ...@@ -47,6 +46,7 @@
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/clock.h> #include <plat/clock.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/regs-fb-v4.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */ /* Following are default values for UCON, ULCON and UFCON UART registers */
#define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define GONI_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
#include <mach/map.h> #include <mach/map.h>
#include <mach/regs-clock.h> #include <mach/regs-clock.h>
#include <mach/regs-fb.h>
#include <plat/regs-serial.h> #include <plat/regs-serial.h>
#include <plat/regs-srom.h> #include <plat/regs-srom.h>
...@@ -45,6 +44,8 @@ ...@@ -45,6 +44,8 @@
#include <plat/pm.h> #include <plat/pm.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <plat/s5p-time.h> #include <plat/s5p-time.h>
#include <plat/backlight.h>
#include <plat/regs-fb-v4.h>
/* Following are default values for UCON, ULCON and UFCON UART registers */ /* Following are default values for UCON, ULCON and UFCON UART registers */
#define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \ #define SMDKV210_UCON_DEFAULT (S3C2410_UCON_TXILEVEL | \
...@@ -210,45 +211,6 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = { ...@@ -210,45 +211,6 @@ static struct s3c_fb_platdata smdkv210_lcd0_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp, .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
}; };
static int smdkv210_backlight_init(struct device *dev)
{
int ret;
ret = gpio_request(S5PV210_GPD0(3), "Backlight");
if (ret) {
printk(KERN_ERR "failed to request GPD for PWM-OUT 3\n");
return ret;
}
/* Configure GPIO pin with S5PV210_GPD_0_3_TOUT_3 */
s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_SFN(2));
return 0;
}
static void smdkv210_backlight_exit(struct device *dev)
{
s3c_gpio_cfgpin(S5PV210_GPD0(3), S3C_GPIO_OUTPUT);
gpio_free(S5PV210_GPD0(3));
}
static struct platform_pwm_backlight_data smdkv210_backlight_data = {
.pwm_id = 3,
.max_brightness = 255,
.dft_brightness = 255,
.pwm_period_ns = 78770,
.init = smdkv210_backlight_init,
.exit = smdkv210_backlight_exit,
};
static struct platform_device smdkv210_backlight_device = {
.name = "pwm-backlight",
.dev = {
.parent = &s3c_device_timer[3].dev,
.platform_data = &smdkv210_backlight_data,
},
};
static struct platform_device *smdkv210_devices[] __initdata = { static struct platform_device *smdkv210_devices[] __initdata = {
&s3c_device_adc, &s3c_device_adc,
&s3c_device_cfcon, &s3c_device_cfcon,
...@@ -270,8 +232,6 @@ static struct platform_device *smdkv210_devices[] __initdata = { ...@@ -270,8 +232,6 @@ static struct platform_device *smdkv210_devices[] __initdata = {
&samsung_device_keypad, &samsung_device_keypad,
&smdkv210_dm9000, &smdkv210_dm9000,
&smdkv210_lcd_lte480wv, &smdkv210_lcd_lte480wv,
&s3c_device_timer[3],
&smdkv210_backlight_device,
}; };
static void __init smdkv210_dm9000_init(void) static void __init smdkv210_dm9000_init(void)
...@@ -310,6 +270,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = { ...@@ -310,6 +270,16 @@ static struct s3c2410_ts_mach_info s3c_ts_platform __initdata = {
.oversampling_shift = 2, .oversampling_shift = 2,
}; };
/* LCD Backlight data */
static struct samsung_bl_gpio_info smdkv210_bl_gpio_info = {
.no = S5PV210_GPD0(3),
.func = S3C_GPIO_SFN(2),
};
static struct platform_pwm_backlight_data smdkv210_bl_data = {
.pwm_id = 3,
};
static void __init smdkv210_map_io(void) static void __init smdkv210_map_io(void)
{ {
s5p_init_io(NULL, 0, S5P_VA_CHIPID); s5p_init_io(NULL, 0, S5P_VA_CHIPID);
...@@ -341,6 +311,8 @@ static void __init smdkv210_machine_init(void) ...@@ -341,6 +311,8 @@ static void __init smdkv210_machine_init(void)
s3c_fb_set_platdata(&smdkv210_lcd0_pdata); s3c_fb_set_platdata(&smdkv210_lcd0_pdata);
samsung_bl_set(&smdkv210_bl_gpio_info, &smdkv210_bl_data);
platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices)); platform_add_devices(smdkv210_devices, ARRAY_SIZE(smdkv210_devices));
} }
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/fb.h> #include <linux/fb.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <mach/regs-fb.h>
#include <mach/map.h> #include <mach/map.h>
#include <plat/fb.h> #include <plat/fb.h>
#include <mach/regs-clock.h> #include <mach/regs-clock.h>
......
...@@ -39,9 +39,10 @@ ...@@ -39,9 +39,10 @@
static void __iomem *ic_regbase; static void __iomem *ic_regbase;
static void __iomem *sic_regbase; static void __iomem *sic_regbase;
static void vt8500_irq_mask(unsigned int irq) static void vt8500_irq_mask(struct irq_data *d)
{ {
void __iomem *base = ic_regbase; void __iomem *base = ic_regbase;
unsigned irq = d->irq;
u8 edge; u8 edge;
if (irq >= 64) { if (irq >= 64) {
...@@ -64,9 +65,10 @@ static void vt8500_irq_mask(unsigned int irq) ...@@ -64,9 +65,10 @@ static void vt8500_irq_mask(unsigned int irq)
} }
} }
static void vt8500_irq_unmask(unsigned int irq) static void vt8500_irq_unmask(struct irq_data *d)
{ {
void __iomem *base = ic_regbase; void __iomem *base = ic_regbase;
unsigned irq = d->irq;
u8 dctr; u8 dctr;
if (irq >= 64) { if (irq >= 64) {
...@@ -78,10 +80,11 @@ static void vt8500_irq_unmask(unsigned int irq) ...@@ -78,10 +80,11 @@ static void vt8500_irq_unmask(unsigned int irq)
writeb(dctr, base + VT8500_IC_DCTR + irq); writeb(dctr, base + VT8500_IC_DCTR + irq);
} }
static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type) static int vt8500_irq_set_type(struct irq_data *d, unsigned int flow_type)
{ {
void __iomem *base = ic_regbase; void __iomem *base = ic_regbase;
unsigned int orig_irq = irq; unsigned irq = d->irq;
unsigned orig_irq = irq;
u8 dctr; u8 dctr;
if (irq >= 64) { if (irq >= 64) {
...@@ -115,10 +118,10 @@ static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type) ...@@ -115,10 +118,10 @@ static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type)
static struct irq_chip vt8500_irq_chip = { static struct irq_chip vt8500_irq_chip = {
.name = "vt8500", .name = "vt8500",
.ack = vt8500_irq_mask, .irq_ack = vt8500_irq_mask,
.mask = vt8500_irq_mask, .irq_mask = vt8500_irq_mask,
.unmask = vt8500_irq_unmask, .irq_unmask = vt8500_irq_unmask,
.set_type = vt8500_irq_set_type, .irq_set_type = vt8500_irq_set_type,
}; };
void __init vt8500_init_irq(void) void __init vt8500_init_irq(void)
......
...@@ -120,17 +120,22 @@ static void l2x0_cache_sync(void) ...@@ -120,17 +120,22 @@ static void l2x0_cache_sync(void)
spin_unlock_irqrestore(&l2x0_lock, flags); spin_unlock_irqrestore(&l2x0_lock, flags);
} }
static void l2x0_flush_all(void) static void __l2x0_flush_all(void)
{ {
unsigned long flags;
/* clean all ways */
spin_lock_irqsave(&l2x0_lock, flags);
debug_writel(0x03); debug_writel(0x03);
writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_INV_WAY); writel_relaxed(l2x0_way_mask, l2x0_base + L2X0_CLEAN_INV_WAY);
cache_wait_way(l2x0_base + L2X0_CLEAN_INV_WAY, l2x0_way_mask); cache_wait_way(l2x0_base + L2X0_CLEAN_INV_WAY, l2x0_way_mask);
cache_sync(); cache_sync();
debug_writel(0x00); debug_writel(0x00);
}
static void l2x0_flush_all(void)
{
unsigned long flags;
/* clean all ways */
spin_lock_irqsave(&l2x0_lock, flags);
__l2x0_flush_all();
spin_unlock_irqrestore(&l2x0_lock, flags); spin_unlock_irqrestore(&l2x0_lock, flags);
} }
...@@ -266,7 +271,9 @@ static void l2x0_disable(void) ...@@ -266,7 +271,9 @@ static void l2x0_disable(void)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&l2x0_lock, flags); spin_lock_irqsave(&l2x0_lock, flags);
writel(0, l2x0_base + L2X0_CTRL); __l2x0_flush_all();
writel_relaxed(0, l2x0_base + L2X0_CTRL);
dsb();
spin_unlock_irqrestore(&l2x0_lock, flags); spin_unlock_irqrestore(&l2x0_lock, flags);
} }
......
...@@ -759,7 +759,7 @@ early_param("vmalloc", early_vmalloc); ...@@ -759,7 +759,7 @@ early_param("vmalloc", early_vmalloc);
static phys_addr_t lowmem_limit __initdata = 0; static phys_addr_t lowmem_limit __initdata = 0;
static void __init sanity_check_meminfo(void) void __init sanity_check_meminfo(void)
{ {
int i, j, highmem = 0; int i, j, highmem = 0;
...@@ -1032,8 +1032,9 @@ void __init paging_init(struct machine_desc *mdesc) ...@@ -1032,8 +1032,9 @@ void __init paging_init(struct machine_desc *mdesc)
{ {
void *zero_page; void *zero_page;
memblock_set_current_limit(lowmem_limit);
build_mem_type_table(); build_mem_type_table();
sanity_check_meminfo();
prepare_page_table(); prepare_page_table();
map_lowmem(); map_lowmem();
devicemaps_init(mdesc); devicemaps_init(mdesc);
......
...@@ -27,6 +27,10 @@ void __init arm_mm_memblock_reserve(void) ...@@ -27,6 +27,10 @@ void __init arm_mm_memblock_reserve(void)
memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE); memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE);
} }
void __init sanity_check_meminfo(void)
{
}
/* /*
* paging_init() sets up the page tables, initialises the zone memory * paging_init() sets up the page tables, initialises the zone memory
* maps, and sets up the zero page, bad page and bad page tables. * maps, and sets up the zero page, bad page and bad page tables.
......
...@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = { ...@@ -169,7 +169,6 @@ static struct clk_ops dclk_ops = {
struct clk s3c24xx_dclk0 = { struct clk s3c24xx_dclk0 = {
.name = "dclk0", .name = "dclk0",
.id = -1,
.ctrlbit = S3C2410_DCLKCON_DCLK0EN, .ctrlbit = S3C2410_DCLKCON_DCLK0EN,
.enable = s3c24xx_dclk_enable, .enable = s3c24xx_dclk_enable,
.ops = &dclk_ops, .ops = &dclk_ops,
...@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = { ...@@ -177,7 +176,6 @@ struct clk s3c24xx_dclk0 = {
struct clk s3c24xx_dclk1 = { struct clk s3c24xx_dclk1 = {
.name = "dclk1", .name = "dclk1",
.id = -1,
.ctrlbit = S3C2410_DCLKCON_DCLK1EN, .ctrlbit = S3C2410_DCLKCON_DCLK1EN,
.enable = s3c24xx_dclk_enable, .enable = s3c24xx_dclk_enable,
.ops = &dclk_ops, .ops = &dclk_ops,
...@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = { ...@@ -189,12 +187,10 @@ static struct clk_ops clkout_ops = {
struct clk s3c24xx_clkout0 = { struct clk s3c24xx_clkout0 = {
.name = "clkout0", .name = "clkout0",
.id = -1,
.ops = &clkout_ops, .ops = &clkout_ops,
}; };
struct clk s3c24xx_clkout1 = { struct clk s3c24xx_clkout1 = {
.name = "clkout1", .name = "clkout1",
.id = -1,
.ops = &clkout_ops, .ops = &clkout_ops,
}; };
...@@ -150,9 +150,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd) ...@@ -150,9 +150,8 @@ void __init s3c24xx_fb_set_platdata(struct s3c2410fb_mach_info *pd)
{ {
struct s3c2410fb_mach_info *npd; struct s3c2410fb_mach_info *npd;
npd = kmemdup(pd, sizeof(*npd), GFP_KERNEL); npd = s3c_set_platdata(pd, sizeof(*npd), &s3c_device_lcd);
if (npd) { if (npd) {
s3c_device_lcd.dev.platform_data = npd;
npd->displays = kmemdup(pd->displays, npd->displays = kmemdup(pd->displays,
sizeof(struct s3c2410fb_display) * npd->num_displays, sizeof(struct s3c2410fb_display) * npd->num_displays,
GFP_KERNEL); GFP_KERNEL);
...@@ -188,12 +187,10 @@ struct platform_device s3c_device_ts = { ...@@ -188,12 +187,10 @@ struct platform_device s3c_device_ts = {
}; };
EXPORT_SYMBOL(s3c_device_ts); EXPORT_SYMBOL(s3c_device_ts);
static struct s3c2410_ts_mach_info s3c2410ts_info;
void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info) void __init s3c24xx_ts_set_platdata(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)
{ {
memcpy(&s3c2410ts_info, hard_s3c2410ts_info, sizeof(struct s3c2410_ts_mach_info)); s3c_set_platdata(hard_s3c2410ts_info,
s3c_device_ts.dev.platform_data = &s3c2410ts_info; sizeof(struct s3c2410_ts_mach_info), &s3c_device_ts);
} }
/* USB Device (Gadget)*/ /* USB Device (Gadget)*/
...@@ -223,15 +220,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget); ...@@ -223,15 +220,7 @@ EXPORT_SYMBOL(s3c_device_usbgadget);
void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd) void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)
{ {
struct s3c2410_udc_mach_info *npd; s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usbgadget);
npd = kmalloc(sizeof(*npd), GFP_KERNEL);
if (npd) {
memcpy(npd, pd, sizeof(*npd));
s3c_device_usbgadget.dev.platform_data = npd;
} else {
printk(KERN_ERR "no memory for udc platform data\n");
}
} }
/* USB High Speed 2.0 Device (Gadget) */ /* USB High Speed 2.0 Device (Gadget) */
...@@ -263,15 +252,7 @@ struct platform_device s3c_device_usb_hsudc = { ...@@ -263,15 +252,7 @@ struct platform_device s3c_device_usb_hsudc = {
void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd) void __init s3c24xx_hsudc_set_platdata(struct s3c24xx_hsudc_platdata *pd)
{ {
struct s3c24xx_hsudc_platdata *npd; s3c_set_platdata(pd, sizeof(*pd), &s3c_device_usb_hsudc);
npd = kmalloc(sizeof(*npd), GFP_KERNEL);
if (npd) {
memcpy(npd, pd, sizeof(*npd));
s3c_device_usb_hsudc.dev.platform_data = npd;
} else {
printk(KERN_ERR "no memory for udc platform data\n");
}
} }
/* IIS */ /* IIS */
...@@ -383,13 +364,8 @@ EXPORT_SYMBOL(s3c_device_sdi); ...@@ -383,13 +364,8 @@ EXPORT_SYMBOL(s3c_device_sdi);
void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata) void __init s3c24xx_mci_set_platdata(struct s3c24xx_mci_pdata *pdata)
{ {
struct s3c24xx_mci_pdata *npd; s3c_set_platdata(pdata, sizeof(struct s3c24xx_mci_pdata),
&s3c_device_sdi);
npd = kmemdup(pdata, sizeof(struct s3c24xx_mci_pdata), GFP_KERNEL);
if (!npd)
printk(KERN_ERR "%s: no memory to copy pdata", __func__);
s3c_device_sdi.dev.platform_data = npd;
} }
......
...@@ -1027,17 +1027,13 @@ int s3c2410_dma_config(unsigned int channel, ...@@ -1027,17 +1027,13 @@ int s3c2410_dma_config(unsigned int channel,
struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel); struct s3c2410_dma_chan *chan = s3c_dma_lookup_channel(channel);
unsigned int dcon; unsigned int dcon;
pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", pr_debug("%s: chan=%d, xfer_unit=%d\n", __func__, channel, xferunit);
__func__, channel, xferunit, dcon);
if (chan == NULL) if (chan == NULL)
return -EINVAL; return -EINVAL;
pr_debug("%s: Initial dcon is %08x\n", __func__, dcon);
dcon = chan->dcon & dma_sel.dcon_mask; dcon = chan->dcon & dma_sel.dcon_mask;
pr_debug("%s: dcon is %08x\n", __func__, dcon);
pr_debug("%s: New dcon is %08x\n", __func__, dcon);
switch (chan->req_ch) { switch (chan->req_ch) {
case DMACH_I2S_IN: case DMACH_I2S_IN:
...@@ -1235,7 +1231,7 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp) ...@@ -1235,7 +1231,7 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp)
/* restore channel's hardware configuration */ /* restore channel's hardware configuration */
if (!cp->in_use) if (!cp->in_use)
return 0; return;
printk(KERN_INFO "dma%d: restoring configuration\n", cp->number); printk(KERN_INFO "dma%d: restoring configuration\n", cp->number);
...@@ -1246,8 +1242,6 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp) ...@@ -1246,8 +1242,6 @@ static void s3c2410_dma_resume_chan(struct s3c2410_dma_chan *cp)
if (cp->map != NULL) if (cp->map != NULL)
dma_sel.select(cp, cp->map); dma_sel.select(cp, cp->map);
return 0;
} }
static void s3c2410_dma_resume(void) static void s3c2410_dma_resume(void)
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册