diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/clk/sunxi.h | 22 | ||||
| -rw-r--r-- | include/linux/irqchip/sunxi.h | 27 | ||||
| -rw-r--r-- | include/linux/irqchip/versatile-fpga.h | 13 | ||||
| -rw-r--r-- | include/linux/platform_data/uio_pruss.h | 3 | ||||
| -rw-r--r-- | include/linux/sh_clk.h | 9 | ||||
| -rw-r--r-- | include/linux/sunxi_timer.h | 24 | ||||
| -rw-r--r-- | include/linux/vexpress.h | 121 |
7 files changed, 218 insertions, 1 deletions
diff --git a/include/linux/clk/sunxi.h b/include/linux/clk/sunxi.h new file mode 100644 index 000000000000..e074fdd5a236 --- /dev/null +++ b/include/linux/clk/sunxi.h | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Maxime Ripard | ||
| 3 | * | ||
| 4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
| 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 as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __LINUX_CLK_SUNXI_H_ | ||
| 18 | #define __LINUX_CLK_SUNXI_H_ | ||
| 19 | |||
| 20 | void __init sunxi_init_clocks(void); | ||
| 21 | |||
| 22 | #endif | ||
diff --git a/include/linux/irqchip/sunxi.h b/include/linux/irqchip/sunxi.h new file mode 100644 index 000000000000..1fe2c2260e2b --- /dev/null +++ b/include/linux/irqchip/sunxi.h | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Maxime Ripard | ||
| 3 | * | ||
| 4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
| 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 as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __LINUX_IRQCHIP_SUNXI_H | ||
| 18 | #define __LINUX_IRQCHIP_SUNXI_H | ||
| 19 | |||
| 20 | #include <asm/exception.h> | ||
| 21 | |||
| 22 | extern void sunxi_init_irq(void); | ||
| 23 | |||
| 24 | extern asmlinkage void __exception_irq_entry sunxi_handle_irq( | ||
| 25 | struct pt_regs *regs); | ||
| 26 | |||
| 27 | #endif | ||
diff --git a/include/linux/irqchip/versatile-fpga.h b/include/linux/irqchip/versatile-fpga.h new file mode 100644 index 000000000000..1fac9651d3ca --- /dev/null +++ b/include/linux/irqchip/versatile-fpga.h | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | #ifndef PLAT_FPGA_IRQ_H | ||
| 2 | #define PLAT_FPGA_IRQ_H | ||
| 3 | |||
| 4 | struct device_node; | ||
| 5 | struct pt_regs; | ||
| 6 | |||
| 7 | void fpga_handle_irq(struct pt_regs *regs); | ||
| 8 | void fpga_irq_init(void __iomem *, const char *, int, int, u32, | ||
| 9 | struct device_node *node); | ||
| 10 | int fpga_irq_of_init(struct device_node *node, | ||
| 11 | struct device_node *parent); | ||
| 12 | |||
| 13 | #endif | ||
diff --git a/include/linux/platform_data/uio_pruss.h b/include/linux/platform_data/uio_pruss.h index f39140aabc6f..3d47d219827f 100644 --- a/include/linux/platform_data/uio_pruss.h +++ b/include/linux/platform_data/uio_pruss.h | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | /* To configure the PRUSS INTC base offset for UIO driver */ | 21 | /* To configure the PRUSS INTC base offset for UIO driver */ |
| 22 | struct uio_pruss_pdata { | 22 | struct uio_pruss_pdata { |
| 23 | u32 pintc_base; | 23 | u32 pintc_base; |
| 24 | struct gen_pool *sram_pool; | ||
| 24 | }; | 25 | }; |
| 25 | #endif /* _UIO_PRUSS_H_ */ | 26 | #endif /* _UIO_PRUSS_H_ */ |
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h index 50910913b268..60c72395ec6b 100644 --- a/include/linux/sh_clk.h +++ b/include/linux/sh_clk.h | |||
| @@ -199,4 +199,13 @@ int sh_clk_div6_reparent_register(struct clk *clks, int nr); | |||
| 199 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } | 199 | #define CLKDEV_DEV_ID(_id, _clk) { .dev_id = _id, .clk = _clk } |
| 200 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } | 200 | #define CLKDEV_ICK_ID(_cid, _did, _clk) { .con_id = _cid, .dev_id = _did, .clk = _clk } |
| 201 | 201 | ||
| 202 | /* .enable_reg will be updated to .mapping on sh_clk_fsidiv_register() */ | ||
| 203 | #define SH_CLK_FSIDIV(_reg, _parent) \ | ||
| 204 | { \ | ||
| 205 | .enable_reg = (void __iomem *)_reg, \ | ||
| 206 | .parent = _parent, \ | ||
| 207 | } | ||
| 208 | |||
| 209 | int sh_clk_fsidiv_register(struct clk *clks, int nr); | ||
| 210 | |||
| 202 | #endif /* __SH_CLOCK_H */ | 211 | #endif /* __SH_CLOCK_H */ |
diff --git a/include/linux/sunxi_timer.h b/include/linux/sunxi_timer.h new file mode 100644 index 000000000000..b9165bba6e61 --- /dev/null +++ b/include/linux/sunxi_timer.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Copyright 2012 Maxime Ripard | ||
| 3 | * | ||
| 4 | * Maxime Ripard <maxime.ripard@free-electrons.com> | ||
| 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 as published by | ||
| 8 | * the Free Software Foundation; either version 2 of the License, or | ||
| 9 | * (at your option) any later version. | ||
| 10 | * | ||
| 11 | * This program is distributed in the hope that it will be useful, | ||
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | * GNU General Public License for more details. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef __SUNXI_TIMER_H | ||
| 18 | #define __SUNXI_TIMER_H | ||
| 19 | |||
| 20 | #include <asm/mach/time.h> | ||
| 21 | |||
| 22 | extern struct sys_timer sunxi_timer; | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/include/linux/vexpress.h b/include/linux/vexpress.h new file mode 100644 index 000000000000..c52215ff4245 --- /dev/null +++ b/include/linux/vexpress.h | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* | ||
| 2 | * This program is free software; you can redistribute it and/or modify | ||
| 3 | * it under the terms of the GNU General Public License version 2 as | ||
| 4 | * published by the Free Software Foundation. | ||
| 5 | * | ||
| 6 | * This program is distributed in the hope that it will be useful, | ||
| 7 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 8 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 9 | * GNU General Public License for more details. | ||
| 10 | * | ||
| 11 | * Copyright (C) 2012 ARM Limited | ||
| 12 | */ | ||
| 13 | |||
| 14 | #ifndef _LINUX_VEXPRESS_H | ||
| 15 | #define _LINUX_VEXPRESS_H | ||
| 16 | |||
| 17 | #include <linux/device.h> | ||
| 18 | |||
| 19 | #define VEXPRESS_SITE_MB 0 | ||
| 20 | #define VEXPRESS_SITE_DB1 1 | ||
| 21 | #define VEXPRESS_SITE_DB2 2 | ||
| 22 | #define VEXPRESS_SITE_MASTER 0xf | ||
| 23 | |||
| 24 | #define VEXPRESS_CONFIG_STATUS_DONE 0 | ||
| 25 | #define VEXPRESS_CONFIG_STATUS_WAIT 1 | ||
| 26 | |||
| 27 | #define VEXPRESS_GPIO_MMC_CARDIN 0 | ||
| 28 | #define VEXPRESS_GPIO_MMC_WPROT 1 | ||
| 29 | #define VEXPRESS_GPIO_FLASH_WPn 2 | ||
| 30 | |||
| 31 | #define VEXPRESS_RES_FUNC(_site, _func) \ | ||
| 32 | { \ | ||
| 33 | .start = (_site), \ | ||
| 34 | .end = (_func), \ | ||
| 35 | .flags = IORESOURCE_BUS, \ | ||
| 36 | } | ||
| 37 | |||
| 38 | /* Config bridge API */ | ||
| 39 | |||
| 40 | /** | ||
| 41 | * struct vexpress_config_bridge_info - description of the platform | ||
| 42 | * configuration infrastructure bridge. | ||
| 43 | * | ||
| 44 | * @name: Bridge name | ||
| 45 | * | ||
| 46 | * @func_get: Obtains pointer to a configuration function for a given | ||
| 47 | * device or a Device Tree node, to be used with @func_put | ||
| 48 | * and @func_exec. The node pointer should take precedence | ||
| 49 | * over device pointer when both are passed. | ||
| 50 | * | ||
| 51 | * @func_put: Tells the bridge that the function will not be used any | ||
| 52 | * more, so all allocated resources can be released. | ||
| 53 | * | ||
| 54 | * @func_exec: Executes a configuration function read or write operation. | ||
| 55 | * The offset selects a 32 bit word of the value accessed. | ||
| 56 | * Must return VEXPRESS_CONFIG_STATUS_DONE when operation | ||
| 57 | * is finished immediately, VEXPRESS_CONFIG_STATUS_WAIT when | ||
| 58 | * will be completed in some time or negative value in case | ||
| 59 | * of error. | ||
| 60 | */ | ||
| 61 | struct vexpress_config_bridge_info { | ||
| 62 | const char *name; | ||
| 63 | void *(*func_get)(struct device *dev, struct device_node *node); | ||
| 64 | void (*func_put)(void *func); | ||
| 65 | int (*func_exec)(void *func, int offset, bool write, u32 *data); | ||
| 66 | }; | ||
| 67 | |||
| 68 | struct vexpress_config_bridge; | ||
| 69 | |||
| 70 | struct vexpress_config_bridge *vexpress_config_bridge_register( | ||
| 71 | struct device_node *node, | ||
| 72 | struct vexpress_config_bridge_info *info); | ||
| 73 | void vexpress_config_bridge_unregister(struct vexpress_config_bridge *bridge); | ||
| 74 | |||
| 75 | void vexpress_config_complete(struct vexpress_config_bridge *bridge, | ||
| 76 | int status); | ||
| 77 | |||
| 78 | /* Config function API */ | ||
| 79 | |||
| 80 | struct vexpress_config_func; | ||
| 81 | |||
| 82 | struct vexpress_config_func *__vexpress_config_func_get(struct device *dev, | ||
| 83 | struct device_node *node); | ||
| 84 | #define vexpress_config_func_get_by_dev(dev) \ | ||
| 85 | __vexpress_config_func_get(dev, NULL) | ||
| 86 | #define vexpress_config_func_get_by_node(node) \ | ||
| 87 | __vexpress_config_func_get(NULL, node) | ||
| 88 | void vexpress_config_func_put(struct vexpress_config_func *func); | ||
| 89 | |||
| 90 | /* Both may sleep! */ | ||
| 91 | int vexpress_config_read(struct vexpress_config_func *func, int offset, | ||
| 92 | u32 *data); | ||
| 93 | int vexpress_config_write(struct vexpress_config_func *func, int offset, | ||
| 94 | u32 data); | ||
| 95 | |||
| 96 | /* Platform control */ | ||
| 97 | |||
| 98 | u32 vexpress_get_procid(int site); | ||
| 99 | u32 vexpress_get_hbi(int site); | ||
| 100 | void *vexpress_get_24mhz_clock_base(void); | ||
| 101 | void vexpress_flags_set(u32 data); | ||
| 102 | |||
| 103 | #define vexpress_get_site_by_node(node) __vexpress_get_site(NULL, node) | ||
| 104 | #define vexpress_get_site_by_dev(dev) __vexpress_get_site(dev, NULL) | ||
| 105 | unsigned __vexpress_get_site(struct device *dev, struct device_node *node); | ||
| 106 | |||
| 107 | void vexpress_sysreg_early_init(void __iomem *base); | ||
| 108 | void vexpress_sysreg_of_early_init(void); | ||
| 109 | |||
| 110 | void vexpress_power_off(void); | ||
| 111 | void vexpress_restart(char str, const char *cmd); | ||
| 112 | |||
| 113 | /* Clocks */ | ||
| 114 | |||
| 115 | struct clk *vexpress_osc_setup(struct device *dev); | ||
| 116 | void vexpress_osc_of_setup(struct device_node *node); | ||
| 117 | |||
| 118 | void vexpress_clk_init(void __iomem *sp810_base); | ||
| 119 | void vexpress_clk_of_init(void); | ||
| 120 | |||
| 121 | #endif | ||
