diff options
| author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-01-07 08:52:45 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-07 08:52:45 -0500 |
| commit | a62c80e559809e6c7851ec04d30575e85ad6f6ed (patch) | |
| tree | 7d91fd1f5186ad0d95498f65acfa5a10942133d6 /include/linux/amba | |
| parent | 6351610d6906aacbf9176cbdd045dd3876eec4c0 (diff) | |
[ARM] Move AMBA include files to include/linux/amba/
Since the ARM AMBA bus is used on MIPS as well as ARM, we need
to make the bus available for other architectures to use. Move
the AMBA include files from include/asm-arm/hardware/ to
include/linux/amba/
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/linux/amba')
| -rw-r--r-- | include/linux/amba/bus.h | 55 | ||||
| -rw-r--r-- | include/linux/amba/clcd.h | 271 | ||||
| -rw-r--r-- | include/linux/amba/kmi.h | 92 | ||||
| -rw-r--r-- | include/linux/amba/serial.h | 161 |
4 files changed, 579 insertions, 0 deletions
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h new file mode 100644 index 000000000000..51e6e54b2aa1 --- /dev/null +++ b/include/linux/amba/bus.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/hardware/amba.h | ||
| 3 | * | ||
| 4 | * Copyright (C) 2003 Deep Blue Solutions Ltd, All Rights Reserved. | ||
| 5 | * | ||
| 6 | * This program is free software; you can redistribute it and/or modify | ||
| 7 | * it under the terms of the GNU General Public License version 2 as | ||
| 8 | * published by the Free Software Foundation. | ||
| 9 | */ | ||
| 10 | #ifndef ASMARM_AMBA_H | ||
| 11 | #define ASMARM_AMBA_H | ||
| 12 | |||
| 13 | #define AMBA_NR_IRQS 2 | ||
| 14 | |||
| 15 | struct amba_device { | ||
| 16 | struct device dev; | ||
| 17 | struct resource res; | ||
| 18 | u64 dma_mask; | ||
| 19 | unsigned int periphid; | ||
| 20 | unsigned int irq[AMBA_NR_IRQS]; | ||
| 21 | }; | ||
| 22 | |||
| 23 | struct amba_id { | ||
| 24 | unsigned int id; | ||
| 25 | unsigned int mask; | ||
| 26 | void *data; | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct amba_driver { | ||
| 30 | struct device_driver drv; | ||
| 31 | int (*probe)(struct amba_device *, void *); | ||
| 32 | int (*remove)(struct amba_device *); | ||
| 33 | void (*shutdown)(struct amba_device *); | ||
| 34 | int (*suspend)(struct amba_device *, pm_message_t); | ||
| 35 | int (*resume)(struct amba_device *); | ||
| 36 | struct amba_id *id_table; | ||
| 37 | }; | ||
| 38 | |||
| 39 | #define amba_get_drvdata(d) dev_get_drvdata(&d->dev) | ||
| 40 | #define amba_set_drvdata(d,p) dev_set_drvdata(&d->dev, p) | ||
| 41 | |||
| 42 | int amba_driver_register(struct amba_driver *); | ||
| 43 | void amba_driver_unregister(struct amba_driver *); | ||
| 44 | int amba_device_register(struct amba_device *, struct resource *); | ||
| 45 | void amba_device_unregister(struct amba_device *); | ||
| 46 | struct amba_device *amba_find_device(const char *, struct device *, unsigned int, unsigned int); | ||
| 47 | int amba_request_regions(struct amba_device *, const char *); | ||
| 48 | void amba_release_regions(struct amba_device *); | ||
| 49 | |||
| 50 | #define amba_config(d) (((d)->periphid >> 24) & 0xff) | ||
| 51 | #define amba_rev(d) (((d)->periphid >> 20) & 0x0f) | ||
| 52 | #define amba_manf(d) (((d)->periphid >> 12) & 0xff) | ||
| 53 | #define amba_part(d) ((d)->periphid & 0xfff) | ||
| 54 | |||
| 55 | #endif | ||
diff --git a/include/linux/amba/clcd.h b/include/linux/amba/clcd.h new file mode 100644 index 000000000000..6b8d73dc1ab0 --- /dev/null +++ b/include/linux/amba/clcd.h | |||
| @@ -0,0 +1,271 @@ | |||
| 1 | /* | ||
| 2 | * linux/include/asm-arm/hardware/amba_clcd.h -- Integrator LCD panel. | ||
| 3 | * | ||
| 4 | * David A Rusling | ||
| 5 | * | ||
| 6 | * Copyright (C) 2001 ARM Limited | ||
| 7 | * | ||
| 8 | * This file is subject to the terms and conditions of the GNU General Public | ||
| 9 | * License. See the file COPYING in the main directory of this archive | ||
| 10 | * for more details. | ||
| 11 | */ | ||
| 12 | #include <linux/config.h> | ||
| 13 | #include <linux/fb.h> | ||
| 14 | |||
| 15 | /* | ||
| 16 | * CLCD Controller Internal Register addresses | ||
| 17 | */ | ||
| 18 | #define CLCD_TIM0 0x00000000 | ||
| 19 | #define CLCD_TIM1 0x00000004 | ||
| 20 | #define CLCD_TIM2 0x00000008 | ||
| 21 | #define CLCD_TIM3 0x0000000c | ||
| 22 | #define CLCD_UBAS 0x00000010 | ||
| 23 | #define CLCD_LBAS 0x00000014 | ||
| 24 | |||
| 25 | #if !defined(CONFIG_ARCH_VERSATILE) && !defined(CONFIG_ARCH_REALVIEW) | ||
| 26 | #define CLCD_IENB 0x00000018 | ||
| 27 | #define CLCD_CNTL 0x0000001c | ||
| 28 | #else | ||
| 29 | /* | ||
| 30 | * Someone rearranged these two registers on the Versatile | ||
| 31 | * platform... | ||
| 32 | */ | ||
| 33 | #define CLCD_IENB 0x0000001c | ||
| 34 | #define CLCD_CNTL 0x00000018 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #define CLCD_STAT 0x00000020 | ||
| 38 | #define CLCD_INTR 0x00000024 | ||
| 39 | #define CLCD_UCUR 0x00000028 | ||
| 40 | #define CLCD_LCUR 0x0000002C | ||
| 41 | #define CLCD_PALL 0x00000200 | ||
| 42 | #define CLCD_PALETTE 0x00000200 | ||
| 43 | |||
| 44 | #define TIM2_CLKSEL (1 << 5) | ||
| 45 | #define TIM2_IVS (1 << 11) | ||
| 46 | #define TIM2_IHS (1 << 12) | ||
| 47 | #define TIM2_IPC (1 << 13) | ||
| 48 | #define TIM2_IOE (1 << 14) | ||
| 49 | #define TIM2_BCD (1 << 26) | ||
| 50 | |||
| 51 | #define CNTL_LCDEN (1 << 0) | ||
| 52 | #define CNTL_LCDBPP1 (0 << 1) | ||
| 53 | #define CNTL_LCDBPP2 (1 << 1) | ||
| 54 | #define CNTL_LCDBPP4 (2 << 1) | ||
| 55 | #define CNTL_LCDBPP8 (3 << 1) | ||
| 56 | #define CNTL_LCDBPP16 (4 << 1) | ||
| 57 | #define CNTL_LCDBPP24 (5 << 1) | ||
| 58 | #define CNTL_LCDBW (1 << 4) | ||
| 59 | #define CNTL_LCDTFT (1 << 5) | ||
| 60 | #define CNTL_LCDMONO8 (1 << 6) | ||
| 61 | #define CNTL_LCDDUAL (1 << 7) | ||
| 62 | #define CNTL_BGR (1 << 8) | ||
| 63 | #define CNTL_BEBO (1 << 9) | ||
| 64 | #define CNTL_BEPO (1 << 10) | ||
| 65 | #define CNTL_LCDPWR (1 << 11) | ||
| 66 | #define CNTL_LCDVCOMP(x) ((x) << 12) | ||
| 67 | #define CNTL_LDMAFIFOTIME (1 << 15) | ||
| 68 | #define CNTL_WATERMARK (1 << 16) | ||
| 69 | |||
| 70 | struct clcd_panel { | ||
| 71 | struct fb_videomode mode; | ||
| 72 | signed short width; /* width in mm */ | ||
| 73 | signed short height; /* height in mm */ | ||
| 74 | u32 tim2; | ||
| 75 | u32 tim3; | ||
| 76 | u32 cntl; | ||
| 77 | unsigned int bpp:8, | ||
| 78 | fixedtimings:1, | ||
| 79 | grayscale:1; | ||
| 80 | unsigned int connector; | ||
| 81 | }; | ||
| 82 | |||
| 83 | struct clcd_regs { | ||
| 84 | u32 tim0; | ||
| 85 | u32 tim1; | ||
| 86 | u32 tim2; | ||
| 87 | u32 tim3; | ||
| 88 | u32 cntl; | ||
| 89 | unsigned long pixclock; | ||
| 90 | }; | ||
| 91 | |||
| 92 | struct clcd_fb; | ||
| 93 | |||
| 94 | /* | ||
| 95 | * the board-type specific routines | ||
| 96 | */ | ||
| 97 | struct clcd_board { | ||
| 98 | const char *name; | ||
| 99 | |||
| 100 | /* | ||
| 101 | * Optional. Check whether the var structure is acceptable | ||
| 102 | * for this display. | ||
| 103 | */ | ||
| 104 | int (*check)(struct clcd_fb *fb, struct fb_var_screeninfo *var); | ||
| 105 | |||
| 106 | /* | ||
| 107 | * Compulsary. Decode fb->fb.var into regs->*. In the case of | ||
| 108 | * fixed timing, set regs->* to the register values required. | ||
| 109 | */ | ||
| 110 | void (*decode)(struct clcd_fb *fb, struct clcd_regs *regs); | ||
| 111 | |||
| 112 | /* | ||
| 113 | * Optional. Disable any extra display hardware. | ||
| 114 | */ | ||
| 115 | void (*disable)(struct clcd_fb *); | ||
| 116 | |||
| 117 | /* | ||
| 118 | * Optional. Enable any extra display hardware. | ||
| 119 | */ | ||
| 120 | void (*enable)(struct clcd_fb *); | ||
| 121 | |||
| 122 | /* | ||
| 123 | * Setup platform specific parts of CLCD driver | ||
| 124 | */ | ||
| 125 | int (*setup)(struct clcd_fb *); | ||
| 126 | |||
| 127 | /* | ||
| 128 | * mmap the framebuffer memory | ||
| 129 | */ | ||
| 130 | int (*mmap)(struct clcd_fb *, struct vm_area_struct *); | ||
| 131 | |||
| 132 | /* | ||
| 133 | * Remove platform specific parts of CLCD driver | ||
| 134 | */ | ||
| 135 | void (*remove)(struct clcd_fb *); | ||
