ARM: OMAP4: Ctrl module register define diet
Subsystems (3)
PATCH 1/1 ARM: OMAP4: Ctrl module register define diet
---
Hi,
The mach-omap2 directory contains full register defines for OMAP4 control module but only around 27 of those are used. There are is a total of 1795 register defines in four files with only 27 in use. That is pretty low usefulness ratio...
I guess alot more was used when we had omap4 board files and mach-omap2 contained more drivers but this has now changed.
So I propose we move just what we need to control.h, were other OMAP parts have their minimal set of defines already. Patch has been compile tested and I have also grepped the tree for users outside the mach dir.
Note that patch was created with format-patch -D to keep the size down so it may not apply directly.
regards
Joachim Eastwood
arch/arm/mach-omap2/control.h | 38 +- arch/arm/mach-omap2/ctrl_module_core_44xx.h | 392 ------- arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h | 1409 ----------------------- arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h | 236 ---- arch/arm/mach-omap2/ctrl_module_wkup_44xx.h | 92 -- 5 files changed, 33 insertions(+), 2134 deletions(-) delete mode 100644 arch/arm/mach-omap2/ctrl_module_core_44xx.h delete mode 100644 arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h delete mode 100644 arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h delete mode 100644 arch/arm/mach-omap2/ctrl_module_wkup_44xx.h
arch/arm/mach-omap2/control.h +33 -5
@@ -16,11 +16,6 @@#ifndef __ARCH_ARM_MACH_OMAP2_CONTROL_H#define __ARCH_ARM_MACH_OMAP2_CONTROL_H -#include "ctrl_module_core_44xx.h" -#include "ctrl_module_wkup_44xx.h" -#include "ctrl_module_pad_core_44xx.h" -#include "ctrl_module_pad_wkup_44xx.h" -#include "am33xx.h" #ifndef __ASSEMBLY__
@@ -254,6 +249,39 @@/* TI81XX CONTROL_DEVCONF register offsets */ #define TI81XX_CONTROL_DEVICE_ID (TI81XX_CONTROL_DEVCONF + 0x000) +/* OMAP4 CONTROL MODULE */ +#define OMAP4_CTRL_MODULE_PAD_WKUP 0x4a31e000 +#define OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2 0x0604 +#define OMAP4_CTRL_MODULE_CORE_STATUS 0x02c4 +#define OMAP4_CTRL_MODULE_CORE_STD_FUSE_PROD_ID_1 0x0218 +#define OMAP4_CTRL_MODULE_CORE_DSP_BOOTADDR 0x0304 +#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_DSIPHY 0x0618 +#define OMAP4_CTRL_MODULE_PAD_CORE_CONTROL_CAMERA_RX 0x0608 + +/* OMAP4 CONTROL_DSIPHY */ +#define OMAP4_DSI2_LANEENABLE_SHIFT 29 +#define OMAP4_DSI2_LANEENABLE_MASK (0x7 << 29) +#define OMAP4_DSI1_LANEENABLE_SHIFT 24 +#define OMAP4_DSI1_LANEENABLE_MASK (0x1f << 24) +#define OMAP4_DSI1_PIPD_SHIFT 19 +#define OMAP4_DSI1_PIPD_MASK (0x1f << 19) +#define OMAP4_DSI2_PIPD_SHIFT 14 +#define OMAP4_DSI2_PIPD_MASK (0x1f << 14) + +/* OMAP4 CONTROL_CAMERA_RX */ +#define OMAP4_CAMERARX_CSI21_LANEENABLE_SHIFT 24 +#define OMAP4_CAMERARX_CSI21_LANEENABLE_MASK (0x1f << 24) +#define OMAP4_CAMERARX_CSI22_LANEENABLE_SHIFT 29 +#define OMAP4_CAMERARX_CSI22_LANEENABLE_MASK (0x3 << 29) +#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_SHIFT 21 +#define OMAP4_CAMERARX_CSI22_CTRLCLKEN_MASK (1 << 21) +#define OMAP4_CAMERARX_CSI22_CAMMODE_SHIFT 19 +#define OMAP4_CAMERARX_CSI22_CAMMODE_MASK (0x3 << 19) +#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_SHIFT 18 +#define OMAP4_CAMERARX_CSI21_CTRLCLKEN_MASK (1 << 18) +#define OMAP4_CAMERARX_CSI21_CAMMODE_SHIFT 16 +#define OMAP4_CAMERARX_CSI21_CAMMODE_MASK (0x3 << 16) +/* OMAP54XX CONTROL STATUS register */ #define OMAP5XXX_CONTROL_STATUS 0x134#define OMAP5_DEVICETYPE_MASK (0x7 << 6)
arch/arm/mach-omap2/ctrl_module_core_44xx.h deleted +0 -0
arch/arm/mach-omap2/ctrl_module_pad_core_44xx.h deleted +0 -0
arch/arm/mach-omap2/ctrl_module_pad_wkup_44xx.h deleted +0 -0
arch/arm/mach-omap2/ctrl_module_wkup_44xx.h deleted +0 -0
Signature · 1 line
1.8.0
Tony Lindgren
maintainerQuoted 10 lines · Joachim Eastwood
Signed-off-by Joachim Eastwood <[email protected]>---
Hi,
The mach-omap2 directory contains full register defines for OMAP4 control module but only around 27 of those are used. There are is a total of 1795 register defines in four files with only 27 in use. That is pretty low usefulness ratio...
Quoted 7 lines
I guess alot more was used when we had omap4 board files and mach-omap2 contained more drivers but this has now changed.
So I propose we move just what we need to
control.h, were other OMAP parts have their minimal set of defines already. Patch has been compile tested and I have also grepped the tree for users outside the mach dir.
Yeah great, applying this into omap-for-v3.17/soc finally.
Regards,
Tony