提交 7a04c4cb 编写于 作者: T Tony Lindgren

Merge branch 'for_3.2/omap_device' of git://gitorious.org/khilman/linux-omap-pm into cleanup

...@@ -1455,7 +1455,7 @@ Applicable to the H264 encoder.</entry> ...@@ -1455,7 +1455,7 @@ Applicable to the H264 encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-h264-vui-sar-idc">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_IDC</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_video_h264_vui_sar_idc</entry> <entry>enum&nbsp;v4l2_mpeg_video_h264_vui_sar_idc</entry>
</row> </row>
...@@ -1561,7 +1561,7 @@ Applicable to the H264 encoder.</entry> ...@@ -1561,7 +1561,7 @@ Applicable to the H264 encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-h264-level">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LEVEL</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_video_h264_level</entry> <entry>enum&nbsp;v4l2_mpeg_video_h264_level</entry>
</row> </row>
...@@ -1641,7 +1641,7 @@ Possible values are:</entry> ...@@ -1641,7 +1641,7 @@ Possible values are:</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-mpeg4-level">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_video_mpeg4_level</entry> <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_level</entry>
</row> </row>
...@@ -1689,9 +1689,9 @@ Possible values are:</entry> ...@@ -1689,9 +1689,9 @@ Possible values are:</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-h264-profile">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_PROFILE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_h264_profile</entry> <entry>enum&nbsp;v4l2_mpeg_video_h264_profile</entry>
</row> </row>
<row><entry spanname="descr">The profile information for H264. <row><entry spanname="descr">The profile information for H264.
Applicable to the H264 encoder. Applicable to the H264 encoder.
...@@ -1774,9 +1774,9 @@ Possible values are:</entry> ...@@ -1774,9 +1774,9 @@ Possible values are:</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-mpeg4-profile">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_mpeg4_profile</entry> <entry>enum&nbsp;v4l2_mpeg_video_mpeg4_profile</entry>
</row> </row>
<row><entry spanname="descr">The profile information for MPEG4. <row><entry spanname="descr">The profile information for MPEG4.
Applicable to the MPEG4 encoder. Applicable to the MPEG4 encoder.
...@@ -1820,9 +1820,9 @@ Applicable to the encoder. ...@@ -1820,9 +1820,9 @@ Applicable to the encoder.
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-multi-slice-mode">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_MULTI_SLICE_MODE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_multi_slice_mode</entry> <entry>enum&nbsp;v4l2_mpeg_video_multi_slice_mode</entry>
</row> </row>
<row><entry spanname="descr">Determines how the encoder should handle division of frame into slices. <row><entry spanname="descr">Determines how the encoder should handle division of frame into slices.
Applicable to the encoder. Applicable to the encoder.
...@@ -1868,9 +1868,9 @@ Applicable to the encoder.</entry> ...@@ -1868,9 +1868,9 @@ Applicable to the encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-h264-loop-filter-mode">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_LOOP_FILTER_MODE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_h264_loop_filter_mode</entry> <entry>enum&nbsp;v4l2_mpeg_video_h264_loop_filter_mode</entry>
</row> </row>
<row><entry spanname="descr">Loop filter mode for H264 encoder. <row><entry spanname="descr">Loop filter mode for H264 encoder.
Possible values are:</entry> Possible values are:</entry>
...@@ -1913,9 +1913,9 @@ Applicable to the H264 encoder.</entry> ...@@ -1913,9 +1913,9 @@ Applicable to the H264 encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-h264-entropy-mode">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_H264_ENTROPY_MODE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_h264_symbol_mode</entry> <entry>enum&nbsp;v4l2_mpeg_video_h264_entropy_mode</entry>
</row> </row>
<row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC. <row><entry spanname="descr">Entropy coding mode for H264 - CABAC/CAVALC.
Applicable to the H264 encoder. Applicable to the H264 encoder.
...@@ -2140,9 +2140,9 @@ previous frames. Applicable to the H264 encoder.</entry> ...@@ -2140,9 +2140,9 @@ previous frames. Applicable to the H264 encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-video-header-mode">
<entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_VIDEO_HEADER_MODE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_header_mode</entry> <entry>enum&nbsp;v4l2_mpeg_video_header_mode</entry>
</row> </row>
<row><entry spanname="descr">Determines whether the header is returned as the first buffer or is <row><entry spanname="descr">Determines whether the header is returned as the first buffer or is
it returned together with the first frame. Applicable to encoders. it returned together with the first frame. Applicable to encoders.
...@@ -2320,9 +2320,9 @@ Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPE ...@@ -2320,9 +2320,9 @@ Valid only when H.264 and macroblock level RC is enabled (<constant>V4L2_CID_MPE
Applicable to the H264 encoder.</entry> Applicable to the H264 encoder.</entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-mfc51-video-frame-skip-mode">
<entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FRAME_SKIP_MODE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_mfc51_frame_skip_mode</entry> <entry>enum&nbsp;v4l2_mpeg_mfc51_video_frame_skip_mode</entry>
</row> </row>
<row><entry spanname="descr"> <row><entry spanname="descr">
Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then Indicates in what conditions the encoder should skip frames. If encoding a frame would cause the encoded stream to be larger then
...@@ -2361,9 +2361,9 @@ the stream will meet tight bandwidth contraints. Applicable to encoders. ...@@ -2361,9 +2361,9 @@ the stream will meet tight bandwidth contraints. Applicable to encoders.
</entry> </entry>
</row> </row>
<row><entry></entry></row> <row><entry></entry></row>
<row> <row id="v4l2-mpeg-mfc51-video-force-frame-type">
<entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant>&nbsp;</entry> <entry spanname="id"><constant>V4L2_CID_MPEG_MFC51_VIDEO_FORCE_FRAME_TYPE</constant>&nbsp;</entry>
<entry>enum&nbsp;v4l2_mpeg_mfc51_force_frame_type</entry> <entry>enum&nbsp;v4l2_mpeg_mfc51_video_force_frame_type</entry>
</row> </row>
<row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders. <row><entry spanname="descr">Force a frame type for the next queued buffer. Applicable to encoders.
Possible values are:</entry> Possible values are:</entry>
......
...@@ -592,3 +592,11 @@ Why: In 3.0, we can now autodetect internal 3G device and already have ...@@ -592,3 +592,11 @@ Why: In 3.0, we can now autodetect internal 3G device and already have
interface that was used by acer-wmi driver. It will replaced by interface that was used by acer-wmi driver. It will replaced by
information log when acer-wmi initial. information log when acer-wmi initial.
Who: Lee, Chun-Yi <jlee@novell.com> Who: Lee, Chun-Yi <jlee@novell.com>
----------------------------
What: The XFS nodelaylog mount option
When: 3.3
Why: The delaylog mode that has been the default since 2.6.39 has proven
stable, and the old code is in the way of additional improvements in
the log code.
Who: Christoph Hellwig <hch@lst.de>
...@@ -62,6 +62,13 @@ can be safely used to identify the chip. You will have to instantiate ...@@ -62,6 +62,13 @@ can be safely used to identify the chip. You will have to instantiate
the devices explicitly. Please see Documentation/i2c/instantiating-devices for the devices explicitly. Please see Documentation/i2c/instantiating-devices for
details. details.
WARNING: Do not access chip registers using the i2cdump command, and do not use
any of the i2ctools commands on a command register (0xa5 to 0xac). The chips
supported by this driver interpret any access to a command register (including
read commands) as request to execute the command in question. This may result in
power loss, board resets, and/or Flash corruption. Worst case, your board may
turn into a brick.
Sysfs entries Sysfs entries
------------- -------------
......
...@@ -319,4 +319,6 @@ Code Seq#(hex) Include File Comments ...@@ -319,4 +319,6 @@ Code Seq#(hex) Include File Comments
<mailto:thomas@winischhofer.net> <mailto:thomas@winischhofer.net>
0xF4 00-1F video/mbxfb.h mbxfb 0xF4 00-1F video/mbxfb.h mbxfb
<mailto:raph@8d.com> <mailto:raph@8d.com>
0xF6 all LTTng Linux Trace Toolkit Next Generation
<mailto:mathieu.desnoyers@efficios.com>
0xFD all linux/dm-ioctl.h 0xFD all linux/dm-ioctl.h
...@@ -2649,11 +2649,11 @@ F: drivers/net/wan/dlci.c ...@@ -2649,11 +2649,11 @@ F: drivers/net/wan/dlci.c
F: drivers/net/wan/sdla.c F: drivers/net/wan/sdla.c
FRAMEBUFFER LAYER FRAMEBUFFER LAYER
M: Paul Mundt <lethal@linux-sh.org> M: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
L: linux-fbdev@vger.kernel.org L: linux-fbdev@vger.kernel.org
W: http://linux-fbdev.sourceforge.net/ W: http://linux-fbdev.sourceforge.net/
Q: http://patchwork.kernel.org/project/linux-fbdev/list/ Q: http://patchwork.kernel.org/project/linux-fbdev/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git T: git git://github.com/schandinat/linux-2.6.git fbdev-next
S: Maintained S: Maintained
F: Documentation/fb/ F: Documentation/fb/
F: Documentation/devicetree/bindings/fb/ F: Documentation/devicetree/bindings/fb/
...@@ -4450,8 +4450,8 @@ M: "David S. Miller" <davem@davemloft.net> ...@@ -4450,8 +4450,8 @@ M: "David S. Miller" <davem@davemloft.net>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
W: http://www.linuxfoundation.org/en/Net W: http://www.linuxfoundation.org/en/Net
W: http://patchwork.ozlabs.org/project/netdev/list/ W: http://patchwork.ozlabs.org/project/netdev/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git
T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6.git T: git git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
S: Maintained S: Maintained
F: net/ F: net/
F: include/net/ F: include/net/
......
VERSION = 3 VERSION = 3
PATCHLEVEL = 1 PATCHLEVEL = 1
SUBLEVEL = 0 SUBLEVEL = 0
EXTRAVERSION = -rc4 EXTRAVERSION = -rc6
NAME = "Divemaster Edition" NAME = "Divemaster Edition"
# *DOCUMENTATION* # *DOCUMENTATION*
......
...@@ -1271,6 +1271,18 @@ config ARM_ERRATA_754327 ...@@ -1271,6 +1271,18 @@ config ARM_ERRATA_754327
This workaround defines cpu_relax() as smp_mb(), preventing correctly This workaround defines cpu_relax() as smp_mb(), preventing correctly
written polling loops from denying visibility of updates to memory. written polling loops from denying visibility of updates to memory.
config ARM_ERRATA_364296
bool "ARM errata: Possible cache data corruption with hit-under-miss enabled"
depends on CPU_V6 && !SMP
help
This options enables the workaround for the 364296 ARM1136
r0p2 erratum (possible cache data corruption with
hit-under-miss enabled). It sets the undocumented bit 31 in
the auxiliary control register and the FI bit in the control
register, thus disabling hit-under-miss without putting the
processor into full low interrupt latency mode. ARM11MPCore
is not affected.
endmenu endmenu
source "arch/arm/common/Kconfig" source "arch/arm/common/Kconfig"
......
...@@ -82,7 +82,7 @@ asmlinkage void mmc_loader(unsigned char *buf, unsigned long len) ...@@ -82,7 +82,7 @@ asmlinkage void mmc_loader(unsigned char *buf, unsigned long len)
/* Disable clock to MMC hardware block */ /* Disable clock to MMC hardware block */
__raw_writel(__raw_readl(SMSTPCR3) & (1 << 12), SMSTPCR3); __raw_writel(__raw_readl(SMSTPCR3) | (1 << 12), SMSTPCR3);
mmc_update_progress(MMC_PROGRESS_DONE); mmc_update_progress(MMC_PROGRESS_DONE);
} }
...@@ -85,7 +85,7 @@ asmlinkage void mmc_loader(unsigned short *buf, unsigned long len) ...@@ -85,7 +85,7 @@ asmlinkage void mmc_loader(unsigned short *buf, unsigned long len)
goto err; goto err;
/* Disable clock to SDHI1 hardware block */ /* Disable clock to SDHI1 hardware block */
__raw_writel(__raw_readl(SMSTPCR3) & (1 << 13), SMSTPCR3); __raw_writel(__raw_readl(SMSTPCR3) | (1 << 13), SMSTPCR3);
mmc_update_progress(MMC_PROGRESS_DONE); mmc_update_progress(MMC_PROGRESS_DONE);
......
...@@ -12,7 +12,12 @@ struct dev_archdata { ...@@ -12,7 +12,12 @@ struct dev_archdata {
#endif #endif
}; };
struct omap_device;
struct pdev_archdata { struct pdev_archdata {
#ifdef CONFIG_ARCH_OMAP
struct omap_device *od;
#endif
}; };
#endif #endif
...@@ -45,8 +45,13 @@ ...@@ -45,8 +45,13 @@
#define L2X0_CLEAN_INV_LINE_PA 0x7F0 #define L2X0_CLEAN_INV_LINE_PA 0x7F0
#define L2X0_CLEAN_INV_LINE_IDX 0x7F8 #define L2X0_CLEAN_INV_LINE_IDX 0x7F8
#define L2X0_CLEAN_INV_WAY 0x7FC #define L2X0_CLEAN_INV_WAY 0x7FC
#define L2X0_LOCKDOWN_WAY_D 0x900 /*
#define L2X0_LOCKDOWN_WAY_I 0x904 * The lockdown registers repeat 8 times for L310, the L210 has only one
* D and one I lockdown register at 0x0900 and 0x0904.
*/
#define L2X0_LOCKDOWN_WAY_D_BASE 0x900
#define L2X0_LOCKDOWN_WAY_I_BASE 0x904
#define L2X0_LOCKDOWN_STRIDE 0x08
#define L2X0_TEST_OPERATION 0xF00 #define L2X0_TEST_OPERATION 0xF00
#define L2X0_LINE_DATA 0xF10 #define L2X0_LINE_DATA 0xF10
#define L2X0_LINE_TAG 0xF30 #define L2X0_LINE_TAG 0xF30
...@@ -64,7 +69,7 @@ ...@@ -64,7 +69,7 @@
#define L2X0_AUX_CTRL_MASK 0xc0000fff #define L2X0_AUX_CTRL_MASK 0xc0000fff
#define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16 #define L2X0_AUX_CTRL_ASSOCIATIVITY_SHIFT 16
#define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17 #define L2X0_AUX_CTRL_WAY_SIZE_SHIFT 17
#define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x3 << 17) #define L2X0_AUX_CTRL_WAY_SIZE_MASK (0x7 << 17)
#define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22 #define L2X0_AUX_CTRL_SHARE_OVERRIDE_SHIFT 22
#define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26 #define L2X0_AUX_CTRL_NS_LOCKDOWN_SHIFT 26
#define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27 #define L2X0_AUX_CTRL_NS_INT_CTRL_SHIFT 27
......
...@@ -41,7 +41,7 @@ struct arm_pmu_platdata { ...@@ -41,7 +41,7 @@ struct arm_pmu_platdata {
* encoded error on failure. * encoded error on failure.
*/ */
extern struct platform_device * extern struct platform_device *
reserve_pmu(enum arm_pmu_type device); reserve_pmu(enum arm_pmu_type type);
/** /**
* release_pmu() - Relinquish control of the performance counters * release_pmu() - Relinquish control of the performance counters
...@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type); ...@@ -62,26 +62,26 @@ release_pmu(enum arm_pmu_type type);
* the actual hardware initialisation. * the actual hardware initialisation.
*/ */
extern int extern int
init_pmu(enum arm_pmu_type device); init_pmu(enum arm_pmu_type type);
#else /* CONFIG_CPU_HAS_PMU */ #else /* CONFIG_CPU_HAS_PMU */
#include <linux/err.h> #include <linux/err.h>
static inline struct platform_device * static inline struct platform_device *
reserve_pmu(enum arm_pmu_type device) reserve_pmu(enum arm_pmu_type type)
{ {
return ERR_PTR(-ENODEV); return ERR_PTR(-ENODEV);
} }
static inline int static inline int
release_pmu(struct platform_device *pdev) release_pmu(enum arm_pmu_type type)
{ {
return -ENODEV; return -ENODEV;
} }
static inline int static inline int
init_pmu(enum arm_pmu_type device) init_pmu(enum arm_pmu_type type)
{ {
return -ENODEV; return -ENODEV;
} }
......
...@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev, ...@@ -31,7 +31,7 @@ static int __devinit pmu_register(struct platform_device *pdev,
{ {
if (type < 0 || type >= ARM_NUM_PMU_DEVICES) { if (type < 0 || type >= ARM_NUM_PMU_DEVICES) {
pr_warning("received registration request for unknown " pr_warning("received registration request for unknown "
"device %d\n", type); "PMU device type %d\n", type);
return -EINVAL; return -EINVAL;
} }
...@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void) ...@@ -112,17 +112,17 @@ static int __init register_pmu_driver(void)
device_initcall(register_pmu_driver); device_initcall(register_pmu_driver);
struct platform_device * struct platform_device *
reserve_pmu(enum arm_pmu_type device) reserve_pmu(enum arm_pmu_type type)
{ {
struct platform_device *pdev; struct platform_device *pdev;
if (test_and_set_bit_lock(device, &pmu_lock)) { if (test_and_set_bit_lock(type, &pmu_lock)) {
pdev = ERR_PTR(-EBUSY); pdev = ERR_PTR(-EBUSY);
} else if (pmu_devices[device] == NULL) { } else if (pmu_devices[type] == NULL) {
clear_bit_unlock(device, &pmu_lock); clear_bit_unlock(type, &pmu_lock);
pdev = ERR_PTR(-ENODEV); pdev = ERR_PTR(-ENODEV);
} else { } else {
pdev = pmu_devices[device]; pdev = pmu_devices[type];
} }
return pdev; return pdev;
...@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device) ...@@ -130,11 +130,11 @@ reserve_pmu(enum arm_pmu_type device)
EXPORT_SYMBOL_GPL(reserve_pmu); EXPORT_SYMBOL_GPL(reserve_pmu);
int int
release_pmu(enum arm_pmu_type device) release_pmu(enum arm_pmu_type type)
{ {
if (WARN_ON(!pmu_devices[device])) if (WARN_ON(!pmu_devices[type]))
return -EINVAL; return -EINVAL;
clear_bit_unlock(device, &pmu_lock); clear_bit_unlock(type, &pmu_lock);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(release_pmu); EXPORT_SYMBOL_GPL(release_pmu);
...@@ -182,17 +182,17 @@ init_cpu_pmu(void) ...@@ -182,17 +182,17 @@ init_cpu_pmu(void)
} }
int int
init_pmu(enum arm_pmu_type device) init_pmu(enum arm_pmu_type type)
{ {
int err = 0; int err = 0;
switch (device) { switch (type) {
case ARM_PMU_DEVICE_CPU: case ARM_PMU_DEVICE_CPU:
err = init_cpu_pmu(); err = init_cpu_pmu();
break; break;
default: default:
pr_warning("attempt to initialise unknown device %d\n", pr_warning("attempt to initialise PMU of unknown "
device); "type %d\n", type);
err = -EINVAL; err = -EINVAL;
} }
......
...@@ -57,7 +57,8 @@ relocate_new_kernel: ...@@ -57,7 +57,8 @@ relocate_new_kernel:
mov r0,#0 mov r0,#0
ldr r1,kexec_mach_type ldr r1,kexec_mach_type
ldr r2,kexec_boot_atags ldr r2,kexec_boot_atags
mov pc,lr ARM( mov pc, lr )
THUMB( bx lr )
.align .align
......
...@@ -280,18 +280,19 @@ static void __init cacheid_init(void) ...@@ -280,18 +280,19 @@ static void __init cacheid_init(void)
if (arch >= CPU_ARCH_ARMv6) { if (arch >= CPU_ARCH_ARMv6) {
if ((cachetype & (7 << 29)) == 4 << 29) { if ((cachetype & (7 << 29)) == 4 << 29) {
/* ARMv7 register format */ /* ARMv7 register format */
arch = CPU_ARCH_ARMv7;
cacheid = CACHEID_VIPT_NONALIASING; cacheid = CACHEID_VIPT_NONALIASING;
if ((cachetype & (3 << 14)) == 1 << 14) if ((cachetype & (3 << 14)) == 1 << 14)
cacheid |= CACHEID_ASID_TAGGED; cacheid |= CACHEID_ASID_TAGGED;
else if (cpu_has_aliasing_icache(CPU_ARCH_ARMv7))
cacheid |= CACHEID_VIPT_I_ALIASING;
} else if (cachetype & (1 << 23)) {
cacheid = CACHEID_VIPT_ALIASING;
} else { } else {
cacheid = CACHEID_VIPT_NONALIASING; arch = CPU_ARCH_ARMv6;
if (cpu_has_aliasing_icache(CPU_ARCH_ARMv6)) if (cachetype & (1 << 23))
cacheid |= CACHEID_VIPT_I_ALIASING; cacheid = CACHEID_VIPT_ALIASING;
else
cacheid = CACHEID_VIPT_NONALIASING;
} }
if (cpu_has_aliasing_icache(arch))
cacheid |= CACHEID_VIPT_I_ALIASING;
} else { } else {
cacheid = CACHEID_VIVT; cacheid = CACHEID_VIVT;
} }
......
...@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk) ...@@ -137,8 +137,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk); clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk);
clk->min_delta_ns = clockevent_delta2ns(0xf, clk); clk->min_delta_ns = clockevent_delta2ns(0xf, clk);
clockevents_register_device(clk);
/* Make sure our local interrupt controller has this enabled */ /* Make sure our local interrupt controller has this enabled */
gic_enable_ppi(clk->irq); gic_enable_ppi(clk->irq);
clockevents_register_device(clk);
} }
...@@ -157,7 +157,7 @@ static struct clk_lookup periph_clocks_lookups[] = { ...@@ -157,7 +157,7 @@ static struct clk_lookup periph_clocks_lookups[] = {
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk), CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk), CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tc0_clk),
CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk), CLKDEV_CON_DEV_ID("t1_clk", "atmel_tcb.0", &tc1_clk),
CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc1_clk), CLKDEV_CON_DEV_ID("t2_clk", "atmel_tcb.0", &tc2_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk), CLKDEV_CON_DEV_ID("pclk", "ssc.2", &ssc2_clk),
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
* published by the Free Software Foundation. * published by the Free Software Foundation.
*/ */
#include <mach/hardware.h>
#include <asm/hardware/entry-macro-gic.S> #include <asm/hardware/entry-macro-gic.S>
.macro disable_fiq .macro disable_fiq
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
#include <mach/hardware.h>
static inline void arch_idle(void) static inline void arch_idle(void)
{ {
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
*/ */
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <mach/hardware.h>
#include <mach/cns3xxx.h> #include <mach/cns3xxx.h>
#define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00)) #define AMBA_UART_DR(base) (*(volatile unsigned char *)((base) + 0x00))
......
...@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata) ...@@ -49,7 +49,7 @@ static struct cns3xxx_pcie *sysdata_to_cnspci(void *sysdata)
return &cns3xxx_pcie[root->domain]; return &cns3xxx_pcie[root->domain];
} }
static struct cns3xxx_pcie *pdev_to_cnspci(struct pci_dev *dev) static struct cns3xxx_pcie *pdev_to_cnspci(const struct pci_dev *dev)
{ {
return sysdata_to_cnspci(dev->sysdata); return sysdata_to_cnspci(dev->sysdata);
} }
......
...@@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = { ...@@ -115,6 +115,32 @@ static struct spi_board_info da850evm_spi_info[] = {
}, },
}; };
#ifdef CONFIG_MTD
static void da850_evm_m25p80_notify_add(struct mtd_info *mtd)
{
char *mac_addr = davinci_soc_info.emac_pdata->mac_addr;
size_t retlen;
if (!strcmp(mtd->name, "MAC-Address")) {
mtd->read(mtd, 0, ETH_ALEN, &retlen, mac_addr);
if (retlen == ETH_ALEN)
pr_info("Read MAC addr from SPI Flash: %pM\n",
mac_addr);
}
}
static struct mtd_notifier da850evm_spi_notifier = {
.add = da850_evm_m25p80_notify_add,
};
static void da850_evm_setup_mac_addr(void)
{
register_mtd_user(&da850evm_spi_notifier);
}
#else
static void da850_evm_setup_mac_addr(void) { }
#endif
static struct mtd_partition da850_evm_norflash_partition[] = { static struct mtd_partition da850_evm_norflash_partition[] = {
{ {
.name = "bootloaders + env", .name = "bootloaders + env",
...@@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void) ...@@ -1244,6 +1270,8 @@ static __init void da850_evm_init(void)
if (ret) if (ret)
pr_warning("da850_evm_init: sata registration failed: %d\n", pr_warning("da850_evm_init: sata registration failed: %d\n",
ret); ret);
da850_evm_setup_mac_addr();
} }
#ifdef CONFIG_SERIAL_8250_CONSOLE #ifdef CONFIG_SERIAL_8250_CONSOLE
......
...@@ -243,7 +243,7 @@ ...@@ -243,7 +243,7 @@
#define PSC_STATE_DISABLE 2 #define PSC_STATE_DISABLE 2
#define PSC_STATE_ENABLE 3 #define PSC_STATE_ENABLE 3
#define MDSTAT_STATE_MASK 0x1f #define MDSTAT_STATE_MASK 0x3f
#define MDCTL_FORCE BIT(31) #define MDCTL_FORCE BIT(31)
#ifndef __ASSEMBLER__ #ifndef __ASSEMBLER__
......
...@@ -217,7 +217,11 @@ ddr2clk_stop_done: ...@@ -217,7 +217,11 @@ ddr2clk_stop_done:
ENDPROC(davinci_ddr_psc_config) ENDPROC(davinci_ddr_psc_config)
CACHE_FLUSH: CACHE_FLUSH:
.word arm926_flush_kern_cache_all #ifdef CONFIG_CPU_V6
.word v6_flush_kern_cache_all
#else
.word arm926_flush_kern_cache_all
#endif
ENTRY(davinci_cpu_suspend_sz) ENTRY(davinci_cpu_suspend_sz)
.word . - davinci_cpu_suspend .word . - davinci_cpu_suspend
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* TS72xx memory map: * TS72xx memory map:
* *
* virt phys size * virt phys size
* febff000 22000000 4K model number register * febff000 22000000 4K model number register (bits 0-2)
* febfe000 22400000 4K options register * febfe000 22400000 4K options register
* febfd000 22800000 4K options register #2 * febfd000 22800000 4K options register #2
* febf9000 10800000 4K TS-5620 RTC index register * febf9000 10800000 4K TS-5620 RTC index register
...@@ -20,6 +20,9 @@ ...@@ -20,6 +20,9 @@
#define TS72XX_MODEL_TS7200 0x00 #define TS72XX_MODEL_TS7200 0x00
#define TS72XX_MODEL_TS7250 0x01 #define TS72XX_MODEL_TS7250 0x01
#define TS72XX_MODEL_TS7260 0x02 #define TS72XX_MODEL_TS7260 0x02
#define TS72XX_MODEL_TS7300 0x03
#define TS72XX_MODEL_TS7400 0x04
#define TS72XX_MODEL_MASK 0x07
#define TS72XX_OPTIONS_PHYS_BASE 0x22400000 #define TS72XX_OPTIONS_PHYS_BASE 0x22400000
...@@ -51,19 +54,34 @@ ...@@ -51,19 +54,34 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
static inline int ts72xx_model(void)
{
return __raw_readb(TS72XX_MODEL_VIRT_BASE) & TS72XX_MODEL_MASK;
}
static inline int board_is_ts7200(void) static inline int board_is_ts7200(void)
{ {
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7200; return ts72xx_model() == TS72XX_MODEL_TS7200;
} }
static inline int board_is_ts7250(void) static inline int board_is_ts7250(void)
{ {
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7250; return ts72xx_model() == TS72XX_MODEL_TS7250;
} }
static inline int board_is_ts7260(void) static inline int board_is_ts7260(void)
{ {
return __raw_readb(TS72XX_MODEL_VIRT_BASE) == TS72XX_MODEL_TS7260; return ts72xx_model() == TS72XX_MODEL_TS7260;
}
static inline int board_is_ts7300(void)
{
return ts72xx_model() == TS72XX_MODEL_TS7300;
}
static inline int board_is_ts7400(void)
{
return ts72xx_model() == TS72XX_MODEL_TS7400;
} }
static inline int is_max197_installed(void) static inline int is_max197_installed(void)
......
...@@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = { ...@@ -520,7 +520,7 @@ static struct clk init_clocks_off[] = {
.ctrlbit = (1 << 21), .ctrlbit = (1 << 21),
}, { }, {
.name = "ac97", .name = "ac97",
.id = -1, .devname = "samsung-ac97",
.enable = exynos4_clk_ip_peril_ctrl, .enable = exynos4_clk_ip_peril_ctrl,
.ctrlbit = (1 << 27), .ctrlbit = (1 << 27),
}, { }, {
......
...@@ -24,12 +24,13 @@ ...@@ -24,12 +24,13 @@
#include <plat/exynos4.h> #include <plat/exynos4.h>
#include <plat/adc-core.h> #include <plat/adc-core.h>
#include <plat/sdhci.h> #include <plat/sdhci.h>
#include <plat/devs.h>
#include <plat/fb-core.h> #include <plat/fb-core.h>
#include <plat/fimc-core.h> #include <plat/fimc-core.h>
#include <plat/iic-core.h> #include <plat/iic-core.h>
#include <plat/reset.h>
#include <mach/regs-irq.h> #include <mach/regs-irq.h>
#include <mach/regs-pmu.h>
extern int combiner_init(unsigned int combiner_nr, void __iomem *base, extern int combiner_init(unsigned int combiner_nr, void __iomem *base,
unsigned int irq_start); unsigned int irq_start);
...@@ -128,6 +129,11 @@ static void exynos4_idle(void) ...@@ -128,6 +129,11 @@ static void exynos4_idle(void)
local_irq_enable(); local_irq_enable();
} }
static void exynos4_sw_reset(void)
{
__raw_writel(0x1, S5P_SWRESET);
}
/* /*
* exynos4_map_io * exynos4_map_io
* *
...@@ -241,5 +247,8 @@ int __init exynos4_init(void) ...@@ -241,5 +247,8 @@ int __init exynos4_init(void)
/* set idle function */ /* set idle function */
pm_idle = exynos4_idle; pm_idle = exynos4_idle;
/* set sw_reset function */
s5p_reset_hook = exynos4_sw_reset;
return sysdev_register(&exynos4_sysdev); return sysdev_register(&exynos4_sysdev);
} }
...@@ -80,9 +80,8 @@ ...@@ -80,9 +80,8 @@
#define IRQ_HSMMC3 IRQ_SPI(76) #define IRQ_HSMMC3 IRQ_SPI(76)
#define IRQ_DWMCI IRQ_SPI(77) #define IRQ_DWMCI IRQ_SPI(77)
#define IRQ_MIPICSI0 IRQ_SPI(78) #define IRQ_MIPI_CSIS0 IRQ_SPI(78)
#define IRQ_MIPI_CSIS1 IRQ_SPI(80)
#define IRQ_MIPICSI1 IRQ_SPI(80)
#define IRQ_ONENAND_AUDI IRQ_SPI(82) #define IRQ_ONENAND_AUDI IRQ_SPI(82)
#define IRQ_ROTATOR IRQ_SPI(83) #define IRQ_ROTATOR IRQ_SPI(83)
......
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#define S5P_USE_STANDBY_WFE1 (1 << 25) #define S5P_USE_STANDBY_WFE1 (1 << 25)
#define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24)) #define S5P_USE_MASK ((0x3 << 16) | (0x3 << 24))
#define S5P_SWRESET S5P_PMUREG(0x0400)
#define S5P_WAKEUP_STAT S5P_PMUREG(0x0600) #define S5P_WAKEUP_STAT S5P_PMUREG(0x0600)
#define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604) #define S5P_EINT_WAKEUP_MASK S5P_PMUREG(0x0604)
#define S5P_WAKEUP_MASK S5P_PMUREG(0x0608) #define S5P_WAKEUP_MASK S5P_PMUREG(0x0608)
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <mach/regs-gpio.h> #include <mach/regs-gpio.h>
#include <asm/mach/irq.h>
static DEFINE_SPINLOCK(eint_lock); static DEFINE_SPINLOCK(eint_lock);
static unsigned int eint0_15_data[16]; static unsigned int eint0_15_data[16];
...@@ -184,8 +186,11 @@ static inline void exynos4_irq_demux_eint(unsigned int start) ...@@ -184,8 +186,11 @@ static inline void exynos4_irq_demux_eint(unsigned int start)
static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc) static void exynos4_irq_demux_eint16_31(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = irq_get_chip(irq);
chained_irq_enter(chip, desc);
exynos4_irq_demux_eint(IRQ_EINT(16)); exynos4_irq_demux_eint(IRQ_EINT(16));
exynos4_irq_demux_eint(IRQ_EINT(24)); exynos4_irq_demux_eint(IRQ_EINT(24));
chained_irq_exit(chip, desc);
} }
static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
...@@ -193,6 +198,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) ...@@ -193,6 +198,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
u32 *irq_data = irq_get_handler_data(irq); u32 *irq_data = irq_get_handler_data(irq);
struct irq_chip *chip = irq_get_chip(irq); struct irq_chip *chip = irq_get_chip(irq);
chained_irq_enter(chip, desc);
chip->irq_mask(&desc->irq_data); chip->irq_mask(&desc->irq_data);
if (chip->irq_ack) if (chip->irq_ack)
...@@ -201,6 +207,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc) ...@@ -201,6 +207,7 @@ static void exynos4_irq_eint0_15(unsigned int irq, struct irq_desc *desc)
generic_handle_irq(*irq_data); generic_handle_irq(*irq_data);
chip->irq_unmask(&desc->irq_data); chip->irq_unmask(&desc->irq_data);
chained_irq_exit(chip, desc);
} }
int __init exynos4_init_irq_eint(void) int __init exynos4_init_irq_eint(void)
......
...@@ -79,7 +79,7 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = { ...@@ -79,7 +79,7 @@ static struct s3c2410_uartcfg universal_uartcfgs[] __initdata = {
}; };
static struct regulator_consumer_supply max8952_consumer = static struct regulator_consumer_supply max8952_consumer =
REGULATOR_SUPPLY("vddarm", NULL); REGULATOR_SUPPLY("vdd_arm", NULL);
static struct max8952_platform_data universal_max8952_pdata __initdata = { static struct max8952_platform_data universal_max8952_pdata __initdata = {
.gpio_vid0 = EXYNOS4_GPX0(3), .gpio_vid0 = EXYNOS4_GPX0(3),
...@@ -105,7 +105,7 @@ static struct max8952_platform_data universal_max8952_pdata __initdata = { ...@@ -105,7 +105,7 @@ static struct max8952_platform_data universal_max8952_pdata __initdata = {
}; };
static struct regulator_consumer_supply lp3974_buck1_consumer = static struct regulator_consumer_supply lp3974_buck1_consumer =
REGULATOR_SUPPLY("vddint", NULL); REGULATOR_SUPPLY("vdd_int", NULL);
static struct regulator_consumer_supply lp3974_buck2_consumer = static struct regulator_consumer_supply lp3974_buck2_consumer =
REGULATOR_SUPPLY("vddg3d", NULL); REGULATOR_SUPPLY("vddg3d", NULL);
......
...@@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device *pdev) ...@@ -82,7 +82,7 @@ static int exynos4_usb_phy1_init(struct platform_device *pdev)
rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK); rstcon &= ~(HOST_LINK_PORT_SWRST_MASK | PHY1_SWRST_MASK);
writel(rstcon, EXYNOS4_RSTCON); writel(rstcon, EXYNOS4_RSTCON);
udelay(50); udelay(80);
clk_disable(otg_clk); clk_disable(otg_clk);
clk_put(otg_clk); clk_put(otg_clk);
......
...@@ -62,6 +62,7 @@ config ARCH_EBSA285_HOST ...@@ -62,6 +62,7 @@ config ARCH_EBSA285_HOST
config ARCH_NETWINDER config ARCH_NETWINDER
bool "NetWinder" bool "NetWinder"
select CLKSRC_I8253 select CLKSRC_I8253
select CLKEVT_I8253
select FOOTBRIDGE_HOST select FOOTBRIDGE_HOST
select ISA select ISA
select ISA_DMA select ISA_DMA
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <video/vga.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
......
...@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = { ...@@ -310,7 +310,7 @@ static struct sys_timer eukrea_cpuimx27_timer = {
.init = eukrea_cpuimx27_timer_init, .init = eukrea_cpuimx27_timer_init,
}; };
MACHINE_START(CPUIMX27, "EUKREA CPUIMX27") MACHINE_START(EUKREA_CPUIMX27, "EUKREA CPUIMX27")
.boot_params = MX27_PHYS_OFFSET + 0x100, .boot_params = MX27_PHYS_OFFSET + 0x100,
.map_io = mx27_map_io, .map_io = mx27_map_io,
.init_early = imx27_init_early, .init_early = imx27_init_early,
......
...@@ -192,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = { ...@@ -192,7 +192,7 @@ struct sys_timer eukrea_cpuimx35_timer = {
.init = eukrea_cpuimx35_timer_init, .init = eukrea_cpuimx35_timer_init,
}; };
MACHINE_START(EUKREA_CPUIMX35, "Eukrea CPUIMX35") MACHINE_START(EUKREA_CPUIMX35SD, "Eukrea CPUIMX35")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX3x_PHYS_OFFSET + 0x100, .boot_params = MX3x_PHYS_OFFSET + 0x100,
.map_io = mx35_map_io, .map_io = mx35_map_io,
......
...@@ -161,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = { ...@@ -161,7 +161,7 @@ static struct sys_timer eukrea_cpuimx25_timer = {
.init = eukrea_cpuimx25_timer_init, .init = eukrea_cpuimx25_timer_init,
}; };
MACHINE_START(EUKREA_CPUIMX25, "Eukrea CPUIMX25") MACHINE_START(EUKREA_CPUIMX25SD, "Eukrea CPUIMX25")
/* Maintainer: Eukrea Electromatique */ /* Maintainer: Eukrea Electromatique */
.boot_params = MX25_PHYS_OFFSET + 0x100, .boot_params = MX25_PHYS_OFFSET + 0x100,
.map_io = mx25_map_io, .map_io = mx25_map_io,
......
...@@ -337,15 +337,15 @@ static unsigned long timer_reload; ...@@ -337,15 +337,15 @@ static unsigned long timer_reload;
static void integrator_clocksource_init(u32 khz) static void integrator_clocksource_init(u32 khz)
{ {
void __iomem *base = (void __iomem *)TIMER2_VA_BASE; void __iomem *base = (void __iomem *)TIMER2_VA_BASE;
u32 ctrl = TIMER_CTRL_ENABLE; u32 ctrl = TIMER_CTRL_ENABLE | TIMER_CTRL_PERIODIC;
if (khz >= 1500) { if (khz >= 1500) {
khz /= 16; khz /= 16;
ctrl = TIMER_CTRL_DIV16; ctrl |= TIMER_CTRL_DIV16;
} }
writel(ctrl, base + TIMER_CTRL);
writel(0xffff, base + TIMER_LOAD); writel(0xffff, base + TIMER_LOAD);
writel(ctrl, base + TIMER_CTRL);
clocksource_mmio_init(base + TIMER_VALUE, "timer2", clocksource_mmio_init(base + TIMER_VALUE, "timer2",
khz * 1000, 200, 16, clocksource_mmio_readl_down); khz * 1000, 200, 16, clocksource_mmio_readl_down);
......
...@@ -44,7 +44,7 @@ static int __init omap3_l3_init(void) ...@@ -44,7 +44,7 @@ static int __init omap3_l3_init(void)
{ {
int l; int l;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
char oh_name[L3_MODULES_MAX_LEN]; char oh_name[L3_MODULES_MAX_LEN];
/* /*
...@@ -61,12 +61,12 @@ static int __init omap3_l3_init(void) ...@@ -61,12 +61,12 @@ static int __init omap3_l3_init(void)
if (!oh) if (!oh)
pr_err("could not look up %s\n", oh_name); pr_err("could not look up %s\n", oh_name);
od = omap_device_build("omap_l3_smx", 0, oh, NULL, 0, pdev = omap_device_build("omap_l3_smx", 0, oh, NULL, 0,
NULL, 0, 0); NULL, 0, 0);
WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
return IS_ERR(od) ? PTR_ERR(od) : 0; return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
} }
postcore_initcall(omap3_l3_init); postcore_initcall(omap3_l3_init);
...@@ -74,7 +74,7 @@ static int __init omap4_l3_init(void) ...@@ -74,7 +74,7 @@ static int __init omap4_l3_init(void)
{ {
int l, i; int l, i;
struct omap_hwmod *oh[3]; struct omap_hwmod *oh[3];
struct omap_device *od; struct platform_device *pdev;
char oh_name[L3_MODULES_MAX_LEN]; char oh_name[L3_MODULES_MAX_LEN];
/* /*
...@@ -92,12 +92,12 @@ static int __init omap4_l3_init(void) ...@@ -92,12 +92,12 @@ static int __init omap4_l3_init(void)
pr_err("could not look up %s\n", oh_name); pr_err("could not look up %s\n", oh_name);
} }
od = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL, pdev = omap_device_build_ss("omap_l3_noc", 0, oh, 3, NULL,
0, NULL, 0, 0); 0, NULL, 0, 0);
WARN(IS_ERR(od), "could not build omap_device for %s\n", oh_name); WARN(IS_ERR(pdev), "could not build omap_device for %s\n", oh_name);
return IS_ERR(od) ? PTR_ERR(od) : 0; return IS_ERR(pdev) ? PTR_ERR(pdev) : 0;
} }
postcore_initcall(omap4_l3_init); postcore_initcall(omap4_l3_init);
...@@ -232,7 +232,7 @@ struct omap_device_pm_latency omap_keyboard_latency[] = { ...@@ -232,7 +232,7 @@ struct omap_device_pm_latency omap_keyboard_latency[] = {
int __init omap4_keyboard_init(struct omap4_keypad_platform_data int __init omap4_keyboard_init(struct omap4_keypad_platform_data
*sdp4430_keypad_data, struct omap_board_data *bdata) *sdp4430_keypad_data, struct omap_board_data *bdata)
{ {
struct omap_device *od; struct platform_device *pdev;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap4_keypad_platform_data *keypad_data; struct omap4_keypad_platform_data *keypad_data;
unsigned int id = -1; unsigned int id = -1;
...@@ -247,15 +247,15 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data ...@@ -247,15 +247,15 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
keypad_data = sdp4430_keypad_data; keypad_data = sdp4430_keypad_data;
od = omap_device_build(name, id, oh, keypad_data, pdev = omap_device_build(name, id, oh, keypad_data,
sizeof(struct omap4_keypad_platform_data), sizeof(struct omap4_keypad_platform_data),
omap_keyboard_latency, omap_keyboard_latency,
ARRAY_SIZE(omap_keyboard_latency), 0); ARRAY_SIZE(omap_keyboard_latency), 0);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n", WARN(1, "Can't build omap_device for %s:%s.\n",
name, oh->name); name, oh->name);
return PTR_ERR(od); return PTR_ERR(pdev);
} }
oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
...@@ -274,7 +274,7 @@ static struct omap_device_pm_latency mbox_latencies[] = { ...@@ -274,7 +274,7 @@ static struct omap_device_pm_latency mbox_latencies[] = {
static inline void omap_init_mbox(void) static inline void omap_init_mbox(void)
{ {
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
oh = omap_hwmod_lookup("mailbox"); oh = omap_hwmod_lookup("mailbox");
if (!oh) { if (!oh) {
...@@ -282,10 +282,10 @@ static inline void omap_init_mbox(void) ...@@ -282,10 +282,10 @@ static inline void omap_init_mbox(void)
return; return;
} }
od = omap_device_build("omap-mailbox", -1, oh, NULL, 0, pdev = omap_device_build("omap-mailbox", -1, oh, NULL, 0,
mbox_latencies, ARRAY_SIZE(mbox_latencies), 0); mbox_latencies, ARRAY_SIZE(mbox_latencies), 0);
WARN(IS_ERR(od), "%s: could not build device, err %ld\n", WARN(IS_ERR(pdev), "%s: could not build device, err %ld\n",
__func__, PTR_ERR(od)); __func__, PTR_ERR(pdev));
} }
#else #else
static inline void omap_init_mbox(void) { } static inline void omap_init_mbox(void) { }
...@@ -344,7 +344,7 @@ struct omap_device_pm_latency omap_mcspi_latency[] = { ...@@ -344,7 +344,7 @@ struct omap_device_pm_latency omap_mcspi_latency[] = {
static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
{ {
struct omap_device *od; struct platform_device *pdev;
char *name = "omap2_mcspi"; char *name = "omap2_mcspi";
struct omap2_mcspi_platform_config *pdata; struct omap2_mcspi_platform_config *pdata;
static int spi_num; static int spi_num;
...@@ -371,10 +371,10 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused) ...@@ -371,10 +371,10 @@ static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
} }
spi_num++; spi_num++;
od = omap_device_build(name, spi_num, oh, pdata, pdev = omap_device_build(name, spi_num, oh, pdata,
sizeof(*pdata), omap_mcspi_latency, sizeof(*pdata), omap_mcspi_latency,
ARRAY_SIZE(omap_mcspi_latency), 0); ARRAY_SIZE(omap_mcspi_latency), 0);
WARN(IS_ERR(od), "Can't build omap_device for %s:%s\n", WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s\n",
name, oh->name); name, oh->name);
kfree(pdata); kfree(pdata);
return 0; return 0;
...@@ -709,7 +709,7 @@ static struct omap_device_pm_latency omap_wdt_latency[] = { ...@@ -709,7 +709,7 @@ static struct omap_device_pm_latency omap_wdt_latency[] = {
static int __init omap_init_wdt(void) static int __init omap_init_wdt(void)
{ {
int id = -1; int id = -1;
struct omap_device *od; struct platform_device *pdev;
struct omap_hwmod *oh; struct omap_hwmod *oh;
char *oh_name = "wd_timer2"; char *oh_name = "wd_timer2";
char *dev_name = "omap_wdt"; char *dev_name = "omap_wdt";
...@@ -723,10 +723,10 @@ static int __init omap_init_wdt(void) ...@@ -723,10 +723,10 @@ static int __init omap_init_wdt(void)
return -EINVAL; return -EINVAL;
} }
od = omap_device_build(dev_name, id, oh, NULL, 0, pdev = omap_device_build(dev_name, id, oh, NULL, 0,
omap_wdt_latency, omap_wdt_latency,
ARRAY_SIZE(omap_wdt_latency), 0); ARRAY_SIZE(omap_wdt_latency), 0);
WARN(IS_ERR(od), "Can't build omap_device for %s:%s.\n", WARN(IS_ERR(pdev), "Can't build omap_device for %s:%s.\n",
dev_name, oh->name); dev_name, oh->name);
return 0; return 0;
} }
......
...@@ -78,7 +78,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -78,7 +78,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
{ {
int r = 0; int r = 0;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
int i, oh_count; int i, oh_count;
struct omap_display_platform_data pdata; struct omap_display_platform_data pdata;
const struct omap_dss_hwmod_data *curr_dss_hwmod; const struct omap_dss_hwmod_data *curr_dss_hwmod;
...@@ -108,13 +108,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -108,13 +108,13 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
return -ENODEV; return -ENODEV;
} }
od = omap_device_build(curr_dss_hwmod[i].dev_name, pdev = omap_device_build(curr_dss_hwmod[i].dev_name,
curr_dss_hwmod[i].id, oh, &pdata, curr_dss_hwmod[i].id, oh, &pdata,
sizeof(struct omap_display_platform_data), sizeof(struct omap_display_platform_data),
omap_dss_latency, omap_dss_latency,
ARRAY_SIZE(omap_dss_latency), 0); ARRAY_SIZE(omap_dss_latency), 0);
if (WARN((IS_ERR(od)), "Could not build omap_device for %s\n", if (WARN((IS_ERR(pdev)), "Could not build omap_device for %s\n",
curr_dss_hwmod[i].oh_name)) curr_dss_hwmod[i].oh_name))
return -ENODEV; return -ENODEV;
} }
......
...@@ -228,7 +228,7 @@ static u32 configure_dma_errata(void) ...@@ -228,7 +228,7 @@ static u32 configure_dma_errata(void)
/* One time initializations */ /* One time initializations */
static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
{ {
struct omap_device *od; struct platform_device *pdev;
struct omap_system_dma_plat_info *p; struct omap_system_dma_plat_info *p;
struct resource *mem; struct resource *mem;
char *name = "omap_dma_system"; char *name = "omap_dma_system";
...@@ -258,23 +258,23 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) ...@@ -258,23 +258,23 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
p->errata = configure_dma_errata(); p->errata = configure_dma_errata();
od = omap_device_build(name, 0, oh, p, sizeof(*p), pdev = omap_device_build(name, 0, oh, p, sizeof(*p),
omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0); omap2_dma_latency, ARRAY_SIZE(omap2_dma_latency), 0);
kfree(p); kfree(p);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n", pr_err("%s: Can't build omap_device for %s:%s.\n",
__func__, name, oh->name); __func__, name, oh->name);
return PTR_ERR(od); return PTR_ERR(pdev);
} }
mem = platform_get_resource(&od->pdev, IORESOURCE_MEM, 0); mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!mem) { if (!mem) {
dev_err(&od->pdev.dev, "%s: no mem resource\n", __func__); dev_err(&pdev->dev, "%s: no mem resource\n", __func__);
return -EINVAL; return -EINVAL;
} }
dma_base = ioremap(mem->start, resource_size(mem)); dma_base = ioremap(mem->start, resource_size(mem));
if (!dma_base) { if (!dma_base) {
dev_err(&od->pdev.dev, "%s: ioremap fail\n", __func__); dev_err(&pdev->dev, "%s: ioremap fail\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
...@@ -283,7 +283,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused) ...@@ -283,7 +283,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
(d->lch_count), GFP_KERNEL); (d->lch_count), GFP_KERNEL);
if (!d->chan) { if (!d->chan) {
dev_err(&od->pdev.dev, "%s: kzalloc fail\n", __func__); dev_err(&pdev->dev, "%s: kzalloc fail\n", __func__);
return -ENOMEM; return -ENOMEM;
} }
return 0; return 0;
......
...@@ -34,7 +34,7 @@ static struct omap_device_pm_latency omap_gpio_latency[] = { ...@@ -34,7 +34,7 @@ static struct omap_device_pm_latency omap_gpio_latency[] = {
static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
{ {
struct omap_device *od; struct platform_device *pdev;
struct omap_gpio_platform_data *pdata; struct omap_gpio_platform_data *pdata;
struct omap_gpio_dev_attr *dev_attr; struct omap_gpio_dev_attr *dev_attr;
char *name = "omap_gpio"; char *name = "omap_gpio";
...@@ -107,19 +107,19 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused) ...@@ -107,19 +107,19 @@ static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
return -EINVAL; return -EINVAL;
} }
od = omap_device_build(name, id - 1, oh, pdata, pdev = omap_device_build(name, id - 1, oh, pdata,
sizeof(*pdata), omap_gpio_latency, sizeof(*pdata), omap_gpio_latency,
ARRAY_SIZE(omap_gpio_latency), ARRAY_SIZE(omap_gpio_latency),
false); false);
kfree(pdata); kfree(pdata);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n", WARN(1, "Can't build omap_device for %s:%s.\n",
name, oh->name); name, oh->name);
return PTR_ERR(od); return PTR_ERR(pdev);
} }
omap_device_disable_idle_on_suspend(od); omap_device_disable_idle_on_suspend(pdev);
gpio_bank_count++; gpio_bank_count++;
return 0; return 0;
......
...@@ -430,7 +430,7 @@ static struct omap_device_pm_latency omap_hsmmc_latency[] = { ...@@ -430,7 +430,7 @@ static struct omap_device_pm_latency omap_hsmmc_latency[] = {
void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
{ {
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
struct omap_device_pm_latency *ohl; struct omap_device_pm_latency *ohl;
char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN]; char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN];
struct omap_mmc_platform_data *mmc_data; struct omap_mmc_platform_data *mmc_data;
...@@ -471,9 +471,9 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) ...@@ -471,9 +471,9 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
mmc_data->controller_flags = mmc_dev_attr->flags; mmc_data->controller_flags = mmc_dev_attr->flags;
} }
od = omap_device_build(name, ctrl_nr - 1, oh, mmc_data, pdev = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,
sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false); sizeof(struct omap_mmc_platform_data), ohl, ohl_cnt, false);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name); WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name);
kfree(mmc_data->slots[0].name); kfree(mmc_data->slots[0].name);
goto done; goto done;
...@@ -482,7 +482,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr) ...@@ -482,7 +482,7 @@ void __init omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
* return device handle to board setup code * return device handle to board setup code
* required to populate for regulator framework structure * required to populate for regulator framework structure
*/ */
hsmmcinfo->dev = &od->pdev.dev; hsmmcinfo->dev = &pdev->dev;
done: done:
kfree(mmc_data); kfree(mmc_data);
......
...@@ -35,7 +35,7 @@ int __init hwspinlocks_init(void) ...@@ -35,7 +35,7 @@ int __init hwspinlocks_init(void)
{ {
int retval = 0; int retval = 0;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
const char *oh_name = "spinlock"; const char *oh_name = "spinlock";
const char *dev_name = "omap_hwspinlock"; const char *dev_name = "omap_hwspinlock";
...@@ -48,13 +48,13 @@ int __init hwspinlocks_init(void) ...@@ -48,13 +48,13 @@ int __init hwspinlocks_init(void)
if (oh == NULL) if (oh == NULL)
return -EINVAL; return -EINVAL;
od = omap_device_build(dev_name, 0, oh, NULL, 0, pdev = omap_device_build(dev_name, 0, oh, NULL, 0,
omap_spinlock_latency, omap_spinlock_latency,
ARRAY_SIZE(omap_spinlock_latency), false); ARRAY_SIZE(omap_spinlock_latency), false);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
pr_err("Can't build omap_device for %s:%s\n", dev_name, pr_err("Can't build omap_device for %s:%s\n", dev_name,
oh_name); oh_name);
retval = PTR_ERR(od); retval = PTR_ERR(pdev);
} }
return retval; return retval;
......
...@@ -116,7 +116,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) ...@@ -116,7 +116,7 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
char *name = "omap-mcbsp"; char *name = "omap-mcbsp";
struct omap_hwmod *oh_device[2]; struct omap_hwmod *oh_device[2];
struct omap_mcbsp_platform_data *pdata = NULL; struct omap_mcbsp_platform_data *pdata = NULL;
struct omap_device *od; struct platform_device *pdev;
sscanf(oh->name, "mcbsp%d", &id); sscanf(oh->name, "mcbsp%d", &id);
...@@ -144,14 +144,14 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused) ...@@ -144,14 +144,14 @@ static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
(struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone); (struct omap_mcbsp_dev_attr *)(oh->dev_attr))->sidetone);
count++; count++;
} }
od = omap_device_build_ss(name, id, oh_device, count, pdata, pdev = omap_device_build_ss(name, id, oh_device, count, pdata,
sizeof(*pdata), omap2_mcbsp_latency, sizeof(*pdata), omap2_mcbsp_latency,
ARRAY_SIZE(omap2_mcbsp_latency), false); ARRAY_SIZE(omap2_mcbsp_latency), false);
kfree(pdata); kfree(pdata);
if (IS_ERR(od)) { if (IS_ERR(pdev)) {
pr_err("%s: Can't build omap_device for %s:%s.\n", __func__, pr_err("%s: Can't build omap_device for %s:%s.\n", __func__,
name, oh->name); name, oh->name);
return PTR_ERR(od); return PTR_ERR(pdev);
} }
omap_mcbsp_count++; omap_mcbsp_count++;
return 0; return 0;
......
...@@ -69,7 +69,7 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, ...@@ -69,7 +69,7 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
opp_def->hwmod_name, i); opp_def->hwmod_name, i);
return -EINVAL; return -EINVAL;
} }
dev = &oh->od->pdev.dev; dev = &oh->od->pdev->dev;
r = opp_add(dev, opp_def->freq, opp_def->u_volt); r = opp_add(dev, opp_def->freq, opp_def->u_volt);
if (r) { if (r) {
......
...@@ -60,19 +60,19 @@ EXPORT_SYMBOL(omap4_get_dsp_device); ...@@ -60,19 +60,19 @@ EXPORT_SYMBOL(omap4_get_dsp_device);
static int _init_omap_device(char *name, struct device **new_dev) static int _init_omap_device(char *name, struct device **new_dev)
{ {
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
oh = omap_hwmod_lookup(name); oh = omap_hwmod_lookup(name);
if (WARN(!oh, "%s: could not find omap_hwmod for %s\n", if (WARN(!oh, "%s: could not find omap_hwmod for %s\n",
__func__, name)) __func__, name))
return -ENODEV; return -ENODEV;
od = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false); pdev = omap_device_build(oh->name, 0, oh, NULL, 0, pm_lats, 0, false);
if (WARN(IS_ERR(od), "%s: could not build omap_device for %s\n", if (WARN(IS_ERR(pdev), "%s: could not build omap_device for %s\n",
__func__, name)) __func__, name))
return -ENODEV; return -ENODEV;
*new_dev = &od->pdev.dev; *new_dev = &pdev->dev;
return 0; return 0;
} }
......
...@@ -711,7 +711,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) ...@@ -711,7 +711,7 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
{ {
struct omap_uart_state *uart; struct omap_uart_state *uart;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
void *pdata = NULL; void *pdata = NULL;
u32 pdata_size = 0; u32 pdata_size = 0;
char *name; char *name;
...@@ -799,20 +799,20 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) ...@@ -799,20 +799,20 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
if (WARN_ON(!oh)) if (WARN_ON(!oh))
return; return;
od = omap_device_build(name, uart->num, oh, pdata, pdata_size, pdev = omap_device_build(name, uart->num, oh, pdata, pdata_size,
omap_uart_latency, omap_uart_latency,
ARRAY_SIZE(omap_uart_latency), false); ARRAY_SIZE(omap_uart_latency), false);
WARN(IS_ERR(od), "Could not build omap_device for %s: %s.\n", WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n",
name, oh->name); name, oh->name);
omap_device_disable_idle_on_suspend(od); omap_device_disable_idle_on_suspend(pdev);
oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
uart->irq = oh->mpu_irqs[0].irq; uart->irq = oh->mpu_irqs[0].irq;
uart->regshift = 2; uart->regshift = 2;
uart->mapbase = oh->slaves[0]->addr->pa_start; uart->mapbase = oh->slaves[0]->addr->pa_start;
uart->membase = omap_hwmod_get_mpu_rt_va(oh); uart->membase = omap_hwmod_get_mpu_rt_va(oh);
uart->pdev = &od->pdev; uart->pdev = pdev;
oh->dev_attr = uart; oh->dev_attr = uart;
...@@ -846,8 +846,8 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) ...@@ -846,8 +846,8 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
if ((cpu_is_omap34xx() && uart->padconf) || if ((cpu_is_omap34xx() && uart->padconf) ||
(uart->wk_en && uart->wk_mask)) { (uart->wk_en && uart->wk_mask)) {
device_init_wakeup(&od->pdev.dev, true); device_init_wakeup(&pdev->dev, true);
DEV_CREATE_FILE(&od->pdev.dev, &dev_attr_sleep_timeout); DEV_CREATE_FILE(&pdev->dev, &dev_attr_sleep_timeout);
} }
/* Enable the MDR1 errata for OMAP3 */ /* Enable the MDR1 errata for OMAP3 */
......
...@@ -80,7 +80,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data, ...@@ -80,7 +80,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
static int sr_dev_init(struct omap_hwmod *oh, void *user) static int sr_dev_init(struct omap_hwmod *oh, void *user)
{ {
struct omap_sr_data *sr_data; struct omap_sr_data *sr_data;
struct omap_device *od; struct platform_device *pdev;
struct omap_volt_data *volt_data; struct omap_volt_data *volt_data;
char *name = "smartreflex"; char *name = "smartreflex";
static int i; static int i;
...@@ -120,10 +120,10 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user) ...@@ -120,10 +120,10 @@ static int sr_dev_init(struct omap_hwmod *oh, void *user)
sr_data->enable_on_init = sr_enable_on_init; sr_data->enable_on_init = sr_enable_on_init;
od = omap_device_build(name, i, oh, sr_data, sizeof(*sr_data), pdev = omap_device_build(name, i, oh, sr_data, sizeof(*sr_data),
omap_sr_latency, omap_sr_latency,
ARRAY_SIZE(omap_sr_latency), 0); ARRAY_SIZE(omap_sr_latency), 0);
if (IS_ERR(od)) if (IS_ERR(pdev))
pr_warning("%s: Could not build omap_device for %s: %s.\n\n", pr_warning("%s: Could not build omap_device for %s: %s.\n\n",
__func__, name, oh->name); __func__, name, oh->name);
exit: exit:
......
...@@ -77,7 +77,7 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) ...@@ -77,7 +77,7 @@ static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
/* /*
* Check for devices with hard-wired IRQs. * Check for devices with hard-wired IRQs.
*/ */
irq = orion5x_pci_map_irq(const dev, slot, pin); irq = orion5x_pci_map_irq(dev, slot, pin);
if (irq != -1) if (irq != -1)
return irq; return irq;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/mbus.h> #include <linux/mbus.h>
#include <video/vga.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
#include <plat/pcie.h> #include <plat/pcie.h>
......
...@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void) ...@@ -481,6 +481,7 @@ static void __init sirfsoc_clk_init(void)
static struct of_device_id clkc_ids[] = { static struct of_device_id clkc_ids[] = {
{ .compatible = "sirf,prima2-clkc" }, { .compatible = "sirf,prima2-clkc" },
{},
}; };
void __init sirfsoc_of_clk_init(void) void __init sirfsoc_of_clk_init(void)
......
...@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void) ...@@ -51,6 +51,7 @@ static __init void sirfsoc_irq_init(void)
static struct of_device_id intc_ids[] = { static struct of_device_id intc_ids[] = {
{ .compatible = "sirf,prima2-intc" }, { .compatible = "sirf,prima2-intc" },
{},
}; };
void __init sirfsoc_of_irq_init(void) void __init sirfsoc_of_irq_init(void)
......
...@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock); ...@@ -19,6 +19,7 @@ static DEFINE_MUTEX(rstc_lock);
static struct of_device_id rstc_ids[] = { static struct of_device_id rstc_ids[] = {
{ .compatible = "sirf,prima2-rstc" }, { .compatible = "sirf,prima2-rstc" },
{},
}; };
static int __init sirfsoc_of_rstc_init(void) static int __init sirfsoc_of_rstc_init(void)
......
...@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void) ...@@ -190,6 +190,7 @@ static void __init sirfsoc_timer_init(void)
static struct of_device_id timer_ids[] = { static struct of_device_id timer_ids[] = {
{ .compatible = "sirf,prima2-tick" }, { .compatible = "sirf,prima2-tick" },
{},
}; };
static void __init sirfsoc_of_timer_map(void) static void __init sirfsoc_of_timer_map(void)
......
...@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd) ...@@ -44,6 +44,7 @@ static inline void arch_reset(char mode, const char *cmd)
*/ */
if (realview_reset) if (realview_reset)
realview_reset(mode); realview_reset(mode);
dsb();
} }
#endif #endif
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/suspend.h> #include <linux/suspend.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h>
#include <mach/map.h> #include <mach/map.h>
#include <mach/irqs.h> #include <mach/irqs.h>
......
...@@ -129,7 +129,7 @@ static int s5p64x0_alloc_gc(void) ...@@ -129,7 +129,7 @@ static int s5p64x0_alloc_gc(void)
} }
ct = gc->chip_types; ct = gc->chip_types;
ct->chip.irq_ack = irq_gc_ack; ct->chip.irq_ack = irq_gc_ack_set_bit;
ct->chip.irq_mask = irq_gc_mask_set_bit; ct->chip.irq_mask = irq_gc_mask_set_bit;
ct->chip.irq_unmask = irq_gc_mask_clr_bit; ct->chip.irq_unmask = irq_gc_mask_clr_bit;
ct->chip.irq_set_type = s5p64x0_irq_eint_set_type; ct->chip.irq_set_type = s5p64x0_irq_eint_set_type;
......
...@@ -88,7 +88,7 @@ static struct sleep_save s5pv210_core_save[] = { ...@@ -88,7 +88,7 @@ static struct sleep_save s5pv210_core_save[] = {
SAVE_ITEM(S3C2410_TCNTO(0)), SAVE_ITEM(S3C2410_TCNTO(0)),
}; };
void s5pv210_cpu_suspend(unsigned long arg) static int s5pv210_cpu_suspend(unsigned long arg)
{ {
unsigned long tmp; unsigned long tmp;
......
...@@ -341,6 +341,7 @@ static struct platform_device mipidsi0_device = { ...@@ -341,6 +341,7 @@ static struct platform_device mipidsi0_device = {
static struct sh_mobile_sdhi_info sdhi0_info = { static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
.tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
.tmio_caps = MMC_CAP_SD_HIGHSPEED, .tmio_caps = MMC_CAP_SD_HIGHSPEED,
.tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29, .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
}; };
...@@ -382,7 +383,7 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state) ...@@ -382,7 +383,7 @@ void ag5evm_sdhi1_set_pwr(struct platform_device *pdev, int state)
} }
static struct sh_mobile_sdhi_info sh_sdhi1_info = { static struct sh_mobile_sdhi_info sh_sdhi1_info = {
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE | TMIO_MMC_HAS_IDLE_WAIT,
.tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ, .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
.tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34, .tmio_ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
.set_pwr = ag5evm_sdhi1_set_pwr, .set_pwr = ag5evm_sdhi1_set_pwr,
......
...@@ -641,6 +641,8 @@ static struct usbhs_private usbhs0_private = { ...@@ -641,6 +641,8 @@ static struct usbhs_private usbhs0_private = {
}, },
.driver_param = { .driver_param = {
.buswait_bwait = 4, .buswait_bwait = 4,
.d0_tx_id = SHDMA_SLAVE_USB0_TX,
.d1_rx_id = SHDMA_SLAVE_USB0_RX,
}, },
}, },
}; };
...@@ -810,6 +812,8 @@ static struct usbhs_private usbhs1_private = { ...@@ -810,6 +812,8 @@ static struct usbhs_private usbhs1_private = {
.buswait_bwait = 4, .buswait_bwait = 4,
.pipe_type = usbhs1_pipe_cfg, .pipe_type = usbhs1_pipe_cfg,
.pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg), .pipe_size = ARRAY_SIZE(usbhs1_pipe_cfg),
.d0_tx_id = SHDMA_SLAVE_USB1_TX,
.d1_rx_id = SHDMA_SLAVE_USB1_RX,
}, },
}, },
}; };
......
...@@ -503,16 +503,17 @@ static struct clk *late_main_clks[] = { ...@@ -503,16 +503,17 @@ static struct clk *late_main_clks[] = {
&sh7372_fsidivb_clk, &sh7372_fsidivb_clk,
}; };
enum { MSTP001, enum { MSTP001, MSTP000,
MSTP131, MSTP130, MSTP131, MSTP130,
MSTP129, MSTP128, MSTP127, MSTP126, MSTP125, MSTP129, MSTP128, MSTP127, MSTP126, MSTP125,
MSTP118, MSTP117, MSTP116, MSTP113, MSTP118, MSTP117, MSTP116, MSTP113,
MSTP106, MSTP101, MSTP100, MSTP106, MSTP101, MSTP100,
MSTP223, MSTP223,
MSTP218, MSTP217, MSTP216, MSTP218, MSTP217, MSTP216, MSTP214, MSTP208, MSTP207,
MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, MSTP206, MSTP205, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200,
MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312,
MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP407, MSTP406,
MSTP405, MSTP404, MSTP403, MSTP400,
MSTP_NR }; MSTP_NR };
#define MSTP(_parent, _reg, _bit, _flags) \ #define MSTP(_parent, _reg, _bit, _flags) \
...@@ -520,6 +521,7 @@ enum { MSTP001, ...@@ -520,6 +521,7 @@ enum { MSTP001,
static struct clk mstp_clks[MSTP_NR] = { static struct clk mstp_clks[MSTP_NR] = {
[MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */ [MSTP001] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 1, 0), /* IIC2 */
[MSTP000] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR0, 0, 0), /* MSIOF0 */
[MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */ [MSTP131] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 31, 0), /* VEU3 */
[MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */ [MSTP130] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 30, 0), /* VEU2 */
[MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */ [MSTP129] = MSTP(&div4_clks[DIV4_B], SMSTPCR1, 29, 0), /* VEU1 */
...@@ -538,14 +540,16 @@ static struct clk mstp_clks[MSTP_NR] = { ...@@ -538,14 +540,16 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */ [MSTP218] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 18, 0), /* DMAC1 */
[MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */ [MSTP217] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 17, 0), /* DMAC2 */
[MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */ [MSTP216] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 16, 0), /* DMAC3 */
[MSTP214] = MSTP(&div4_clks[DIV4_HP], SMSTPCR2, 14, 0), /* USBDMAC */
[MSTP208] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 8, 0), /* MSIOF1 */
[MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */ [MSTP207] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 7, 0), /* SCIFA5 */
[MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */ [MSTP206] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 6, 0), /* SCIFB */
[MSTP205] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 5, 0), /* MSIOF2 */
[MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */ [MSTP204] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 4, 0), /* SCIFA0 */
[MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */ [MSTP203] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 3, 0), /* SCIFA1 */
[MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */ [MSTP202] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 2, 0), /* SCIFA2 */
[MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */ [MSTP201] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 1, 0), /* SCIFA3 */
[MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */ [MSTP200] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR2, 0, 0), /* SCIFA4 */
[MSTP329] = MSTP(&r_clk, SMSTPCR3, 29, 0), /* CMT10 */
[MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */ [MSTP328] = MSTP(&div6_clks[DIV6_SPU], SMSTPCR3, 28, 0), /* FSI2 */
[MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */ [MSTP323] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 23, 0), /* IIC1 */
[MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */ [MSTP322] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR3, 22, 0), /* USB0 */
...@@ -557,8 +561,12 @@ static struct clk mstp_clks[MSTP_NR] = { ...@@ -557,8 +561,12 @@ static struct clk mstp_clks[MSTP_NR] = {
[MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */
[MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */
[MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */ [MSTP410] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 10, 0), /* IIC4 */
[MSTP407] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 7, 0), /* USB-DMAC1 */
[MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */ [MSTP406] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 6, 0), /* USB1 */
[MSTP405] = MSTP(&r_clk, SMSTPCR4, 5, 0), /* CMT4 */
[MSTP404] = MSTP(&r_clk, SMSTPCR4, 4, 0), /* CMT3 */
[MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */ [MSTP403] = MSTP(&r_clk, SMSTPCR4, 3, 0), /* KEYSC */
[MSTP400] = MSTP(&r_clk, SMSTPCR4, 0, 0), /* CMT2 */
}; };
static struct clk_lookup lookups[] = { static struct clk_lookup lookups[] = {
...@@ -609,6 +617,7 @@ static struct clk_lookup lookups[] = { ...@@ -609,6 +617,7 @@ static struct clk_lookup lookups[] = {
/* MSTP32 clocks */ /* MSTP32 clocks */
CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */
CLKDEV_DEV_ID("spi_sh_msiof.0", &mstp_clks[MSTP000]), /* MSIOF0 */
CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */ CLKDEV_DEV_ID("uio_pdrv_genirq.4", &mstp_clks[MSTP131]), /* VEU3 */
CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */ CLKDEV_DEV_ID("uio_pdrv_genirq.3", &mstp_clks[MSTP130]), /* VEU2 */
CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */ CLKDEV_DEV_ID("uio_pdrv_genirq.2", &mstp_clks[MSTP129]), /* VEU1 */
...@@ -629,14 +638,16 @@ static struct clk_lookup lookups[] = { ...@@ -629,14 +638,16 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */ CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* DMAC1 */
CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */ CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* DMAC2 */
CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */ CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]), /* DMAC3 */
CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]), /* USB-DMAC0 */
CLKDEV_DEV_ID("spi_sh_msiof.1", &mstp_clks[MSTP208]), /* MSIOF1 */
CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */ CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */ CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP206]), /* SCIFB */
CLKDEV_DEV_ID("spi_sh_msiof.2", &mstp_clks[MSTP205]), /* MSIOF2 */
CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */ CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */
CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */ CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */ CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */ CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI2 */
CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */ CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), /* IIC1 */
CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */ CLKDEV_DEV_ID("r8a66597_hcd.0", &mstp_clks[MSTP322]), /* USB0 */
...@@ -650,10 +661,14 @@ static struct clk_lookup lookups[] = { ...@@ -650,10 +661,14 @@ static struct clk_lookup lookups[] = {
CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */
CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */
CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */ CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* IIC4 */
CLKDEV_DEV_ID("sh-dma-engine.4", &mstp_clks[MSTP407]), /* USB-DMAC1 */
CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */
CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */
CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */
CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */
CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */
CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1",
&div6_reparent_clks[DIV6_HDMI]), &div6_reparent_clks[DIV6_HDMI]),
......
...@@ -365,7 +365,7 @@ void __init sh73a0_clock_init(void) ...@@ -365,7 +365,7 @@ void __init sh73a0_clock_init(void)
__raw_writel(0x108, SD2CKCR); __raw_writel(0x108, SD2CKCR);
/* detect main clock parent */ /* detect main clock parent */
switch ((__raw_readl(CKSCR) >> 24) & 0x03) { switch ((__raw_readl(CKSCR) >> 28) & 0x03) {
case 0: case 0:
main_clk.parent = &sh73a0_extal1_clk; main_clk.parent = &sh73a0_extal1_clk;
break; break;
......
...@@ -459,6 +459,10 @@ enum { ...@@ -459,6 +459,10 @@ enum {
SHDMA_SLAVE_SDHI2_TX, SHDMA_SLAVE_SDHI2_TX,
SHDMA_SLAVE_MMCIF_RX, SHDMA_SLAVE_MMCIF_RX,
SHDMA_SLAVE_MMCIF_TX, SHDMA_SLAVE_MMCIF_TX,
SHDMA_SLAVE_USB0_TX,
SHDMA_SLAVE_USB0_RX,
SHDMA_SLAVE_USB1_TX,
SHDMA_SLAVE_USB1_RX,
}; };
extern struct clk sh7372_extal1_clk; extern struct clk sh7372_extal1_clk;
......
...@@ -379,7 +379,7 @@ enum { ...@@ -379,7 +379,7 @@ enum {
/* BBIF2 */ /* BBIF2 */
VPU, VPU,
TSIF1, TSIF1,
_3DG_SGX530, /* 3DG */
_2DDMAC, _2DDMAC,
IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2, IIC2_ALI2, IIC2_TACKI2, IIC2_WAITI2, IIC2_DTEI2,
IPMMU_IPMMUR, IPMMU_IPMMUR2, IPMMU_IPMMUR, IPMMU_IPMMUR2,
...@@ -436,7 +436,7 @@ static struct intc_vect intcs_vectors[] = { ...@@ -436,7 +436,7 @@ static struct intc_vect intcs_vectors[] = {
/* BBIF2 */ /* BBIF2 */
INTCS_VECT(VPU, 0x980), INTCS_VECT(VPU, 0x980),
INTCS_VECT(TSIF1, 0x9a0), INTCS_VECT(TSIF1, 0x9a0),
INTCS_VECT(_3DG_SGX530, 0x9e0), /* 3DG */
INTCS_VECT(_2DDMAC, 0xa00), INTCS_VECT(_2DDMAC, 0xa00),
INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0), INTCS_VECT(IIC2_ALI2, 0xa80), INTCS_VECT(IIC2_TACKI2, 0xaa0),
INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0), INTCS_VECT(IIC2_WAITI2, 0xac0), INTCS_VECT(IIC2_DTEI2, 0xae0),
...@@ -521,7 +521,7 @@ static struct intc_mask_reg intcs_mask_registers[] = { ...@@ -521,7 +521,7 @@ static struct intc_mask_reg intcs_mask_registers[] = {
RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } }, RTDMAC_1_DEI3, RTDMAC_1_DEI2, RTDMAC_1_DEI1, RTDMAC_1_DEI0 } },
{ 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */ { 0xffd20198, 0xffd201d8, 8, /* IMR6SA / IMCR6SA */
{ 0, 0, MSIOF, 0, { 0, 0, MSIOF, 0,
_3DG_SGX530, 0, 0, 0 } }, 0, 0, 0, 0 } },
{ 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */ { 0xffd2019c, 0xffd201dc, 8, /* IMR7SA / IMCR7SA */
{ 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0, { 0, TMU_TUNI2, TMU_TUNI1, TMU_TUNI0,
0, 0, 0, 0 } }, 0, 0, 0, 0 } },
...@@ -561,7 +561,6 @@ static struct intc_prio_reg intcs_prio_registers[] = { ...@@ -561,7 +561,6 @@ static struct intc_prio_reg intcs_prio_registers[] = {
TMU_TUNI2, TSIF1 } }, TMU_TUNI2, TSIF1 } },
{ 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } }, { 0xffd2001c, 0, 16, 4, /* IPRHS */ { 0, 0, VEU, BEU } },
{ 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } }, { 0xffd20020, 0, 16, 4, /* IPRIS */ { 0, MSIOF, TSIF0, IIC0 } },
{ 0xffd20024, 0, 16, 4, /* IPRJS */ { 0, _3DG_SGX530, 0, 0 } },
{ 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } }, { 0xffd20028, 0, 16, 4, /* IPRKS */ { 0, 0, LMB, 0 } },
{ 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } }, { 0xffd2002c, 0, 16, 4, /* IPRLS */ { IPMMU, 0, 0, 0 } },
{ 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } }, { 0xffd20030, 0, 16, 4, /* IPRMS */ { IIC2, 0, 0, 0 } },
......
...@@ -169,35 +169,35 @@ static struct platform_device scif6_device = { ...@@ -169,35 +169,35 @@ static struct platform_device scif6_device = {
}; };
/* CMT */ /* CMT */
static struct sh_timer_config cmt10_platform_data = { static struct sh_timer_config cmt2_platform_data = {
.name = "CMT10", .name = "CMT2",
.channel_offset = 0x10, .channel_offset = 0x40,
.timer_bit = 0, .timer_bit = 5,
.clockevent_rating = 125, .clockevent_rating = 125,
.clocksource_rating = 125, .clocksource_rating = 125,
}; };
static struct resource cmt10_resources[] = { static struct resource cmt2_resources[] = {
[0] = { [0] = {
.name = "CMT10", .name = "CMT2",
.start = 0xe6138010, .start = 0xe6130040,
.end = 0xe613801b, .end = 0xe613004b,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, },
[1] = { [1] = {
.start = evt2irq(0x0b00), /* CMT1_CMT10 */ .start = evt2irq(0x0b80), /* CMT2 */
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, },
}; };
static struct platform_device cmt10_device = { static struct platform_device cmt2_device = {
.name = "sh_cmt", .name = "sh_cmt",
.id = 10, .id = 2,
.dev = { .dev = {
.platform_data = &cmt10_platform_data, .platform_data = &cmt2_platform_data,
}, },
.resource = cmt10_resources, .resource = cmt2_resources,
.num_resources = ARRAY_SIZE(cmt10_resources), .num_resources = ARRAY_SIZE(cmt2_resources),
}; };
/* TMU */ /* TMU */
...@@ -602,6 +602,150 @@ static struct platform_device dma2_device = { ...@@ -602,6 +602,150 @@ static struct platform_device dma2_device = {
}, },
}; };
/*
* USB-DMAC
*/
unsigned int usbts_shift[] = {3, 4, 5};
enum {
XMIT_SZ_8BYTE = 0,
XMIT_SZ_16BYTE = 1,
XMIT_SZ_32BYTE = 2,
};
#define USBTS_INDEX2VAL(i) (((i) & 3) << 6)
static const struct sh_dmae_channel sh7372_usb_dmae_channels[] = {
{
.offset = 0,
}, {
.offset = 0x20,
},
};
/* USB DMAC0 */
static const struct sh_dmae_slave_config sh7372_usb_dmae0_slaves[] = {
{
.slave_id = SHDMA_SLAVE_USB0_TX,
.chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
}, {
.slave_id = SHDMA_SLAVE_USB0_RX,
.chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
},
};
static struct sh_dmae_pdata usb_dma0_platform_data = {
.slave = sh7372_usb_dmae0_slaves,
.slave_num = ARRAY_SIZE(sh7372_usb_dmae0_slaves),
.channel = sh7372_usb_dmae_channels,
.channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
.ts_low_shift = 6,
.ts_low_mask = 0xc0,
.ts_high_shift = 0,
.ts_high_mask = 0,
.ts_shift = usbts_shift,
.ts_shift_num = ARRAY_SIZE(usbts_shift),
.dmaor_init = DMAOR_DME,
.chcr_offset = 0x14,
.chcr_ie_bit = 1 << 5,
.dmaor_is_32bit = 1,
.needs_tend_set = 1,
.no_dmars = 1,
};
static struct resource sh7372_usb_dmae0_resources[] = {
{
/* Channel registers and DMAOR */
.start = 0xe68a0020,
.end = 0xe68a0064 - 1,
.flags = IORESOURCE_MEM,
},
{
/* VCR/SWR/DMICR */
.start = 0xe68a0000,
.end = 0xe68a0014 - 1,
.flags = IORESOURCE_MEM,
},
{
/* IRQ for channels */
.start = evt2irq(0x0a00),
.end = evt2irq(0x0a00),
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device usb_dma0_device = {
.name = "sh-dma-engine",
.id = 3,
.resource = sh7372_usb_dmae0_resources,
.num_resources = ARRAY_SIZE(sh7372_usb_dmae0_resources),
.dev = {
.platform_data = &usb_dma0_platform_data,
},
};
/* USB DMAC1 */
static const struct sh_dmae_slave_config sh7372_usb_dmae1_slaves[] = {
{
.slave_id = SHDMA_SLAVE_USB1_TX,
.chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
}, {
.slave_id = SHDMA_SLAVE_USB1_RX,
.chcr = USBTS_INDEX2VAL(XMIT_SZ_8BYTE),
},
};
static struct sh_dmae_pdata usb_dma1_platform_data = {
.slave = sh7372_usb_dmae1_slaves,
.slave_num = ARRAY_SIZE(sh7372_usb_dmae1_slaves),
.channel = sh7372_usb_dmae_channels,
.channel_num = ARRAY_SIZE(sh7372_usb_dmae_channels),
.ts_low_shift = 6,
.ts_low_mask = 0xc0,
.ts_high_shift = 0,
.ts_high_mask = 0,
.ts_shift = usbts_shift,
.ts_shift_num = ARRAY_SIZE(usbts_shift),
.dmaor_init = DMAOR_DME,
.chcr_offset = 0x14,
.chcr_ie_bit = 1 << 5,
.dmaor_is_32bit = 1,
.needs_tend_set = 1,
.no_dmars = 1,
};
static struct resource sh7372_usb_dmae1_resources[] = {
{
/* Channel registers and DMAOR */
.start = 0xe68c0020,
.end = 0xe68c0064 - 1,
.flags = IORESOURCE_MEM,
},
{
/* VCR/SWR/DMICR */
.start = 0xe68c0000,
.end = 0xe68c0014 - 1,
.flags = IORESOURCE_MEM,
},
{
/* IRQ for channels */
.start = evt2irq(0x1d00),
.end = evt2irq(0x1d00),
.flags = IORESOURCE_IRQ,
},
};
static struct platform_device usb_dma1_device = {
.name = "sh-dma-engine",
.id = 4,
.resource = sh7372_usb_dmae1_resources,
.num_resources = ARRAY_SIZE(sh7372_usb_dmae1_resources),
.dev = {
.platform_data = &usb_dma1_platform_data,
},
};
/* VPU */ /* VPU */
static struct uio_info vpu_platform_data = { static struct uio_info vpu_platform_data = {
.name = "VPU5HG", .name = "VPU5HG",
...@@ -818,7 +962,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = { ...@@ -818,7 +962,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
&scif4_device, &scif4_device,
&scif5_device, &scif5_device,
&scif6_device, &scif6_device,
&cmt10_device, &cmt2_device,
&tmu00_device, &tmu00_device,
&tmu01_device, &tmu01_device,
}; };
...@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = { ...@@ -829,6 +973,8 @@ static struct platform_device *sh7372_late_devices[] __initdata = {
&dma0_device, &dma0_device,
&dma1_device, &dma1_device,
&dma2_device, &dma2_device,
&usb_dma0_device,
&usb_dma1_device,
&vpu_device, &vpu_device,
&veu0_device, &veu0_device,
&veu1_device, &veu1_device,
......
...@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = { ...@@ -318,6 +318,10 @@ static struct clk v2m_sp804_clk = {
.rate = 1000000, .rate = 1000000,
}; };
static struct clk v2m_ref_clk = {
.rate = 32768,
};
static struct clk dummy_apb_pclk; static struct clk dummy_apb_pclk;
static struct clk_lookup v2m_lookups[] = { static struct clk_lookup v2m_lookups[] = {
...@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = { ...@@ -348,6 +352,9 @@ static struct clk_lookup v2m_lookups[] = {
}, { /* CLCD */ }, { /* CLCD */
.dev_id = "mb:clcd", .dev_id = "mb:clcd",
.clk = &osc1_clk, .clk = &osc1_clk,
}, { /* SP805 WDT */
.dev_id = "mb:wdt",
.clk = &v2m_ref_clk,
}, { /* SP804 timers */ }, { /* SP804 timers */
.dev_id = "sp804", .dev_id = "sp804",
.con_id = "v2m-timer0", .con_id = "v2m-timer0",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
cmp \tmp, # 0x5600 @ Is it ldrsb? cmp \tmp, # 0x5600 @ Is it ldrsb?
orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes orreq \tmp, \tmp, #1 << 11 @ Set L-bit if yes
tst \tmp, #1 << 11 @ L = 0 -> write tst \tmp, #1 << 11 @ L = 0 -> write
orreq \psr, \psr, #1 << 11 @ yes. orreq \fsr, \fsr, #1 << 11 @ yes.
b do_DataAbort b do_DataAbort
not_thumb: not_thumb:
.endm .endm
......
...@@ -277,6 +277,25 @@ static void l2x0_disable(void) ...@@ -277,6 +277,25 @@ static void l2x0_disable(void)
spin_unlock_irqrestore(&l2x0_lock, flags); spin_unlock_irqrestore(&l2x0_lock, flags);
} }
static void __init l2x0_unlock(__u32 cache_id)
{
int lockregs;
int i;
if (cache_id == L2X0_CACHE_ID_PART_L310)
lockregs = 8;
else
/* L210 and unknown types */
lockregs = 1;
for (i = 0; i < lockregs; i++) {
writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_D_BASE +
i * L2X0_LOCKDOWN_STRIDE);
writel_relaxed(0x0, l2x0_base + L2X0_LOCKDOWN_WAY_I_BASE +
i * L2X0_LOCKDOWN_STRIDE);
}
}
void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
{ {
__u32 aux; __u32 aux;
...@@ -328,6 +347,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask) ...@@ -328,6 +347,8 @@ void __init l2x0_init(void __iomem *base, __u32 aux_val, __u32 aux_mask)
* accessing the below registers will fault. * accessing the below registers will fault.
*/ */
if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) { if (!(readl_relaxed(l2x0_base + L2X0_CTRL) & 1)) {
/* Make sure that I&D is not locked down when starting */
l2x0_unlock(cache_id);
/* l2x0 controller is disabled */ /* l2x0 controller is disabled */
writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL); writel_relaxed(aux, l2x0_base + L2X0_AUX_CTRL);
......
...@@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low, ...@@ -298,7 +298,7 @@ static void __init arm_bootmem_free(unsigned long min, unsigned long max_low,
#ifdef CONFIG_HAVE_ARCH_PFN_VALID #ifdef CONFIG_HAVE_ARCH_PFN_VALID
int pfn_valid(unsigned long pfn) int pfn_valid(unsigned long pfn)
{ {
return memblock_is_memory(pfn << PAGE_SHIFT); return memblock_is_memory(__pfn_to_phys(pfn));
} }
EXPORT_SYMBOL(pfn_valid); EXPORT_SYMBOL(pfn_valid);
#endif #endif
......
...@@ -379,7 +379,7 @@ ENTRY(cpu_arm920_set_pte_ext) ...@@ -379,7 +379,7 @@ ENTRY(cpu_arm920_set_pte_ext)
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
.globl cpu_arm920_suspend_size .globl cpu_arm920_suspend_size
.equ cpu_arm920_suspend_size, 4 * 3 .equ cpu_arm920_suspend_size, 4 * 4
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
ENTRY(cpu_arm920_do_suspend) ENTRY(cpu_arm920_do_suspend)
stmfd sp!, {r4 - r7, lr} stmfd sp!, {r4 - r7, lr}
......
...@@ -394,7 +394,7 @@ ENTRY(cpu_arm926_set_pte_ext) ...@@ -394,7 +394,7 @@ ENTRY(cpu_arm926_set_pte_ext)
/* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */ /* Suspend/resume support: taken from arch/arm/plat-s3c24xx/sleep.S */
.globl cpu_arm926_suspend_size .globl cpu_arm926_suspend_size
.equ cpu_arm926_suspend_size, 4 * 3 .equ cpu_arm926_suspend_size, 4 * 4
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
ENTRY(cpu_arm926_do_suspend) ENTRY(cpu_arm926_do_suspend)
stmfd sp!, {r4 - r7, lr} stmfd sp!, {r4 - r7, lr}
......
...@@ -182,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend) ...@@ -182,11 +182,11 @@ ENDPROC(cpu_sa1100_do_suspend)
ENTRY(cpu_sa1100_do_resume) ENTRY(cpu_sa1100_do_resume)
ldmia r0, {r4 - r7} @ load cp regs ldmia r0, {r4 - r7} @ load cp regs
mov r1, #0 mov ip, #0
mcr p15, 0, r1, c8, c7, 0 @ flush I+D TLBs mcr p15, 0, ip, c8, c7, 0 @ flush I+D TLBs
mcr p15, 0, r1, c7, c7, 0 @ flush I&D cache mcr p15, 0, ip, c7, c7, 0 @ flush I&D cache
mcr p15, 0, r1, c9, c0, 0 @ invalidate RB mcr p15, 0, ip, c9, c0, 0 @ invalidate RB
mcr p15, 0, r1, c9, c0, 5 @ allow user space to use RB mcr p15, 0, ip, c9, c0, 5 @ allow user space to use RB
mcr p15, 0, r4, c3, c0, 0 @ domain ID mcr p15, 0, r4, c3, c0, 0 @ domain ID
mcr p15, 0, r5, c2, c0, 0 @ translation table base addr mcr p15, 0, r5, c2, c0, 0 @ translation table base addr
......
...@@ -223,6 +223,22 @@ __v6_setup: ...@@ -223,6 +223,22 @@ __v6_setup:
mrc p15, 0, r0, c1, c0, 0 @ read control register mrc p15, 0, r0, c1, c0, 0 @ read control register
bic r0, r0, r5 @ clear bits them bic r0, r0, r5 @ clear bits them
orr r0, r0, r6 @ set them orr r0, r0, r6 @ set them
#ifdef CONFIG_ARM_ERRATA_364296
/*
* Workaround for the 364296 ARM1136 r0p2 erratum (possible cache data
* corruption with hit-under-miss enabled). The conditional code below
* (setting the undocumented bit 31 in the auxiliary control register
* and the FI bit in the control register) disables hit-under-miss
* without putting the processor into full low interrupt latency mode.
*/
ldr r6, =0x4107b362 @ id for ARM1136 r0p2
mrc p15, 0, r5, c0, c0, 0 @ get processor id
teq r5, r6 @ check for the faulty core
mrceq p15, 0, r5, c1, c0, 1 @ load aux control reg
orreq r5, r5, #(1 << 31) @ set the undocumented bit 31
mcreq p15, 0, r5, c1, c0, 1 @ write aux control reg
orreq r0, r0, #(1 << 21) @ low interrupt latency configuration
#endif
mov pc, lr @ return to head.S:__ret mov pc, lr @ return to head.S:__ret
/* /*
......
...@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin) ...@@ -66,6 +66,7 @@ ENDPROC(cpu_v7_proc_fin)
ENTRY(cpu_v7_reset) ENTRY(cpu_v7_reset)
mrc p15, 0, r1, c1, c0, 0 @ ctrl register mrc p15, 0, r1, c1, c0, 0 @ ctrl register
bic r1, r1, #0x1 @ ...............m bic r1, r1, #0x1 @ ...............m
THUMB( bic r1, r1, #1 << 30 ) @ SCTLR.TE (Thumb exceptions)
mcr p15, 0, r1, c1, c0, 0 @ disable MMU mcr p15, 0, r1, c1, c0, 0 @ disable MMU
isb isb
mov pc, r0 mov pc, r0
...@@ -247,13 +248,16 @@ ENTRY(cpu_v7_do_resume) ...@@ -247,13 +248,16 @@ ENTRY(cpu_v7_do_resume)
mcr p15, 0, r7, c2, c0, 0 @ TTB 0 mcr p15, 0, r7, c2, c0, 0 @ TTB 0
mcr p15, 0, r8, c2, c0, 1 @ TTB 1 mcr p15, 0, r8, c2, c0, 1 @ TTB 1
mcr p15, 0, ip, c2, c0, 2 @ TTB control register mcr p15, 0, ip, c2, c0, 2 @ TTB control register
mcr p15, 0, r10, c1, c0, 1 @ Auxiliary control register mrc p15, 0, r4, c1, c0, 1 @ Read Auxiliary control register
teq r4, r10 @ Is it already set?
mcrne p15, 0, r10, c1, c0, 1 @ No, so write it
mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control mcr p15, 0, r11, c1, c0, 2 @ Co-processor access control
ldr r4, =PRRR @ PRRR ldr r4, =PRRR @ PRRR
ldr r5, =NMRR @ NMRR ldr r5, =NMRR @ NMRR
mcr p15, 0, r4, c10, c2, 0 @ write PRRR mcr p15, 0, r4, c10, c2, 0 @ write PRRR
mcr p15, 0, r5, c10, c2, 1 @ write NMRR mcr p15, 0, r5, c10, c2, 1 @ write NMRR
isb isb
dsb
mov r0, r9 @ control register mov r0, r9 @ control register
mov r2, r7, lsr #14 @ get TTB0 base mov r2, r7, lsr #14 @ get TTB0 base
mov r2, r2, lsl #14 mov r2, r2, lsl #14
......
...@@ -406,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext) ...@@ -406,7 +406,7 @@ ENTRY(cpu_xsc3_set_pte_ext)
.align .align
.globl cpu_xsc3_suspend_size .globl cpu_xsc3_suspend_size
.equ cpu_xsc3_suspend_size, 4 * 8 .equ cpu_xsc3_suspend_size, 4 * 7
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
ENTRY(cpu_xsc3_do_suspend) ENTRY(cpu_xsc3_do_suspend)
stmfd sp!, {r4 - r10, lr} stmfd sp!, {r4 - r10, lr}
...@@ -418,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend) ...@@ -418,12 +418,12 @@ ENTRY(cpu_xsc3_do_suspend)
mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg mrc p15, 0, r9, c1, c0, 1 @ auxiliary control reg
mrc p15, 0, r10, c1, c0, 0 @ control reg mrc p15, 0, r10, c1, c0, 0 @ control reg
bic r4, r4, #2 @ clear frequency change bit bic r4, r4, #2 @ clear frequency change bit
stmia r0, {r1, r4 - r10} @ store v:p offset + cp regs stmia r0, {r4 - r10} @ store cp regs
ldmia sp!, {r4 - r10, pc} ldmia sp!, {r4 - r10, pc}
ENDPROC(cpu_xsc3_do_suspend) ENDPROC(cpu_xsc3_do_suspend)
ENTRY(cpu_xsc3_do_resume) ENTRY(cpu_xsc3_do_resume)
ldmia r0, {r1, r4 - r10} @ load v:p offset + cp regs ldmia r0, {r4 - r10} @ load cp regs
mov ip, #0 mov ip, #0
mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB mcr p15, 0, ip, c7, c7, 0 @ invalidate I & D caches, BTB
mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer mcr p15, 0, ip, c7, c10, 4 @ drain write (&fill) buffer
......
...@@ -135,7 +135,7 @@ static inline int omap2_i2c_add_bus(int bus_id) ...@@ -135,7 +135,7 @@ static inline int omap2_i2c_add_bus(int bus_id)
{ {
int l; int l;
struct omap_hwmod *oh; struct omap_hwmod *oh;
struct omap_device *od; struct platform_device *pdev;
char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN]; char oh_name[MAX_OMAP_I2C_HWMOD_NAME_LEN];
struct omap_i2c_bus_platform_data *pdata; struct omap_i2c_bus_platform_data *pdata;
...@@ -160,12 +160,12 @@ static inline int omap2_i2c_add_bus(int bus_id) ...@@ -160,12 +160,12 @@ static inline int omap2_i2c_add_bus(int bus_id)
*/ */
if (cpu_is_omap34xx()) if (cpu_is_omap34xx())
pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat; pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
od = omap_device_build(name, bus_id, oh, pdata, pdev = omap_device_build(name, bus_id, oh, pdata,
sizeof(struct omap_i2c_bus_platform_data), sizeof(struct omap_i2c_bus_platform_data),
omap_i2c_latency, ARRAY_SIZE(omap_i2c_latency), 0); omap_i2c_latency, ARRAY_SIZE(omap_i2c_latency), 0);
WARN(IS_ERR(od), "Could not build omap_device for %s\n", name); WARN(IS_ERR(pdev), "Could not build omap_device for %s\n", name);
return PTR_ERR(od); return PTR_ERR(pdev);
} }
#else #else
static inline int omap2_i2c_add_bus(int bus_id) static inline int omap2_i2c_add_bus(int bus_id)
......
...@@ -68,7 +68,7 @@ extern struct device omap_device_parent; ...@@ -68,7 +68,7 @@ extern struct device omap_device_parent;
* *
*/ */
struct omap_device { struct omap_device {
struct platform_device pdev; struct platform_device *pdev;
struct omap_hwmod **hwmods; struct omap_hwmod **hwmods;
struct omap_device_pm_latency *pm_lats; struct omap_device_pm_latency *pm_lats;
u32 dev_wakeup_lat; u32 dev_wakeup_lat;
...@@ -88,24 +88,18 @@ int omap_device_shutdown(struct platform_device *pdev); ...@@ -88,24 +88,18 @@ int omap_device_shutdown(struct platform_device *pdev);
/* Core code interface */ /* Core code interface */
int omap_device_count_resources(struct omap_device *od); struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
int omap_device_fill_resources(struct omap_device *od, struct resource *res);
struct omap_device *omap_device_build(const char *pdev_name, int pdev_id,
struct omap_hwmod *oh, void *pdata, struct omap_hwmod *oh, void *pdata,
int pdata_len, int pdata_len,
struct omap_device_pm_latency *pm_lats, struct omap_device_pm_latency *pm_lats,
int pm_lats_cnt, int is_early_device); int pm_lats_cnt, int is_early_device);
struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct omap_hwmod **oh, int oh_cnt, struct omap_hwmod **oh, int oh_cnt,
void *pdata, int pdata_len, void *pdata, int pdata_len,
struct omap_device_pm_latency *pm_lats, struct omap_device_pm_latency *pm_lats,
int pm_lats_cnt, int is_early_device); int pm_lats_cnt, int is_early_device);
int omap_device_register(struct omap_device *od);
int omap_early_device_register(struct omap_device *od);
void __iomem *omap_device_get_rt_va(struct omap_device *od); void __iomem *omap_device_get_rt_va(struct omap_device *od);
/* OMAP PM interface */ /* OMAP PM interface */
...@@ -122,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od); ...@@ -122,11 +116,6 @@ int omap_device_enable_hwmods(struct omap_device *od);
int omap_device_disable_clocks(struct omap_device *od); int omap_device_disable_clocks(struct omap_device *od);
int omap_device_enable_clocks(struct omap_device *od); int omap_device_enable_clocks(struct omap_device *od);
static inline void omap_device_disable_idle_on_suspend(struct omap_device *od)
{
od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
}
/* /*
* Entries should be kept in latency order ascending * Entries should be kept in latency order ascending
* *
...@@ -157,6 +146,17 @@ struct omap_device_pm_latency { ...@@ -157,6 +146,17 @@ struct omap_device_pm_latency {
#define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1) #define OMAP_DEVICE_LATENCY_AUTO_ADJUST BIT(1)
/* Get omap_device pointer from platform_device pointer */ /* Get omap_device pointer from platform_device pointer */
#define to_omap_device(x) container_of((x), struct omap_device, pdev) static inline struct omap_device *to_omap_device(struct platform_device *pdev)
{
return pdev ? pdev->archdata.od : NULL;
}
static inline
void omap_device_disable_idle_on_suspend(struct platform_device *pdev)
{
struct omap_device *od = to_omap_device(pdev);
od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND;
}
#endif #endif
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <plat/mcbsp.h> #include <plat/mcbsp.h>
#include <plat/omap_device.h>
#include <linux/pm_runtime.h> #include <linux/pm_runtime.h>
/* XXX These "sideways" includes are a sign that something is wrong */ /* XXX These "sideways" includes are a sign that something is wrong */
...@@ -258,19 +257,9 @@ int omap_mcbsp_dma_reg_params(unsigned int id, unsigned int stream) ...@@ -258,19 +257,9 @@ int omap_mcbsp_dma_reg_params(unsigned int id, unsigned int stream)
EXPORT_SYMBOL(omap_mcbsp_dma_reg_params); EXPORT_SYMBOL(omap_mcbsp_dma_reg_params);
#ifdef CONFIG_ARCH_OMAP3 #ifdef CONFIG_ARCH_OMAP3
static struct omap_device *find_omap_device_by_dev(struct device *dev)
{
struct platform_device *pdev = container_of(dev,
struct platform_device, dev);
return container_of(pdev, struct omap_device, pdev);
}
static void omap_st_on(struct omap_mcbsp *mcbsp) static void omap_st_on(struct omap_mcbsp *mcbsp)
{ {
unsigned int w; unsigned int w;
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
/* /*
* Sidetone uses McBSP ICLK - which must not idle when sidetones * Sidetone uses McBSP ICLK - which must not idle when sidetones
...@@ -292,9 +281,6 @@ static void omap_st_on(struct omap_mcbsp *mcbsp) ...@@ -292,9 +281,6 @@ static void omap_st_on(struct omap_mcbsp *mcbsp)
static void omap_st_off(struct omap_mcbsp *mcbsp) static void omap_st_off(struct omap_mcbsp *mcbsp)
{ {
unsigned int w; unsigned int w;
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
w = MCBSP_ST_READ(mcbsp, SSELCR); w = MCBSP_ST_READ(mcbsp, SSELCR);
MCBSP_ST_WRITE(mcbsp, SSELCR, w & ~(ST_SIDETONEEN)); MCBSP_ST_WRITE(mcbsp, SSELCR, w & ~(ST_SIDETONEEN));
...@@ -310,9 +296,6 @@ static void omap_st_off(struct omap_mcbsp *mcbsp) ...@@ -310,9 +296,6 @@ static void omap_st_off(struct omap_mcbsp *mcbsp)
static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir) static void omap_st_fir_write(struct omap_mcbsp *mcbsp, s16 *fir)
{ {
u16 val, i; u16 val, i;
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
val = MCBSP_ST_READ(mcbsp, SSELCR); val = MCBSP_ST_READ(mcbsp, SSELCR);
...@@ -340,9 +323,6 @@ static void omap_st_chgain(struct omap_mcbsp *mcbsp) ...@@ -340,9 +323,6 @@ static void omap_st_chgain(struct omap_mcbsp *mcbsp)
{ {
u16 w; u16 w;
struct omap_mcbsp_st_data *st_data = mcbsp->st_data; struct omap_mcbsp_st_data *st_data = mcbsp->st_data;
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
w = MCBSP_ST_READ(mcbsp, SSELCR); w = MCBSP_ST_READ(mcbsp, SSELCR);
...@@ -685,9 +665,6 @@ EXPORT_SYMBOL(omap_mcbsp_get_dma_op_mode); ...@@ -685,9 +665,6 @@ EXPORT_SYMBOL(omap_mcbsp_get_dma_op_mode);
static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp) static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
{ {
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
/* /*
* Enable wakup behavior, smart idle and all wakeups * Enable wakup behavior, smart idle and all wakeups
* REVISIT: some wakeups may be unnecessary * REVISIT: some wakeups may be unnecessary
...@@ -699,10 +676,6 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp) ...@@ -699,10 +676,6 @@ static inline void omap34xx_mcbsp_request(struct omap_mcbsp *mcbsp)
static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp) static inline void omap34xx_mcbsp_free(struct omap_mcbsp *mcbsp)
{ {
struct omap_device *od;
od = find_omap_device_by_dev(mcbsp->dev);
/* /*
* Disable wakup behavior, smart idle and all wakeups * Disable wakup behavior, smart idle and all wakeups
*/ */
......
...@@ -94,6 +94,9 @@ ...@@ -94,6 +94,9 @@
#define USE_WAKEUP_LAT 0 #define USE_WAKEUP_LAT 0
#define IGNORE_WAKEUP_LAT 1 #define IGNORE_WAKEUP_LAT 1
static int omap_device_register(struct platform_device *pdev);
static int omap_early_device_register(struct platform_device *pdev);
/* Private functions */ /* Private functions */
/** /**
...@@ -114,7 +117,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) ...@@ -114,7 +117,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
{ {
struct timespec a, b, c; struct timespec a, b, c;
pr_debug("omap_device: %s: activating\n", od->pdev.name); dev_dbg(&od->pdev->dev, "omap_device: activating\n");
while (od->pm_lat_level > 0) { while (od->pm_lat_level > 0) {
struct omap_device_pm_latency *odpl; struct omap_device_pm_latency *odpl;
...@@ -138,25 +141,24 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) ...@@ -138,25 +141,24 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
c = timespec_sub(b, a); c = timespec_sub(b, a);
act_lat = timespec_to_ns(&c); act_lat = timespec_to_ns(&c);
pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time " dev_dbg(&od->pdev->dev,
"%llu nsec\n", od->pdev.name, od->pm_lat_level, "omap_device: pm_lat %d: activate: elapsed time "
act_lat); "%llu nsec\n", od->pm_lat_level, act_lat);
if (act_lat > odpl->activate_lat) { if (act_lat > odpl->activate_lat) {
odpl->activate_lat_worst = act_lat; odpl->activate_lat_worst = act_lat;
if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) { if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
odpl->activate_lat = act_lat; odpl->activate_lat = act_lat;
pr_warning("omap_device: %s.%d: new worst case " dev_dbg(&od->pdev->dev,
"activate latency %d: %llu\n", "new worst case activate latency "
od->pdev.name, od->pdev.id, "%d: %llu\n",
od->pm_lat_level, act_lat); od->pm_lat_level, act_lat);
} else } else
pr_warning("omap_device: %s.%d: activate " dev_warn(&od->pdev->dev,
"latency %d higher than exptected. " "activate latency %d "
"(%llu > %d)\n", "higher than exptected. (%llu > %d)\n",
od->pdev.name, od->pdev.id, od->pm_lat_level, act_lat,
od->pm_lat_level, act_lat, odpl->activate_lat);
odpl->activate_lat);
} }
od->dev_wakeup_lat -= odpl->activate_lat; od->dev_wakeup_lat -= odpl->activate_lat;
...@@ -183,7 +185,7 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) ...@@ -183,7 +185,7 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
{ {
struct timespec a, b, c; struct timespec a, b, c;
pr_debug("omap_device: %s: deactivating\n", od->pdev.name); dev_dbg(&od->pdev->dev, "omap_device: deactivating\n");
while (od->pm_lat_level < od->pm_lats_cnt) { while (od->pm_lat_level < od->pm_lats_cnt) {
struct omap_device_pm_latency *odpl; struct omap_device_pm_latency *odpl;
...@@ -206,28 +208,26 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) ...@@ -206,28 +208,26 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
c = timespec_sub(b, a); c = timespec_sub(b, a);
deact_lat = timespec_to_ns(&c); deact_lat = timespec_to_ns(&c);
pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time " dev_dbg(&od->pdev->dev,
"%llu nsec\n", od->pdev.name, od->pm_lat_level, "omap_device: pm_lat %d: deactivate: elapsed time "
deact_lat); "%llu nsec\n", od->pm_lat_level, deact_lat);
if (deact_lat > odpl->deactivate_lat) { if (deact_lat > odpl->deactivate_lat) {
odpl->deactivate_lat_worst = deact_lat; odpl->deactivate_lat_worst = deact_lat;
if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) { if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) {
odpl->deactivate_lat = deact_lat; odpl->deactivate_lat = deact_lat;
pr_warning("omap_device: %s.%d: new worst case " dev_dbg(&od->pdev->dev,
"deactivate latency %d: %llu\n", "new worst case deactivate latency "
od->pdev.name, od->pdev.id, "%d: %llu\n",
od->pm_lat_level, deact_lat); od->pm_lat_level, deact_lat);
} else } else
pr_warning("omap_device: %s.%d: deactivate " dev_warn(&od->pdev->dev,
"latency %d higher than exptected. " "deactivate latency %d "
"(%llu > %d)\n", "higher than exptected. (%llu > %d)\n",
od->pdev.name, od->pdev.id, od->pm_lat_level, deact_lat,
od->pm_lat_level, deact_lat, odpl->deactivate_lat);
odpl->deactivate_lat);
} }
od->dev_wakeup_lat += odpl->activate_lat; od->dev_wakeup_lat += odpl->activate_lat;
od->pm_lat_level++; od->pm_lat_level++;
...@@ -245,28 +245,27 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias, ...@@ -245,28 +245,27 @@ static void _add_clkdev(struct omap_device *od, const char *clk_alias,
if (!clk_alias || !clk_name) if (!clk_alias || !clk_name)
return; return;
pr_debug("omap_device: %s: Creating %s -> %s\n", dev_dbg(&od->pdev->dev, "Creating %s -> %s\n", clk_alias, clk_name);
dev_name(&od->pdev.dev), clk_alias, clk_name);
r = clk_get_sys(dev_name(&od->pdev.dev), clk_alias); r = clk_get_sys(dev_name(&od->pdev->dev), clk_alias);
if (!IS_ERR(r)) { if (!IS_ERR(r)) {
pr_warning("omap_device: %s: alias %s already exists\n", dev_warn(&od->pdev->dev,
dev_name(&od->pdev.dev), clk_alias); "alias %s already exists\n", clk_alias);
clk_put(r); clk_put(r);
return; return;
} }
r = omap_clk_get_by_name(clk_name); r = omap_clk_get_by_name(clk_name);
if (IS_ERR(r)) { if (IS_ERR(r)) {
pr_err("omap_device: %s: omap_clk_get_by_name for %s failed\n", dev_err(&od->pdev->dev,
dev_name(&od->pdev.dev), clk_name); "omap_clk_get_by_name for %s failed\n", clk_name);
return; return;
} }
l = clkdev_alloc(r, clk_alias, dev_name(&od->pdev.dev)); l = clkdev_alloc(r, clk_alias, dev_name(&od->pdev->dev));
if (!l) { if (!l) {
pr_err("omap_device: %s: clkdev_alloc for %s failed\n", dev_err(&od->pdev->dev,
dev_name(&od->pdev.dev), clk_alias); "clkdev_alloc for %s failed\n", clk_alias);
return; return;
} }
...@@ -343,7 +342,7 @@ u32 omap_device_get_context_loss_count(struct platform_device *pdev) ...@@ -343,7 +342,7 @@ u32 omap_device_get_context_loss_count(struct platform_device *pdev)
* much memory to allocate before calling * much memory to allocate before calling
* omap_device_fill_resources(). Returns the count. * omap_device_fill_resources(). Returns the count.
*/ */
int omap_device_count_resources(struct omap_device *od) static int omap_device_count_resources(struct omap_device *od)
{ {
int c = 0; int c = 0;
int i; int i;
...@@ -352,7 +351,7 @@ int omap_device_count_resources(struct omap_device *od) ...@@ -352,7 +351,7 @@ int omap_device_count_resources(struct omap_device *od)
c += omap_hwmod_count_resources(od->hwmods[i]); c += omap_hwmod_count_resources(od->hwmods[i]);
pr_debug("omap_device: %s: counted %d total resources across %d " pr_debug("omap_device: %s: counted %d total resources across %d "
"hwmods\n", od->pdev.name, c, od->hwmods_cnt); "hwmods\n", od->pdev->name, c, od->hwmods_cnt);
return c; return c;
} }
...@@ -374,7 +373,8 @@ int omap_device_count_resources(struct omap_device *od) ...@@ -374,7 +373,8 @@ int omap_device_count_resources(struct omap_device *od)
* functions to get device resources. Hacking around the existing * functions to get device resources. Hacking around the existing
* platform_device code wastes memory. Returns 0. * platform_device code wastes memory. Returns 0.
*/ */
int omap_device_fill_resources(struct omap_device *od, struct resource *res) static int omap_device_fill_resources(struct omap_device *od,
struct resource *res)
{ {
int c = 0; int c = 0;
int i, r; int i, r;
...@@ -405,7 +405,7 @@ int omap_device_fill_resources(struct omap_device *od, struct resource *res) ...@@ -405,7 +405,7 @@ int omap_device_fill_resources(struct omap_device *od, struct resource *res)
* information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise, * information. Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
* passes along the return value of omap_device_build_ss(). * passes along the return value of omap_device_build_ss().
*/ */
struct omap_device *omap_device_build(const char *pdev_name, int pdev_id, struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
struct omap_hwmod *oh, void *pdata, struct omap_hwmod *oh, void *pdata,
int pdata_len, int pdata_len,
struct omap_device_pm_latency *pm_lats, struct omap_device_pm_latency *pm_lats,
...@@ -438,15 +438,15 @@ struct omap_device *omap_device_build(const char *pdev_name, int pdev_id, ...@@ -438,15 +438,15 @@ struct omap_device *omap_device_build(const char *pdev_name, int pdev_id,
* platform_device record. Returns an ERR_PTR() on error, or passes * platform_device record. Returns an ERR_PTR() on error, or passes
* along the return value of omap_device_register(). * along the return value of omap_device_register().
*/ */
struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
struct omap_hwmod **ohs, int oh_cnt, struct omap_hwmod **ohs, int oh_cnt,
void *pdata, int pdata_len, void *pdata, int pdata_len,
struct omap_device_pm_latency *pm_lats, struct omap_device_pm_latency *pm_lats,
int pm_lats_cnt, int is_early_device) int pm_lats_cnt, int is_early_device)
{ {
int ret = -ENOMEM; int ret = -ENOMEM;
struct platform_device *pdev;
struct omap_device *od; struct omap_device *od;
char *pdev_name2;
struct resource *res = NULL; struct resource *res = NULL;
int i, res_count; int i, res_count;
struct omap_hwmod **hwmods; struct omap_hwmod **hwmods;
...@@ -457,72 +457,76 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, ...@@ -457,72 +457,76 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
if (!pdata && pdata_len > 0) if (!pdata && pdata_len > 0)
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
pdev = platform_device_alloc(pdev_name, pdev_id);
if (!pdev) {
ret = -ENOMEM;
goto odbs_exit;
}
pr_debug("omap_device: %s: building with %d hwmods\n", pdev_name, pr_debug("omap_device: %s: building with %d hwmods\n", pdev_name,
oh_cnt); oh_cnt);
od = kzalloc(sizeof(struct omap_device), GFP_KERNEL); od = kzalloc(sizeof(struct omap_device), GFP_KERNEL);
if (!od) if (!od) {
return ERR_PTR(-ENOMEM); ret = -ENOMEM;
goto odbs_exit1;
}
od->hwmods_cnt = oh_cnt; od->hwmods_cnt = oh_cnt;
hwmods = kzalloc(sizeof(struct omap_hwmod *) * oh_cnt, hwmods = kzalloc(sizeof(struct omap_hwmod *) * oh_cnt,
GFP_KERNEL); GFP_KERNEL);
if (!hwmods) if (!hwmods)
goto odbs_exit1; goto odbs_exit2;
memcpy(hwmods, ohs, sizeof(struct omap_hwmod *) * oh_cnt); memcpy(hwmods, ohs, sizeof(struct omap_hwmod *) * oh_cnt);
od->hwmods = hwmods; od->hwmods = hwmods;
od->pdev = pdev;
pdev_name2 = kzalloc(strlen(pdev_name) + 1, GFP_KERNEL);
if (!pdev_name2)
goto odbs_exit2;
strcpy(pdev_name2, pdev_name);
od->pdev.name = pdev_name2;
od->pdev.id = pdev_id;
res_count = omap_device_count_resources(od); res_count = omap_device_count_resources(od);
if (res_count > 0) { if (res_count > 0) {
res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL); res = kzalloc(sizeof(struct resource) * res_count, GFP_KERNEL);
if (!res) if (!res)
goto odbs_exit3; goto odbs_exit3;
}
omap_device_fill_resources(od, res);
od->pdev.num_resources = res_count; omap_device_fill_resources(od, res);
od->pdev.resource = res;
ret = platform_device_add_resources(pdev, res, res_count);
kfree(res);
ret = platform_device_add_data(&od->pdev, pdata, pdata_len); if (ret)
goto odbs_exit3;
}
ret = platform_device_add_data(pdev, pdata, pdata_len);
if (ret) if (ret)
goto odbs_exit4; goto odbs_exit3;
od->pm_lats = pm_lats; pdev->archdata.od = od;
od->pm_lats_cnt = pm_lats_cnt;
if (is_early_device) if (is_early_device)
ret = omap_early_device_register(od); ret = omap_early_device_register(pdev);
else else
ret = omap_device_register(od); ret = omap_device_register(pdev);
if (ret)
goto odbs_exit3;
od->pm_lats = pm_lats;
od->pm_lats_cnt = pm_lats_cnt;
for (i = 0; i < oh_cnt; i++) { for (i = 0; i < oh_cnt; i++) {
hwmods[i]->od = od; hwmods[i]->od = od;
_add_hwmod_clocks_clkdev(od, hwmods[i]); _add_hwmod_clocks_clkdev(od, hwmods[i]);
} }
if (ret) return pdev;
goto odbs_exit4;
return od;
odbs_exit4:
kfree(res);
odbs_exit3: odbs_exit3:
kfree(pdev_name2);
odbs_exit2:
kfree(hwmods); kfree(hwmods);
odbs_exit1: odbs_exit2:
kfree(od); kfree(od);
odbs_exit1:
platform_device_put(pdev);
odbs_exit:
pr_err("omap_device: %s: build failed (%d)\n", pdev_name, ret); pr_err("omap_device: %s: build failed (%d)\n", pdev_name, ret);
...@@ -538,11 +542,11 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, ...@@ -538,11 +542,11 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
* platform_early_add_device() on the underlying platform_device. * platform_early_add_device() on the underlying platform_device.
* Returns 0 by default. * Returns 0 by default.
*/ */
int omap_early_device_register(struct omap_device *od) static int omap_early_device_register(struct platform_device *pdev)
{ {
struct platform_device *devices[1]; struct platform_device *devices[1];
devices[0] = &(od->pdev); devices[0] = pdev;
early_platform_add_devices(devices, 1); early_platform_add_devices(devices, 1);
return 0; return 0;
} }
...@@ -615,6 +619,9 @@ static int _od_resume_noirq(struct device *dev) ...@@ -615,6 +619,9 @@ static int _od_resume_noirq(struct device *dev)
return pm_generic_resume_noirq(dev); return pm_generic_resume_noirq(dev);
} }
#else
#define _od_suspend_noirq NULL
#define _od_resume_noirq NULL
#endif #endif
static struct dev_pm_domain omap_device_pm_domain = { static struct dev_pm_domain omap_device_pm_domain = {
...@@ -635,13 +642,13 @@ static struct dev_pm_domain omap_device_pm_domain = { ...@@ -635,13 +642,13 @@ static struct dev_pm_domain omap_device_pm_domain = {
* platform_device_register() on the underlying platform_device. * platform_device_register() on the underlying platform_device.
* Returns the return value of platform_device_register(). * Returns the return value of platform_device_register().
*/ */
int omap_device_register(struct omap_device *od) static int omap_device_register(struct platform_device *pdev)
{ {
pr_debug("omap_device: %s: registering\n", od->pdev.name); pr_debug("omap_device: %s: registering\n", pdev->name);
od->pdev.dev.parent = &omap_device_parent; pdev->dev.parent = &omap_device_parent;
od->pdev.dev.pm_domain = &omap_device_pm_domain; pdev->dev.pm_domain = &omap_device_pm_domain;
return platform_device_register(&od->pdev); return platform_device_add(pdev);
} }
...@@ -668,8 +675,9 @@ int omap_device_enable(struct platform_device *pdev) ...@@ -668,8 +675,9 @@ int omap_device_enable(struct platform_device *pdev)
od = to_omap_device(pdev); od = to_omap_device(pdev);
if (od->_state == OMAP_DEVICE_STATE_ENABLED) { if (od->_state == OMAP_DEVICE_STATE_ENABLED) {
WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", dev_warn(&pdev->dev,
od->pdev.name, od->pdev.id, __func__, od->_state); "omap_device: %s() called from invalid state %d\n",
__func__, od->_state);
return -EINVAL; return -EINVAL;
} }
...@@ -707,8 +715,9 @@ int omap_device_idle(struct platform_device *pdev) ...@@ -707,8 +715,9 @@ int omap_device_idle(struct platform_device *pdev)
od = to_omap_device(pdev); od = to_omap_device(pdev);
if (od->_state != OMAP_DEVICE_STATE_ENABLED) { if (od->_state != OMAP_DEVICE_STATE_ENABLED) {
WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", dev_warn(&pdev->dev,
od->pdev.name, od->pdev.id, __func__, od->_state); "omap_device: %s() called from invalid state %d\n",
__func__, od->_state);
return -EINVAL; return -EINVAL;
} }
...@@ -739,8 +748,9 @@ int omap_device_shutdown(struct platform_device *pdev) ...@@ -739,8 +748,9 @@ int omap_device_shutdown(struct platform_device *pdev)
if (od->_state != OMAP_DEVICE_STATE_ENABLED && if (od->_state != OMAP_DEVICE_STATE_ENABLED &&
od->_state != OMAP_DEVICE_STATE_IDLE) { od->_state != OMAP_DEVICE_STATE_IDLE) {
WARN(1, "omap_device: %s.%d: %s() called from invalid state %d\n", dev_warn(&pdev->dev,
od->pdev.name, od->pdev.id, __func__, od->_state); "omap_device: %s() called from invalid state %d\n",
__func__, od->_state);
return -EINVAL; return -EINVAL;
} }
......
...@@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk) ...@@ -192,7 +192,7 @@ unsigned long s5p_spdif_get_rate(struct clk *clk)
if (IS_ERR(pclk)) if (IS_ERR(pclk))
return -EINVAL; return -EINVAL;
rate = pclk->ops->get_rate(clk); rate = pclk->ops->get_rate(pclk);
clk_put(pclk); clk_put(pclk);
return rate; return rate;
......
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include <plat/gpio-core.h> #include <plat/gpio-core.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <asm/mach/irq.h>
#define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u) #define GPIO_BASE(chip) (((unsigned long)(chip)->base) & 0xFFFFF000u)
#define CON_OFFSET 0x700 #define CON_OFFSET 0x700
...@@ -81,6 +83,9 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) ...@@ -81,6 +83,9 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc)
int group, pend_offset, mask_offset; int group, pend_offset, mask_offset;
unsigned int pend, mask; unsigned int pend, mask;
struct irq_chip *chip = irq_get_chip(irq);
chained_irq_enter(chip, desc);
for (group = 0; group < bank->nr_groups; group++) { for (group = 0; group < bank->nr_groups; group++) {
struct s3c_gpio_chip *chip = bank->chips[group]; struct s3c_gpio_chip *chip = bank->chips[group];
if (!chip) if (!chip)
...@@ -102,6 +107,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc) ...@@ -102,6 +107,7 @@ static void s5p_gpioint_handler(unsigned int irq, struct irq_desc *desc)
pend &= ~BIT(offset); pend &= ~BIT(offset);
} }
} }
chained_irq_exit(chip, desc);
} }
static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip) static __init int s5p_gpioint_add(struct s3c_gpio_chip *chip)
......
...@@ -20,7 +20,7 @@ struct samsung_bl_gpio_info { ...@@ -20,7 +20,7 @@ struct samsung_bl_gpio_info {
int func; int func;
}; };
extern void samsung_bl_set(struct samsung_bl_gpio_info *gpio_info, extern void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
struct platform_pwm_backlight_data *bl_data); struct platform_pwm_backlight_data *bl_data);
#endif /* __ASM_PLAT_BACKLIGHT_H */ #endif /* __ASM_PLAT_BACKLIGHT_H */
...@@ -22,9 +22,14 @@ ...@@ -22,9 +22,14 @@
#include <plat/irq-vic-timer.h> #include <plat/irq-vic-timer.h>
#include <plat/regs-timer.h> #include <plat/regs-timer.h>
#include <asm/mach/irq.h>
static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = irq_get_chip(irq);
chained_irq_enter(chip, desc);
generic_handle_irq((int)desc->irq_data.handler_data); generic_handle_irq((int)desc->irq_data.handler_data);
chained_irq_exit(chip, desc);
} }
/* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */ /* We assume the IRQ_TIMER0..IRQ_TIMER4 range is continuous. */
......
...@@ -351,7 +351,7 @@ centro MACH_CENTRO CENTRO 1944 ...@@ -351,7 +351,7 @@ centro MACH_CENTRO CENTRO 1944
nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955 nokia_rx51 MACH_NOKIA_RX51 NOKIA_RX51 1955
omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967 omap_zoom2 MACH_OMAP_ZOOM2 OMAP_ZOOM2 1967
cpuat9260 MACH_CPUAT9260 CPUAT9260 1973 cpuat9260 MACH_CPUAT9260 CPUAT9260 1973
eukrea_cpuimx27 MACH_CPUIMX27 CPUIMX27 1975 eukrea_cpuimx27 MACH_EUKREA_CPUIMX27 EUKREA_CPUIMX27 1975
acs5k MACH_ACS5K ACS5K 1982 acs5k MACH_ACS5K ACS5K 1982
snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987 snapper_9260 MACH_SNAPPER_9260 SNAPPER_9260 1987
dsm320 MACH_DSM320 DSM320 1988 dsm320 MACH_DSM320 DSM320 1988
...@@ -476,8 +476,8 @@ cns3420vb MACH_CNS3420VB CNS3420VB 2776 ...@@ -476,8 +476,8 @@ cns3420vb MACH_CNS3420VB CNS3420VB 2776
omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791 omap4_panda MACH_OMAP4_PANDA OMAP4_PANDA 2791
ti8168evm MACH_TI8168EVM TI8168EVM 2800 ti8168evm MACH_TI8168EVM TI8168EVM 2800
teton_bga MACH_TETON_BGA TETON_BGA 2816 teton_bga MACH_TETON_BGA TETON_BGA 2816
eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25 EUKREA_CPUIMX25 2820 eukrea_cpuimx25sd MACH_EUKREA_CPUIMX25SD EUKREA_CPUIMX25SD 2820
eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35 EUKREA_CPUIMX35 2821 eukrea_cpuimx35sd MACH_EUKREA_CPUIMX35SD EUKREA_CPUIMX35SD 2821
eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822 eukrea_cpuimx51sd MACH_EUKREA_CPUIMX51SD EUKREA_CPUIMX51SD 2822
eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823 eukrea_cpuimx51 MACH_EUKREA_CPUIMX51 EUKREA_CPUIMX51 2823
smdkc210 MACH_SMDKC210 SMDKC210 2838 smdkc210 MACH_SMDKC210 SMDKC210 2838
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define DMA_ERROR_CODE (~(dma_addr_t)0x0) #define DMA_ERROR_CODE (~(dma_addr_t)0x0)
int dma_mapping_error(struct device *dev, dma_addr_t dma_addr);
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
...@@ -47,6 +46,12 @@ dma_addr_t or1k_map_page(struct device *dev, struct page *page, ...@@ -47,6 +46,12 @@ dma_addr_t or1k_map_page(struct device *dev, struct page *page,
void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle, void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle,
size_t size, enum dma_data_direction dir, size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs); struct dma_attrs *attrs);
int or1k_map_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs);
void or1k_unmap_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs);
void or1k_sync_single_for_cpu(struct device *dev, void or1k_sync_single_for_cpu(struct device *dev,
dma_addr_t dma_handle, size_t size, dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir); enum dma_data_direction dir);
...@@ -98,6 +103,51 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t addr, ...@@ -98,6 +103,51 @@ static inline void dma_unmap_single(struct device *dev, dma_addr_t addr,
debug_dma_unmap_page(dev, addr, size, dir, true); debug_dma_unmap_page(dev, addr, size, dir, true);
} }
static inline int dma_map_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir)
{
int i, ents;
struct scatterlist *s;
for_each_sg(sg, s, nents, i)
kmemcheck_mark_initialized(sg_virt(s), s->length);
BUG_ON(!valid_dma_direction(dir));
ents = or1k_map_sg(dev, sg, nents, dir, NULL);
debug_dma_map_sg(dev, sg, nents, ents, dir);
return ents;
}
static inline void dma_unmap_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir)
{
BUG_ON(!valid_dma_direction(dir));
debug_dma_unmap_sg(dev, sg, nents, dir);
or1k_unmap_sg(dev, sg, nents, dir, NULL);
}
static inline dma_addr_t dma_map_page(struct device *dev, struct page *page,
size_t offset, size_t size,
enum dma_data_direction dir)
{
dma_addr_t addr;
kmemcheck_mark_initialized(page_address(page) + offset, size);
BUG_ON(!valid_dma_direction(dir));
addr = or1k_map_page(dev, page, offset, size, dir, NULL);
debug_dma_map_page(dev, page, offset, size, dir, addr, false);
return addr;
}
static inline void dma_unmap_page(struct device *dev, dma_addr_t addr,
size_t size, enum dma_data_direction dir)
{
BUG_ON(!valid_dma_direction(dir));
or1k_unmap_page(dev, addr, size, dir, NULL);
debug_dma_unmap_page(dev, addr, size, dir, true);
}
static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr, static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t addr,
size_t size, size_t size,
enum dma_data_direction dir) enum dma_data_direction dir)
...@@ -119,7 +169,12 @@ static inline void dma_sync_single_for_device(struct device *dev, ...@@ -119,7 +169,12 @@ static inline void dma_sync_single_for_device(struct device *dev,
static inline int dma_supported(struct device *dev, u64 dma_mask) static inline int dma_supported(struct device *dev, u64 dma_mask)
{ {
/* Support 32 bit DMA mask exclusively */ /* Support 32 bit DMA mask exclusively */
return dma_mask == 0xffffffffULL; return dma_mask == DMA_BIT_MASK(32);
}
static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return 0;
} }
static inline int dma_set_mask(struct device *dev, u64 dma_mask) static inline int dma_set_mask(struct device *dev, u64 dma_mask)
......
...@@ -23,16 +23,11 @@ ...@@ -23,16 +23,11 @@
/* This struct is saved by setup_frame in signal.c, to keep the current /* This struct is saved by setup_frame in signal.c, to keep the current
context while a signal handler is executed. It's restored by sys_sigreturn. context while a signal handler is executed. It's restored by sys_sigreturn.
To keep things simple, we use pt_regs here even though normally you just
specify the list of regs to save. Then we can use copy_from_user on the
entire regs instead of a bunch of get_user's as well...
*/ */
struct sigcontext { struct sigcontext {
struct pt_regs regs; /* needs to be first */ struct user_regs_struct regs; /* needs to be first */
unsigned long oldmask; unsigned long oldmask;
unsigned long usp; /* usp before stacking this gunk on it */
}; };
#endif /* __ASM_OPENRISC_SIGCONTEXT_H */ #endif /* __ASM_OPENRISC_SIGCONTEXT_H */
...@@ -154,6 +154,33 @@ void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle, ...@@ -154,6 +154,33 @@ void or1k_unmap_page(struct device *dev, dma_addr_t dma_handle,
/* Nothing special to do here... */ /* Nothing special to do here... */
} }
int or1k_map_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
struct scatterlist *s;
int i;
for_each_sg(sg, s, nents, i) {
s->dma_address = or1k_map_page(dev, sg_page(s), s->offset,
s->length, dir, NULL);
}
return nents;
}
void or1k_unmap_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
struct scatterlist *s;
int i;
for_each_sg(sg, s, nents, i) {
or1k_unmap_page(dev, sg_dma_address(s), sg_dma_len(s), dir, NULL);
}
}
void or1k_sync_single_for_cpu(struct device *dev, void or1k_sync_single_for_cpu(struct device *dev,
dma_addr_t dma_handle, size_t size, dma_addr_t dma_handle, size_t size,
enum dma_data_direction dir) enum dma_data_direction dir)
...@@ -187,5 +214,4 @@ static int __init dma_init(void) ...@@ -187,5 +214,4 @@ static int __init dma_init(void)
return 0; return 0;
} }
fs_initcall(dma_init); fs_initcall(dma_init);
...@@ -52,31 +52,25 @@ struct rt_sigframe { ...@@ -52,31 +52,25 @@ struct rt_sigframe {
static int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc) static int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
{ {
unsigned int err = 0; unsigned int err = 0;
unsigned long old_usp;
/* Alwys make any pending restarted system call return -EINTR */ /* Alwys make any pending restarted system call return -EINTR */
current_thread_info()->restart_block.fn = do_no_restart_syscall; current_thread_info()->restart_block.fn = do_no_restart_syscall;
/* restore the regs from &sc->regs (same as sc, since regs is first) /*
* Restore the regs from &sc->regs.
* (sc is already checked for VERIFY_READ since the sigframe was * (sc is already checked for VERIFY_READ since the sigframe was
* checked in sys_sigreturn previously) * checked in sys_sigreturn previously)
*/ */
if (__copy_from_user(regs, sc->regs.gpr, 32 * sizeof(unsigned long)))
if (__copy_from_user(regs, sc, sizeof(struct pt_regs))) goto badframe;
if (__copy_from_user(&regs->pc, &sc->regs.pc, sizeof(unsigned long)))
goto badframe;
if (__copy_from_user(&regs->sr, &sc->regs.sr, sizeof(unsigned long)))
goto badframe; goto badframe;
/* make sure the SM-bit is cleared so user-mode cannot fool us */ /* make sure the SM-bit is cleared so user-mode cannot fool us */
regs->sr &= ~SPR_SR_SM; regs->sr &= ~SPR_SR_SM;
/* restore the old USP as it was before we stacked the sc etc.
* (we cannot just pop the sigcontext since we aligned the sp and
* stuff after pushing it)
*/
err |= __get_user(old_usp, &sc->usp);
regs->sp = old_usp;
/* TODO: the other ports use regs->orig_XX to disable syscall checks /* TODO: the other ports use regs->orig_XX to disable syscall checks
* after this completes, but we don't use that mechanism. maybe we can * after this completes, but we don't use that mechanism. maybe we can
* use it now ? * use it now ?
...@@ -137,18 +131,17 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, ...@@ -137,18 +131,17 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
unsigned long mask) unsigned long mask)
{ {
int err = 0; int err = 0;
unsigned long usp = regs->sp;
/* copy the regs. they are first in sc so we can use sc directly */ /* copy the regs */
err |= __copy_to_user(sc, regs, sizeof(struct pt_regs)); err |= __copy_to_user(sc->regs.gpr, regs, 32 * sizeof(unsigned long));
err |= __copy_to_user(&sc->regs.pc, &regs->pc, sizeof(unsigned long));
err |= __copy_to_user(&sc->regs.sr, &regs->sr, sizeof(unsigned long));
/* then some other stuff */ /* then some other stuff */
err |= __put_user(mask, &sc->oldmask); err |= __put_user(mask, &sc->oldmask);
err |= __put_user(usp, &sc->usp);
return err; return err;
} }
......
...@@ -259,7 +259,7 @@ ...@@ -259,7 +259,7 @@
ENTRY_SAME(ni_syscall) /* query_module */ ENTRY_SAME(ni_syscall) /* query_module */
ENTRY_SAME(poll) ENTRY_SAME(poll)
/* structs contain pointers and an in_addr... */ /* structs contain pointers and an in_addr... */
ENTRY_COMP(nfsservctl) ENTRY_SAME(ni_syscall) /* was nfsservctl */
ENTRY_SAME(setresgid) /* 170 */ ENTRY_SAME(setresgid) /* 170 */
ENTRY_SAME(getresgid) ENTRY_SAME(getresgid)
ENTRY_SAME(prctl) ENTRY_SAME(prctl)
......
...@@ -387,7 +387,7 @@ ...@@ -387,7 +387,7 @@
#size-cells = <1>; #size-cells = <1>;
compatible = "cfi-flash"; compatible = "cfi-flash";
reg = <0x0 0x0 0x02000000>; reg = <0x0 0x0 0x02000000>;
bank-width = <1>; bank-width = <2>;
device-width = <1>; device-width = <1>;
partition@0 { partition@0 {
label = "ramdisk"; label = "ramdisk";
......
...@@ -171,3 +171,4 @@ CONFIG_CRYPTO_SHA256=y ...@@ -171,3 +171,4 @@ CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
...@@ -185,3 +185,4 @@ CONFIG_CRYPTO_SHA256=y ...@@ -185,3 +185,4 @@ CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
...@@ -100,5 +100,8 @@ CONFIG_DEBUG_INFO=y ...@@ -100,5 +100,8 @@ CONFIG_DEBUG_INFO=y
CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_VIRQ_DEBUG=y CONFIG_VIRQ_DEBUG=y
CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
CONFIG_CRYPTO_AES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set # CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_TALITOS=y CONFIG_CRYPTO_DEV_FSL_CAAM=y
...@@ -139,6 +139,7 @@ CONFIG_SND=y ...@@ -139,6 +139,7 @@ CONFIG_SND=y
CONFIG_SND_INTEL8X0=y CONFIG_SND_INTEL8X0=y
# CONFIG_SND_PPC is not set # CONFIG_SND_PPC is not set
# CONFIG_SND_USB is not set # CONFIG_SND_USB is not set
CONFIG_SND_SOC=y
CONFIG_HID_A4TECH=y CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y CONFIG_HID_BELKIN=y
......
...@@ -140,6 +140,7 @@ CONFIG_SND=y ...@@ -140,6 +140,7 @@ CONFIG_SND=y
CONFIG_SND_INTEL8X0=y CONFIG_SND_INTEL8X0=y
# CONFIG_SND_PPC is not set # CONFIG_SND_PPC is not set
# CONFIG_SND_USB is not set # CONFIG_SND_USB is not set
CONFIG_SND_SOC=y
CONFIG_HID_A4TECH=y CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y CONFIG_HID_BELKIN=y
......
...@@ -171,7 +171,7 @@ SYSCALL_SPU(setresuid) ...@@ -171,7 +171,7 @@ SYSCALL_SPU(setresuid)
SYSCALL_SPU(getresuid) SYSCALL_SPU(getresuid)
SYSCALL(ni_syscall) SYSCALL(ni_syscall)
SYSCALL_SPU(poll) SYSCALL_SPU(poll)
COMPAT_SYS(nfsservctl) SYSCALL(ni_syscall)
SYSCALL_SPU(setresgid) SYSCALL_SPU(setresgid)
SYSCALL_SPU(getresgid) SYSCALL_SPU(getresgid)
COMPAT_SYS_SPU(prctl) COMPAT_SYS_SPU(prctl)
......
...@@ -123,7 +123,7 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, ...@@ -123,7 +123,7 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
struct perf_event; struct perf_event;
struct perf_sample_data; struct perf_sample_data;
extern void ptrace_triggered(struct perf_event *bp, int nmi, extern void ptrace_triggered(struct perf_event *bp,
struct perf_sample_data *data, struct pt_regs *regs); struct perf_sample_data *data, struct pt_regs *regs);
#define task_pt_regs(task) \ #define task_pt_regs(task) \
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/serial_sci.h> #include <linux/serial_sci.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/dma-mapping.h>
#include <linux/sh_timer.h> #include <linux/sh_timer.h>
#include <linux/sh_dma.h> #include <linux/sh_dma.h>
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <linux/atomic.h> #include <linux/atomic.h>
#include <asm/smp.h> #include <asm/smp.h>
static void (*pm_idle)(void); void (*pm_idle)(void);
static int hlt_counter; static int hlt_counter;
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册