diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 18:29:53 -0500 |
commit | 9ef9dc69d4167276c04590d67ee55de8380bc1ad (patch) | |
tree | f0afd03cd9184eda2fe14c41f09daec79a62682e /include/asm-arm/arch-ixp4xx | |
parent | 2c8296f8cf0ec40867965dddef3dfe92f73b38f4 (diff) | |
parent | 0d899e1b0000ddf78a75d7dcf9a9029d6f7f8091 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (44 commits)
[ARM] 4822/1: RealView: Change the REALVIEW_MPCORE configuration option
[ARM] 4821/1: RealView: Remove the platform dependencies from localtimer.c
[ARM] 4820/1: RealView: Select the timer IRQ at run-time
[ARM] 4819/1: RealView: Fix entry-macro.S to work with multiple platforms
[ARM] 4818/1: RealView: Add core-tile detection
[ARM] 4817/1: RealView: Move the AMBA resource definitions to realview_eb.c
[ARM] 4816/1: RealView: Move the platform-specific definitions into board-eb.h
[ARM] 4815/1: RealView: Add clockevents suport for the local timers
[ARM] 4814/1: RealView: Add broadcasting clockevents support for ARM11MPCore
[ARM] 4813/1: Add SMP helper functions for clockevents support
[ARM] 4812/1: RealView: clockevents support for the RealView platforms
[ARM] 4811/1: RealView: clocksource support for the RealView platforms
[ARM] 4736/1: Export atags to userspace and allow kexec to use customised atags
[ARM] 4798/1: pcm027: fix missing header file
[ARM] 4803/1: pxa: fix building issue of poodle.c caused by patch 4737/1
[ARM] 4801/1: pxa: fix building issues of missing pxa2xx-regs.h
[ARM] pxa: introduce sysdev for pxa3xx static memory controller
[ARM] pxa: add preliminary suspend/resume code for pxa3xx
[ARM] pxa: introduce sysdev for GPIO register saving/restoring
[ARM] pxa: introduce sysdev for IRQ register saving/restoring
...
Diffstat (limited to 'include/asm-arm/arch-ixp4xx')
-rw-r--r-- | include/asm-arm/arch-ixp4xx/cpu.h | 15 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/dsmg600.h | 7 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/hardware.h | 6 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/io.h | 2 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/ixp4xx-regs.h | 36 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/nas100d.h | 18 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/npe.h | 39 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/nslu2.h | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/platform.h | 21 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/qmgr.h | 126 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp4xx/uncompress.h | 2 |
11 files changed, 251 insertions, 42 deletions
diff --git a/include/asm-arm/arch-ixp4xx/cpu.h b/include/asm-arm/arch-ixp4xx/cpu.h index d2523b326c6c..2fa3d6b8dbb8 100644 --- a/include/asm-arm/arch-ixp4xx/cpu.h +++ b/include/asm-arm/arch-ixp4xx/cpu.h | |||
@@ -28,4 +28,19 @@ extern unsigned int processor_id; | |||
28 | #define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \ | 28 | #define cpu_is_ixp46x() ((processor_id & IXP4XX_PROCESSOR_ID_MASK) == \ |
29 | IXP465_PROCESSOR_ID_VALUE) | 29 | IXP465_PROCESSOR_ID_VALUE) |
30 | 30 | ||
31 | static inline u32 ixp4xx_read_feature_bits(void) | ||
32 | { | ||
33 | unsigned int val = ~*IXP4XX_EXP_CFG2; | ||
34 | val &= ~IXP4XX_FEATURE_RESERVED; | ||
35 | if (!cpu_is_ixp46x()) | ||
36 | val &= ~IXP4XX_FEATURE_IXP46X_ONLY; | ||
37 | |||
38 | return val; | ||
39 | } | ||
40 | |||
41 | static inline void ixp4xx_write_feature_bits(u32 value) | ||
42 | { | ||
43 | *IXP4XX_EXP_CFG2 = ~value; | ||
44 | } | ||
45 | |||
31 | #endif /* _ASM_ARCH_CPU_H */ | 46 | #endif /* _ASM_ARCH_CPU_H */ |
diff --git a/include/asm-arm/arch-ixp4xx/dsmg600.h b/include/asm-arm/arch-ixp4xx/dsmg600.h index a19605ad240d..b7673e171abe 100644 --- a/include/asm-arm/arch-ixp4xx/dsmg600.h +++ b/include/asm-arm/arch-ixp4xx/dsmg600.h | |||
@@ -40,18 +40,13 @@ | |||
40 | /* Buttons */ | 40 | /* Buttons */ |
41 | 41 | ||
42 | #define DSMG600_PB_GPIO 15 /* power button */ | 42 | #define DSMG600_PB_GPIO 15 /* power button */ |
43 | #define DSMG600_PB_BM (1L << DSMG600_PB_GPIO) | ||
44 | |||
45 | #define DSMG600_RB_GPIO 3 /* reset button */ | 43 | #define DSMG600_RB_GPIO 3 /* reset button */ |
46 | 44 | ||
47 | #define DSMG600_RB_IRQ IRQ_IXP4XX_GPIO3 | 45 | /* Power control */ |
48 | 46 | ||
49 | #define DSMG600_PO_GPIO 2 /* power off */ | 47 | #define DSMG600_PO_GPIO 2 /* power off */ |
50 | 48 | ||
51 | /* LEDs */ | 49 | /* LEDs */ |
52 | 50 | ||
53 | #define DSMG600_LED_PWR_GPIO 0 | 51 | #define DSMG600_LED_PWR_GPIO 0 |
54 | #define DSMG600_LED_PWR_BM (1L << DSMG600_LED_PWR_GPIO) | ||
55 | |||
56 | #define DSMG600_LED_WLAN_GPIO 14 | 52 | #define DSMG600_LED_WLAN_GPIO 14 |
57 | #define DSMG600_LED_WLAN_BM (1L << DSMG600_LED_WLAN_GPIO) | ||
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h index 297ceda08b61..73e8dc36f6a4 100644 --- a/include/asm-arm/arch-ixp4xx/hardware.h +++ b/include/asm-arm/arch-ixp4xx/hardware.h | |||
@@ -27,13 +27,13 @@ | |||
27 | 27 | ||
28 | #define pcibios_assign_all_busses() 1 | 28 | #define pcibios_assign_all_busses() 1 |
29 | 29 | ||
30 | /* Register locations and bits */ | ||
31 | #include "ixp4xx-regs.h" | ||
32 | |||
30 | #ifndef __ASSEMBLER__ | 33 | #ifndef __ASSEMBLER__ |
31 | #include <asm/arch/cpu.h> | 34 | #include <asm/arch/cpu.h> |
32 | #endif | 35 | #endif |
33 | 36 | ||
34 | /* Register locations and bits */ | ||
35 | #include "ixp4xx-regs.h" | ||
36 | |||
37 | /* Platform helper functions and definitions */ | 37 | /* Platform helper functions and definitions */ |
38 | #include "platform.h" | 38 | #include "platform.h" |
39 | 39 | ||
diff --git a/include/asm-arm/arch-ixp4xx/io.h b/include/asm-arm/arch-ixp4xx/io.h index 9c5d2357aff3..de181ce958db 100644 --- a/include/asm-arm/arch-ixp4xx/io.h +++ b/include/asm-arm/arch-ixp4xx/io.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef __ASM_ARM_ARCH_IO_H | 13 | #ifndef __ASM_ARM_ARCH_IO_H |
14 | #define __ASM_ARM_ARCH_IO_H | 14 | #define __ASM_ARM_ARCH_IO_H |
15 | 15 | ||
16 | #include <linux/bitops.h> | ||
17 | |||
16 | #include <asm/hardware.h> | 18 | #include <asm/hardware.h> |
17 | 19 | ||
18 | #define IO_SPACE_LIMIT 0xffff0000 | 20 | #define IO_SPACE_LIMIT 0xffff0000 |
diff --git a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h index 1205c28a2078..68aca8554f5a 100644 --- a/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h +++ b/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h | |||
@@ -15,10 +15,6 @@ | |||
15 | * | 15 | * |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #ifndef __ASM_ARCH_HARDWARE_H__ | ||
19 | #error "Do not include this directly, instead #include <asm/hardware.h>" | ||
20 | #endif | ||
21 | |||
22 | #ifndef _ASM_ARM_IXP4XX_H_ | 18 | #ifndef _ASM_ARM_IXP4XX_H_ |
23 | #define _ASM_ARM_IXP4XX_H_ | 19 | #define _ASM_ARM_IXP4XX_H_ |
24 | 20 | ||
@@ -607,4 +603,36 @@ | |||
607 | 603 | ||
608 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ | 604 | #define DCMD_LENGTH 0x01fff /* length mask (max = 8K - 1) */ |
609 | 605 | ||
606 | /* "fuse" bits of IXP_EXP_CFG2 */ | ||
607 | #define IXP4XX_FEATURE_RCOMP (1 << 0) | ||
608 | #define IXP4XX_FEATURE_USB_DEVICE (1 << 1) | ||
609 | #define IXP4XX_FEATURE_HASH (1 << 2) | ||
610 | #define IXP4XX_FEATURE_AES (1 << 3) | ||
611 | #define IXP4XX_FEATURE_DES (1 << 4) | ||
612 | #define IXP4XX_FEATURE_HDLC (1 << 5) | ||
613 | #define IXP4XX_FEATURE_AAL (1 << 6) | ||
614 | #define IXP4XX_FEATURE_HSS (1 << 7) | ||
615 | #define IXP4XX_FEATURE_UTOPIA (1 << 8) | ||
616 | #define IXP4XX_FEATURE_NPEB_ETH0 (1 << 9) | ||
617 | #define IXP4XX_FEATURE_NPEC_ETH (1 << 10) | ||
618 | #define IXP4XX_FEATURE_RESET_NPEA (1 << 11) | ||
619 | #define IXP4XX_FEATURE_RESET_NPEB (1 << 12) | ||
620 | #define IXP4XX_FEATURE_RESET_NPEC (1 << 13) | ||
621 | #define IXP4XX_FEATURE_PCI (1 << 14) | ||
622 | #define IXP4XX_FEATURE_ECC_TIMESYNC (1 << 15) | ||
623 | #define IXP4XX_FEATURE_UTOPIA_PHY_LIMIT (3 << 16) | ||
624 | #define IXP4XX_FEATURE_USB_HOST (1 << 18) | ||
625 | #define IXP4XX_FEATURE_NPEA_ETH (1 << 19) | ||
626 | #define IXP4XX_FEATURE_NPEB_ETH_1_TO_3 (1 << 20) | ||
627 | #define IXP4XX_FEATURE_RSA (1 << 21) | ||
628 | #define IXP4XX_FEATURE_XSCALE_MAX_FREQ (3 << 22) | ||
629 | #define IXP4XX_FEATURE_RESERVED (0xFF << 24) | ||
630 | |||
631 | #define IXP4XX_FEATURE_IXP46X_ONLY (IXP4XX_FEATURE_ECC_TIMESYNC | \ | ||
632 | IXP4XX_FEATURE_USB_HOST | \ | ||
633 | IXP4XX_FEATURE_NPEA_ETH | \ | ||
634 | IXP4XX_FEATURE_NPEB_ETH_1_TO_3 | \ | ||
635 | IXP4XX_FEATURE_RSA | \ | ||
636 | IXP4XX_FEATURE_XSCALE_MAX_FREQ) | ||
637 | |||
610 | #endif | 638 | #endif |
diff --git a/include/asm-arm/arch-ixp4xx/nas100d.h b/include/asm-arm/arch-ixp4xx/nas100d.h index 131e0a1d0df3..98d937897bce 100644 --- a/include/asm-arm/arch-ixp4xx/nas100d.h +++ b/include/asm-arm/arch-ixp4xx/nas100d.h | |||
@@ -38,15 +38,15 @@ | |||
38 | 38 | ||
39 | /* Buttons */ | 39 | /* Buttons */ |
40 | 40 | ||
41 | #define NAS100D_PB_GPIO 14 | 41 | #define NAS100D_PB_GPIO 14 /* power button */ |
42 | #define NAS100D_RB_GPIO 4 | 42 | #define NAS100D_RB_GPIO 4 /* reset button */ |
43 | |||
44 | /* Power control */ | ||
45 | |||
43 | #define NAS100D_PO_GPIO 12 /* power off */ | 46 | #define NAS100D_PO_GPIO 12 /* power off */ |
44 | 47 | ||
45 | #define NAS100D_PB_IRQ IRQ_IXP4XX_GPIO14 | 48 | /* LEDs */ |
46 | #define NAS100D_RB_IRQ IRQ_IXP4XX_GPIO4 | ||
47 | 49 | ||
48 | /* | 50 | #define NAS100D_LED_WLAN_GPIO 0 |
49 | #define NAS100D_PB_BM (1L << NAS100D_PB_GPIO) | 51 | #define NAS100D_LED_DISK_GPIO 3 |
50 | #define NAS100D_PO_BM (1L << NAS100D_PO_GPIO) | 52 | #define NAS100D_LED_PWR_GPIO 15 |
51 | #define NAS100D_RB_BM (1L << NAS100D_RB_GPIO) | ||
52 | */ | ||
diff --git a/include/asm-arm/arch-ixp4xx/npe.h b/include/asm-arm/arch-ixp4xx/npe.h new file mode 100644 index 000000000000..37d0511689dc --- /dev/null +++ b/include/asm-arm/arch-ixp4xx/npe.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef __IXP4XX_NPE_H | ||
2 | #define __IXP4XX_NPE_H | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | |||
6 | extern const char *npe_names[]; | ||
7 | |||
8 | struct npe_regs { | ||
9 | u32 exec_addr, exec_data, exec_status_cmd, exec_count; | ||
10 | u32 action_points[4]; | ||
11 | u32 watchpoint_fifo, watch_count; | ||
12 | u32 profile_count; | ||
13 | u32 messaging_status, messaging_control; | ||
14 | u32 mailbox_status, /*messaging_*/ in_out_fifo; | ||
15 | }; | ||
16 | |||
17 | struct npe { | ||
18 | struct resource *mem_res; | ||
19 | struct npe_regs __iomem *regs; | ||
20 | u32 regs_phys; | ||
21 | int id; | ||
22 | int valid; | ||
23 | }; | ||
24 | |||
25 | |||
26 | static inline const char *npe_name(struct npe *npe) | ||
27 | { | ||
28 | return npe_names[npe->id]; | ||
29 | } | ||
30 | |||
31 | int npe_running(struct npe *npe); | ||
32 | int npe_send_message(struct npe *npe, const void *msg, const char *what); | ||
33 | int npe_recv_message(struct npe *npe, void *msg, const char *what); | ||
34 | int npe_send_recv_message(struct npe *npe, void *msg, const char *what); | ||
35 | int npe_load_firmware(struct npe *npe, const char *name, struct device *dev); | ||
36 | struct npe *npe_request(int id); | ||
37 | void npe_release(struct npe *npe); | ||
38 | |||
39 | #endif /* __IXP4XX_NPE_H */ | ||
diff --git a/include/asm-arm/arch-ixp4xx/nslu2.h b/include/asm-arm/arch-ixp4xx/nslu2.h index 850fdc5b45da..714bbc65126a 100644 --- a/include/asm-arm/arch-ixp4xx/nslu2.h +++ b/include/asm-arm/arch-ixp4xx/nslu2.h | |||
@@ -39,34 +39,17 @@ | |||
39 | 39 | ||
40 | /* Buttons */ | 40 | /* Buttons */ |
41 | 41 | ||
42 | #define NSLU2_PB_GPIO 5 | 42 | #define NSLU2_PB_GPIO 5 /* power button */ |
43 | #define NSLU2_PO_GPIO 8 /* power off */ | 43 | #define NSLU2_PO_GPIO 8 /* power off */ |
44 | #define NSLU2_RB_GPIO 12 | 44 | #define NSLU2_RB_GPIO 12 /* reset button */ |
45 | |||
46 | #define NSLU2_PB_IRQ IRQ_IXP4XX_GPIO5 | ||
47 | #define NSLU2_RB_IRQ IRQ_IXP4XX_GPIO12 | ||
48 | |||
49 | #define NSLU2_PB_BM (1L << NSLU2_PB_GPIO) | ||
50 | #define NSLU2_PO_BM (1L << NSLU2_PO_GPIO) | ||
51 | #define NSLU2_RB_BM (1L << NSLU2_RB_GPIO) | ||
52 | 45 | ||
53 | /* Buzzer */ | 46 | /* Buzzer */ |
54 | 47 | ||
55 | #define NSLU2_GPIO_BUZZ 4 | 48 | #define NSLU2_GPIO_BUZZ 4 |
56 | #define NSLU2_BZ_BM (1L << NSLU2_GPIO_BUZZ) | ||
57 | 49 | ||
58 | /* LEDs */ | 50 | /* LEDs */ |
59 | 51 | ||
60 | #define NSLU2_LED_RED_GPIO 0 | 52 | #define NSLU2_LED_RED_GPIO 0 |
61 | #define NSLU2_LED_GRN_GPIO 1 | 53 | #define NSLU2_LED_GRN_GPIO 1 |
62 | |||
63 | #define NSLU2_LED_RED_BM (1L << NSLU2_LED_RED_GPIO) | ||
64 | #define NSLU2_LED_GRN_BM (1L << NSLU2_LED_GRN_GPIO) | ||
65 | |||
66 | #define NSLU2_LED_DISK1_GPIO 3 | 54 | #define NSLU2_LED_DISK1_GPIO 3 |
67 | #define NSLU2_LED_DISK2_GPIO 2 | 55 | #define NSLU2_LED_DISK2_GPIO 2 |
68 | |||
69 | #define NSLU2_LED_DISK1_BM (1L << NSLU2_LED_DISK1_GPIO) | ||
70 | #define NSLU2_LED_DISK2_BM (1L << NSLU2_LED_DISK2_GPIO) | ||
71 | |||
72 | |||
diff --git a/include/asm-arm/arch-ixp4xx/platform.h b/include/asm-arm/arch-ixp4xx/platform.h index 2ce28e3fd325..a1f2b5404db1 100644 --- a/include/asm-arm/arch-ixp4xx/platform.h +++ b/include/asm-arm/arch-ixp4xx/platform.h | |||
@@ -91,6 +91,27 @@ struct ixp4xx_pata_data { | |||
91 | 91 | ||
92 | struct sys_timer; | 92 | struct sys_timer; |
93 | 93 | ||
94 | #define IXP4XX_ETH_NPEA 0x00 | ||
95 | #define IXP4XX_ETH_NPEB 0x10 | ||
96 | #define IXP4XX_ETH_NPEC 0x20 | ||
97 | |||
98 | /* Information about built-in Ethernet MAC interfaces */ | ||
99 | struct eth_plat_info { | ||
100 | u8 phy; /* MII PHY ID, 0 - 31 */ | ||
101 | u8 rxq; /* configurable, currently 0 - 31 only */ | ||
102 | u8 txreadyq; | ||
103 | u8 hwaddr[6]; | ||
104 | }; | ||
105 | |||
106 | /* Information about built-in HSS (synchronous serial) interfaces */ | ||
107 | struct hss_plat_info { | ||
108 | int (*set_clock)(int port, unsigned int clock_type); | ||
109 | int (*open)(int port, void *pdev, | ||
110 | void (*set_carrier_cb)(void *pdev, int carrier)); | ||
111 | void (*close)(int port, void *pdev); | ||
112 | u8 txreadyq; | ||
113 | }; | ||
114 | |||
94 | /* | 115 | /* |
95 | * Frequency of clock used for primary clocksource | 116 | * Frequency of clock used for primary clocksource |
96 | */ | 117 | */ |
diff --git a/include/asm-arm/arch-ixp4xx/qmgr.h b/include/asm-arm/arch-ixp4xx/qmgr.h new file mode 100644 index 000000000000..1e52b95cede5 --- /dev/null +++ b/include/asm-arm/arch-ixp4xx/qmgr.h | |||
@@ -0,0 +1,126 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007 Krzysztof Halasa <khc@pm.waw.pl> | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of version 2 of the GNU General Public License | ||
6 | * as published by the Free Software Foundation. | ||
7 | */ | ||
8 | |||
9 | #ifndef IXP4XX_QMGR_H | ||
10 | #define IXP4XX_QMGR_H | ||
11 | |||
12 | #include <linux/io.h> | ||
13 | #include <linux/kernel.h> | ||
14 | |||
15 | #define HALF_QUEUES 32 | ||
16 | #define QUEUES 64 /* only 32 lower queues currently supported */ | ||
17 | #define MAX_QUEUE_LENGTH 4 /* in dwords */ | ||
18 | |||
19 | #define QUEUE_STAT1_EMPTY 1 /* queue status bits */ | ||
20 | #define QUEUE_STAT1_NEARLY_EMPTY 2 | ||
21 | #define QUEUE_STAT1_NEARLY_FULL 4 | ||
22 | #define QUEUE_STAT1_FULL 8 | ||
23 | #define QUEUE_STAT2_UNDERFLOW 1 | ||
24 | #define QUEUE_STAT2_OVERFLOW 2 | ||
25 | |||
26 | #define QUEUE_WATERMARK_0_ENTRIES 0 | ||
27 | #define QUEUE_WATERMARK_1_ENTRY 1 | ||
28 | #define QUEUE_WATERMARK_2_ENTRIES 2 | ||
29 | #define QUEUE_WATERMARK_4_ENTRIES 3 | ||
30 | #define QUEUE_WATERMARK_8_ENTRIES 4 | ||
31 | #define QUEUE_WATERMARK_16_ENTRIES 5 | ||
32 | #define QUEUE_WATERMARK_32_ENTRIES 6 | ||
33 | #define QUEUE_WATERMARK_64_ENTRIES 7 | ||
34 | |||
35 | /* queue interrupt request conditions */ | ||
36 | #define QUEUE_IRQ_SRC_EMPTY 0 | ||
37 | #define QUEUE_IRQ_SRC_NEARLY_EMPTY 1 | ||
38 | #define QUEUE_IRQ_SRC_NEARLY_FULL 2 | ||
39 | #define QUEUE_IRQ_SRC_FULL 3 | ||
40 | #define QUEUE_IRQ_SRC_NOT_EMPTY 4 | ||
41 | #define QUEUE_IRQ_SRC_NOT_NEARLY_EMPTY 5 | ||
42 | #define QUEUE_IRQ_SRC_NOT_NEARLY_FULL 6 | ||
43 | #define QUEUE_IRQ_SRC_NOT_FULL 7 | ||
44 | |||
45 | struct qmgr_regs { | ||
46 | u32 acc[QUEUES][MAX_QUEUE_LENGTH]; /* 0x000 - 0x3FF */ | ||
47 | u32 stat1[4]; /* 0x400 - 0x40F */ | ||
48 | u32 stat2[2]; /* 0x410 - 0x417 */ | ||
49 | u32 statne_h; /* 0x418 - queue nearly empty */ | ||
50 | u32 statf_h; /* 0x41C - queue full */ | ||
51 | u32 irqsrc[4]; /* 0x420 - 0x42F IRC source */ | ||
52 | u32 irqen[2]; /* 0x430 - 0x437 IRQ enabled */ | ||
53 | u32 irqstat[2]; /* 0x438 - 0x43F - IRQ access only */ | ||
54 | u32 reserved[1776]; | ||
55 | u32 sram[2048]; /* 0x2000 - 0x3FFF - config and buffer */ | ||
56 | }; | ||
57 | |||
58 | void qmgr_set_irq(unsigned int queue, int src, | ||
59 | void (*handler)(void *pdev), void *pdev); | ||
60 | void qmgr_enable_irq(unsigned int queue); | ||
61 | void qmgr_disable_irq(unsigned int queue); | ||
62 | |||
63 | /* request_ and release_queue() must be called from non-IRQ context */ | ||
64 | int qmgr_request_queue(unsigned int queue, unsigned int len /* dwords */, | ||
65 | unsigned int nearly_empty_watermark, | ||
66 | unsigned int nearly_full_watermark); | ||
67 | void qmgr_release_queue(unsigned int queue); | ||
68 | |||
69 | |||
70 | static inline void qmgr_put_entry(unsigned int queue, u32 val) | ||
71 | { | ||
72 | extern struct qmgr_regs __iomem *qmgr_regs; | ||
73 | __raw_writel(val, &qmgr_regs->acc[queue][0]); | ||
74 | } | ||
75 | |||
76 | static inline u32 qmgr_get_entry(unsigned int queue) | ||
77 | { | ||
78 | extern struct qmgr_regs __iomem *qmgr_regs; | ||
79 | return __raw_readl(&qmgr_regs->acc[queue][0]); | ||
80 | } | ||
81 | |||
82 | static inline int qmgr_get_stat1(unsigned int queue) | ||
83 | { | ||
84 | extern struct qmgr_regs __iomem *qmgr_regs; | ||
85 | return (__raw_readl(&qmgr_regs->stat1[queue >> 3]) | ||
86 | >> ((queue & 7) << 2)) & 0xF; | ||
87 | } | ||
88 | |||
89 | static inline int qmgr_get_stat2(unsigned int queue) | ||
90 | { | ||
91 | extern struct qmgr_regs __iomem *qmgr_regs; | ||
92 | return (__raw_readl(&qmgr_regs->stat2[queue >> 4]) | ||
93 | >> ((queue & 0xF) << 1)) & 0x3; | ||
94 | } | ||
95 | |||
96 | static inline int qmgr_stat_empty(unsigned int queue) | ||
97 | { | ||
98 | return !!(qmgr_get_stat1(queue) & QUEUE_STAT1_EMPTY); | ||
99 | } | ||
100 | |||
101 | static inline int qmgr_stat_nearly_empty(unsigned int queue) | ||
102 | { | ||
103 | return !!(qmgr_get_stat1(queue) & QUEUE_STAT1_NEARLY_EMPTY); | ||
104 | } | ||
105 | |||
106 | static inline int qmgr_stat_nearly_full(unsigned int queue) | ||
107 | { | ||
108 | return !!(qmgr_get_stat1(queue) & QUEUE_STAT1_NEARLY_FULL); | ||
109 | } | ||
110 | |||
111 | static inline int qmgr_stat_full(unsigned int queue) | ||
112 | { | ||
113 | return !!(qmgr_get_stat1(queue) & QUEUE_STAT1_FULL); | ||
114 | } | ||
115 | |||
116 | static inline int qmgr_stat_underflow(unsigned int queue) | ||
117 | { | ||
118 | return !!(qmgr_get_stat2(queue) & QUEUE_STAT2_UNDERFLOW); | ||
119 | } | ||
120 | |||
121 | static inline int qmgr_stat_overflow(unsigned int queue) | ||
122 | { | ||
123 | return !!(qmgr_get_stat2(queue) & QUEUE_STAT2_OVERFLOW); | ||
124 | } | ||
125 | |||
126 | #endif | ||
diff --git a/include/asm-arm/arch-ixp4xx/uncompress.h b/include/asm-arm/arch-ixp4xx/uncompress.h index f7a35b78823f..34ef48fe327e 100644 --- a/include/asm-arm/arch-ixp4xx/uncompress.h +++ b/include/asm-arm/arch-ixp4xx/uncompress.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #ifndef _ARCH_UNCOMPRESS_H_ | 13 | #ifndef _ARCH_UNCOMPRESS_H_ |
14 | #define _ARCH_UNCOMPRESS_H_ | 14 | #define _ARCH_UNCOMPRESS_H_ |
15 | 15 | ||
16 | #include <asm/hardware.h> | 16 | #include "ixp4xx-regs.h" |
17 | #include <asm/mach-types.h> | 17 | #include <asm/mach-types.h> |
18 | #include <linux/serial_reg.h> | 18 | #include <linux/serial_reg.h> |
19 | 19 | ||