aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mfd/sta2x11-mfd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mfd/sta2x11-mfd.h')
-rw-r--r--include/linux/mfd/sta2x11-mfd.h156
1 files changed, 154 insertions, 2 deletions
diff --git a/include/linux/mfd/sta2x11-mfd.h b/include/linux/mfd/sta2x11-mfd.h
index d179227e866f..4d858797d7e2 100644
--- a/include/linux/mfd/sta2x11-mfd.h
+++ b/include/linux/mfd/sta2x11-mfd.h
@@ -26,6 +26,20 @@
26#include <linux/types.h> 26#include <linux/types.h>
27#include <linux/pci.h> 27#include <linux/pci.h>
28 28
29enum sta2x11_mfd_plat_dev {
30 sta2x11_sctl = 0,
31 sta2x11_gpio,
32 sta2x11_scr,
33 sta2x11_time,
34 sta2x11_apbreg,
35 sta2x11_apb_soc_regs,
36 sta2x11_vic,
37 sta2x11_n_mfd_plat_devs,
38};
39
40extern u32
41__sta2x11_mfd_mask(struct pci_dev *, u32, u32, u32, enum sta2x11_mfd_plat_dev);
42
29/* 43/*
30 * The MFD PCI block includes the GPIO peripherals and other register blocks. 44 * The MFD PCI block includes the GPIO peripherals and other register blocks.
31 * For GPIO, we have 32*4 bits (I use "gsta" for "gpio sta2x11".) 45 * For GPIO, we have 32*4 bits (I use "gsta" for "gpio sta2x11".)
@@ -182,7 +196,11 @@ struct sta2x11_gpio_pdata {
182 * The APB bridge has its own registers, needed by our users as well. 196 * The APB bridge has its own registers, needed by our users as well.
183 * They are accessed with the following read/mask/write function. 197 * They are accessed with the following read/mask/write function.
184 */ 198 */
185u32 sta2x11_apbreg_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val); 199static inline u32
200sta2x11_apbreg_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val)
201{
202 return __sta2x11_mfd_mask(pdev, reg, mask, val, sta2x11_apbreg);
203}
186 204
187/* CAN and MLB */ 205/* CAN and MLB */
188#define APBREG_BSR 0x00 /* Bridge Status Reg */ 206#define APBREG_BSR 0x00 /* Bridge Status Reg */
@@ -211,7 +229,11 @@ u32 sta2x11_apbreg_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val);
211 * The system controller has its own registers. Some of these are accessed 229 * The system controller has its own registers. Some of these are accessed
212 * by out users as well, using the following read/mask/write/function 230 * by out users as well, using the following read/mask/write/function
213 */ 231 */
214u32 sta2x11_sctl_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val); 232static inline
233u32 sta2x11_sctl_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val)
234{
235 return __sta2x11_mfd_mask(pdev, reg, mask, val, sta2x11_sctl);
236}
215 237
216#define SCTL_SCCTL 0x00 /* System controller control register */ 238#define SCTL_SCCTL 0x00 /* System controller control register */
217#define SCTL_ARMCFG 0x04 /* ARM configuration register */ 239#define SCTL_ARMCFG 0x04 /* ARM configuration register */
@@ -321,4 +343,134 @@ u32 sta2x11_sctl_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val);
321#define SCTL_SCPEREN1_I2C3 (1 << 16) 343#define SCTL_SCPEREN1_I2C3 (1 << 16)
322#define SCTL_SCPEREN1_USB_PHY (1 << 17) 344#define SCTL_SCPEREN1_USB_PHY (1 << 17)
323 345
346/*
347 * APB-SOC registers
348 */
349static inline
350u32 sta2x11_apb_soc_regs_mask(struct pci_dev *pdev, u32 reg, u32 mask, u32 val)
351{
352 return __sta2x11_mfd_mask(pdev, reg, mask, val, sta2x11_apb_soc_regs);
353}
354
355#define PCIE_EP1_FUNC3_0_INTR_REG 0x000
356#define PCIE_EP1_FUNC7_4_INTR_REG 0x004
357#define PCIE_EP2_FUNC3_0_INTR_REG 0x008
358#define PCIE_EP2_FUNC7_4_INTR_REG 0x00c
359#define PCIE_EP3_FUNC3_0_INTR_REG 0x010
360#define PCIE_EP3_FUNC7_4_INTR_REG 0x014
361#define PCIE_EP4_FUNC3_0_INTR_REG 0x018
362#define PCIE_EP4_FUNC7_4_INTR_REG 0x01c
363#define PCIE_INTR_ENABLE0_REG 0x020
364#define PCIE_INTR_ENABLE1_REG 0x024
365#define PCIE_EP1_FUNC_TC_REG 0x028
366#define PCIE_EP2_FUNC_TC_REG 0x02c
367#define PCIE_EP3_FUNC_TC_REG 0x030
368#define PCIE_EP4_FUNC_TC_REG 0x034
369#define PCIE_EP1_FUNC_F_REG 0x038
370#define PCIE_EP2_FUNC_F_REG 0x03c
371#define PCIE_EP3_FUNC_F_REG 0x040
372#define PCIE_EP4_FUNC_F_REG 0x044
373#define PCIE_PAB_AMBA_SW_RST_REG 0x048
374#define PCIE_PM_STATUS_0_PORT_0_4 0x04c
375#define PCIE_PM_STATUS_7_0_EP1 0x050
376#define PCIE_PM_STATUS_7_0_EP2 0x054
377#define PCIE_PM_STATUS_7_0_EP3 0x058
378#define PCIE_PM_STATUS_7_0_EP4 0x05c
379#define PCIE_DEV_ID_0_EP1_REG 0x060
380#define PCIE_CC_REV_ID_0_EP1_REG 0x064
381#define PCIE_DEV_ID_1_EP1_REG 0x068
382#define PCIE_CC_REV_ID_1_EP1_REG 0x06c
383#define PCIE_DEV_ID_2_EP1_REG 0x070
384#define PCIE_CC_REV_ID_2_EP1_REG 0x074
385#define PCIE_DEV_ID_3_EP1_REG 0x078
386#define PCIE_CC_REV_ID_3_EP1_REG 0x07c
387#define PCIE_DEV_ID_4_EP1_REG 0x080
388#define PCIE_CC_REV_ID_4_EP1_REG 0x084
389#define PCIE_DEV_ID_5_EP1_REG 0x088
390#define PCIE_CC_REV_ID_5_EP1_REG 0x08c
391#define PCIE_DEV_ID_6_EP1_REG 0x090
392#define PCIE_CC_REV_ID_6_EP1_REG 0x094
393#define PCIE_DEV_ID_7_EP1_REG 0x098
394#define PCIE_CC_REV_ID_7_EP1_REG 0x09c
395#define PCIE_DEV_ID_0_EP2_REG 0x0a0
396#define PCIE_CC_REV_ID_0_EP2_REG 0x0a4
397#define PCIE_DEV_ID_1_EP2_REG 0x0a8
398#define PCIE_CC_REV_ID_1_EP2_REG 0x0ac
399#define PCIE_DEV_ID_2_EP2_REG 0x0b0
400#define PCIE_CC_REV_ID_2_EP2_REG 0x0b4
401#define PCIE_DEV_ID_3_EP2_REG 0x0b8
402#define PCIE_CC_REV_ID_3_EP2_REG 0x0bc
403#define PCIE_DEV_ID_4_EP2_REG 0x0c0
404#define PCIE_CC_REV_ID_4_EP2_REG 0x0c4
405#define PCIE_DEV_ID_5_EP2_REG 0x0c8
406#define PCIE_CC_REV_ID_5_EP2_REG 0x0cc
407#define PCIE_DEV_ID_6_EP2_REG 0x0d0
408#define PCIE_CC_REV_ID_6_EP2_REG 0x0d4
409#define PCIE_DEV_ID_7_EP2_REG 0x0d8
410#define PCIE_CC_REV_ID_7_EP2_REG 0x0dC
411#define PCIE_DEV_ID_0_EP3_REG 0x0e0
412#define PCIE_CC_REV_ID_0_EP3_REG 0x0e4
413#define PCIE_DEV_ID_1_EP3_REG 0x0e8
414#define PCIE_CC_REV_ID_1_EP3_REG 0x0ec
415#define PCIE_DEV_ID_2_EP3_REG 0x0f0
416#define PCIE_CC_REV_ID_2_EP3_REG 0x0f4
417#define PCIE_DEV_ID_3_EP3_REG 0x0f8
418#define PCIE_CC_REV_ID_3_EP3_REG 0x0fc
419#define PCIE_DEV_ID_4_EP3_REG 0x100
420#define PCIE_CC_REV_ID_4_EP3_REG 0x104
421#define PCIE_DEV_ID_5_EP3_REG 0x108
422#define PCIE_CC_REV_ID_5_EP3_REG 0x10c
423#define PCIE_DEV_ID_6_EP3_REG 0x110
424#define PCIE_CC_REV_ID_6_EP3_REG 0x114
425#define PCIE_DEV_ID_7_EP3_REG 0x118
426#define PCIE_CC_REV_ID_7_EP3_REG 0x11c
427#define PCIE_DEV_ID_0_EP4_REG 0x120
428#define PCIE_CC_REV_ID_0_EP4_REG 0x124
429#define PCIE_DEV_ID_1_EP4_REG 0x128
430#define PCIE_CC_REV_ID_1_EP4_REG 0x12c
431#define PCIE_DEV_ID_2_EP4_REG 0x130
432#define PCIE_CC_REV_ID_2_EP4_REG 0x134
433#define PCIE_DEV_ID_3_EP4_REG 0x138
434#define PCIE_CC_REV_ID_3_EP4_REG 0x13c
435#define PCIE_DEV_ID_4_EP4_REG 0x140
436#define PCIE_CC_REV_ID_4_EP4_REG 0x144
437#define PCIE_DEV_ID_5_EP4_REG 0x148
438#define PCIE_CC_REV_ID_5_EP4_REG 0x14c
439#define PCIE_DEV_ID_6_EP4_REG 0x150
440#define PCIE_CC_REV_ID_6_EP4_REG 0x154
441#define PCIE_DEV_ID_7_EP4_REG 0x158
442#define PCIE_CC_REV_ID_7_EP4_REG 0x15c
443#define PCIE_SUBSYS_VEN_ID_REG 0x160
444#define PCIE_COMMON_CLOCK_CONFIG_0_4_0 0x164
445#define PCIE_MIPHYP_SSC_EN_REG 0x168
446#define PCIE_MIPHYP_ADDR_REG 0x16c
447#define PCIE_L1_ASPM_READY_REG 0x170
448#define PCIE_EXT_CFG_RDY_REG 0x174
449#define PCIE_SoC_INT_ROUTER_STATUS0_REG 0x178
450#define PCIE_SoC_INT_ROUTER_STATUS1_REG 0x17c
451#define PCIE_SoC_INT_ROUTER_STATUS2_REG 0x180
452#define PCIE_SoC_INT_ROUTER_STATUS3_REG 0x184
453#define DMA_IP_CTRL_REG 0x324
454#define DISP_BRIDGE_PU_PD_CTRL_REG 0x328
455#define VIP_PU_PD_CTRL_REG 0x32c
456#define USB_MLB_PU_PD_CTRL_REG 0x330
457#define SDIO_PU_PD_MISCFUNC_CTRL_REG1 0x334
458#define SDIO_PU_PD_MISCFUNC_CTRL_REG2 0x338
459#define UART_PU_PD_CTRL_REG 0x33c
460#define ARM_Lock 0x340
461#define SYS_IO_CHAR_REG1 0x344
462#define SYS_IO_CHAR_REG2 0x348
463#define SATA_CORE_ID_REG 0x34c
464#define SATA_CTRL_REG 0x350
465#define I2C_HSFIX_MISC_REG 0x354
466#define SPARE2_RESERVED 0x358
467#define SPARE3_RESERVED 0x35c
468#define MASTER_LOCK_REG 0x368
469#define SYSTEM_CONFIG_STATUS_REG 0x36c
470#define MSP_CLK_CTRL_REG 0x39c
471#define COMPENSATION_REG1 0x3c4
472#define COMPENSATION_REG2 0x3c8
473#define COMPENSATION_REG3 0x3cc
474#define TEST_CTL_REG 0x3d0
475
324#endif /* __STA2X11_MFD_H */ 476#endif /* __STA2X11_MFD_H */