wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 1 | /* |
| 2 | * linux/include/asm-arm/arch-pxa/hardware.h |
| 3 | * |
| 4 | * Author: Nicolas Pitre |
| 5 | * Created: Jun 15, 2001 |
| 6 | * Copyright: MontaVista Software Inc. |
wdenk | 57b2d80 | 2003-06-27 21:31:46 +0000 | [diff] [blame] | 7 | * |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 11 | * |
| 12 | * Note: This file was taken from linux-2.4.19-rmk4-pxa1 |
| 13 | * |
| 14 | * - 2003/01/20 implementation specifics activated |
| 15 | * Robert Schwebel <r.schwebel@pengutronix.de> |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 16 | */ |
| 17 | |
| 18 | #ifndef __ASM_ARCH_HARDWARE_H |
| 19 | #define __ASM_ARCH_HARDWARE_H |
| 20 | |
| 21 | #include <linux/config.h> |
| 22 | #include <asm/mach-types.h> |
| 23 | |
Marek Vasut | 2db1e96 | 2010-09-09 09:50:39 +0200 | [diff] [blame] | 24 | /* |
| 25 | * Define CONFIG_CPU_MONAHANS in case some CPU of the PXA3xx family is selected. |
| 26 | * PXA300/310/320 all have distinct register mappings in some cases, that's why |
| 27 | * the exact CPU has to be selected. CONFIG_CPU_MONAHANS is a helper for common |
| 28 | * drivers and compatibility glue with old source then. |
| 29 | */ |
| 30 | #ifndef CONFIG_CPU_MONAHANS |
| 31 | #if defined(CONFIG_CPU_PXA300) || \ |
| 32 | defined(CONFIG_CPU_PXA310) || \ |
| 33 | defined(CONFIG_CPU_PXA320) |
| 34 | #define CONFIG_CPU_MONAHANS |
| 35 | #endif |
| 36 | #endif |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 37 | |
| 38 | /* |
| 39 | * These are statically mapped PCMCIA IO space for designs using it as a |
| 40 | * generic IO bus, typically with ISA parts, hardwired IDE interfaces, etc. |
| 41 | * The actual PCMCIA code is mapping required IO region at run time. |
| 42 | */ |
| 43 | #define PCMCIA_IO_0_BASE 0xf6000000 |
| 44 | #define PCMCIA_IO_1_BASE 0xf7000000 |
| 45 | |
| 46 | |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 47 | /* |
| 48 | * We requires absolute addresses. |
| 49 | */ |
| 50 | #define PCIO_BASE 0 |
| 51 | |
| 52 | /* |
| 53 | * Workarounds for at least 2 errata so far require this. |
| 54 | * The mapping is set in mach-pxa/generic.c. |
| 55 | */ |
| 56 | #define UNCACHED_PHYS_0 0xff000000 |
| 57 | #define UNCACHED_ADDR UNCACHED_PHYS_0 |
| 58 | |
| 59 | /* |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 60 | * Intel PXA internal I/O mappings: |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 61 | * |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 62 | * 0x40000000 - 0x41ffffff <--> 0xf8000000 - 0xf9ffffff |
| 63 | * 0x44000000 - 0x45ffffff <--> 0xfa000000 - 0xfbffffff |
| 64 | * 0x48000000 - 0x49ffffff <--> 0xfc000000 - 0xfdffffff |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 65 | */ |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 66 | |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 67 | #include "pxa-regs.h" |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 68 | |
| 69 | #ifndef __ASSEMBLY__ |
| 70 | |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 71 | /* |
| 72 | * GPIO edge detection for IRQs: |
| 73 | * IRQs are generated on Falling-Edge, Rising-Edge, or both. |
| 74 | * This must be called *before* the corresponding IRQ is registered. |
| 75 | * Use this instead of directly setting GRER/GFER. |
| 76 | */ |
| 77 | #define GPIO_FALLING_EDGE 1 |
| 78 | #define GPIO_RISING_EDGE 2 |
| 79 | #define GPIO_BOTH_EDGES 3 |
| 80 | extern void set_GPIO_IRQ_edge( int gpio_nr, int edge_mask ); |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 81 | |
| 82 | /* |
| 83 | * Handy routine to set GPIO alternate functions |
| 84 | */ |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 85 | extern void set_GPIO_mode( int gpio_mode ); |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 86 | |
| 87 | /* |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 88 | * return current lclk frequency in units of 10kHz |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 89 | */ |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 90 | extern unsigned int get_lclk_frequency_10khz(void); |
| 91 | |
| 92 | #endif |
| 93 | |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 94 | |
| 95 | /* |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 96 | * Implementation specifics |
wdenk | 1fe2c70 | 2003-03-06 21:55:29 +0000 | [diff] [blame] | 97 | */ |
| 98 | |
| 99 | #ifdef CONFIG_ARCH_LUBBOCK |
| 100 | #include "lubbock.h" |
| 101 | #endif |
| 102 | |
| 103 | #ifdef CONFIG_ARCH_PXA_IDP |
| 104 | #include "idp.h" |
| 105 | #endif |
| 106 | |
| 107 | #ifdef CONFIG_ARCH_PXA_CERF |
| 108 | #include "cerf.h" |
| 109 | #endif |
| 110 | |
| 111 | #ifdef CONFIG_ARCH_CSB226 |
| 112 | #include "csb226.h" |
| 113 | #endif |
| 114 | |
| 115 | #ifdef CONFIG_ARCH_INNOKOM |
| 116 | #include "innokom.h" |
| 117 | #endif |
| 118 | |
wdenk | 6800519 | 2005-01-09 21:28:15 +0000 | [diff] [blame] | 119 | #ifdef CONFIG_ARCH_PLEB |
| 120 | #include "pleb.h" |
| 121 | #endif |
| 122 | |
Markus Klotzbücher | 50d3edf | 2006-02-08 18:56:28 +0100 | [diff] [blame] | 123 | #endif /* _ASM_ARCH_HARDWARE_H */ |