~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/arm/plat-spear/include/plat/padmux.h

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * arch/arm/plat-spear/include/plat/padmux.h
 
3
 *
 
4
 * SPEAr platform specific gpio pads muxing file
 
5
 *
 
6
 * Copyright (C) 2009 ST Microelectronics
 
7
 * Viresh Kumar<viresh.kumar@st.com>
 
8
 *
 
9
 * This file is licensed under the terms of the GNU General Public
 
10
 * License version 2. This program is licensed "as is" without any
 
11
 * warranty of any kind, whether express or implied.
 
12
 */
 
13
 
 
14
#ifndef __PLAT_PADMUX_H
 
15
#define __PLAT_PADMUX_H
 
16
 
 
17
#include <linux/types.h>
 
18
 
 
19
/*
 
20
 * struct pmx_reg: configuration structure for mode reg and mux reg
 
21
 *
 
22
 * offset: offset of mode reg
 
23
 * mask: mask of mode reg
 
24
 */
 
25
struct pmx_reg {
 
26
        u32 offset;
 
27
        u32 mask;
 
28
};
 
29
 
 
30
/*
 
31
 * struct pmx_dev_mode: configuration structure every group of modes of a device
 
32
 *
 
33
 * ids: all modes for this configuration
 
34
 * mask: mask for supported mode
 
35
 */
 
36
struct pmx_dev_mode {
 
37
        u32 ids;
 
38
        u32 mask;
 
39
};
 
40
 
 
41
/*
 
42
 * struct pmx_mode: mode definition structure
 
43
 *
 
44
 * name: mode name
 
45
 * mask: mode mask
 
46
 */
 
47
struct pmx_mode {
 
48
        char *name;
 
49
        u32 id;
 
50
        u32 mask;
 
51
};
 
52
 
 
53
/*
 
54
 * struct pmx_dev: device definition structure
 
55
 *
 
56
 * name: device name
 
57
 * modes: device configuration array for different modes supported
 
58
 * mode_count: size of modes array
 
59
 * is_active: is peripheral active/enabled
 
60
 * enb_on_reset: if 1, mask bits to be cleared in reg otherwise to be set in reg
 
61
 */
 
62
struct pmx_dev {
 
63
        char *name;
 
64
        struct pmx_dev_mode *modes;
 
65
        u8 mode_count;
 
66
        bool is_active;
 
67
        bool enb_on_reset;
 
68
};
 
69
 
 
70
/*
 
71
 * struct pmx_driver: driver definition structure
 
72
 *
 
73
 * mode: mode to be set
 
74
 * devs: array of pointer to pmx devices
 
75
 * devs_count: ARRAY_SIZE of devs
 
76
 * base: base address of soc config registers
 
77
 * mode_reg: structure of mode config register
 
78
 * mux_reg: structure of device mux config register
 
79
 */
 
80
struct pmx_driver {
 
81
        struct pmx_mode *mode;
 
82
        struct pmx_dev **devs;
 
83
        u8 devs_count;
 
84
        u32 *base;
 
85
        struct pmx_reg mode_reg;
 
86
        struct pmx_reg mux_reg;
 
87
};
 
88
 
 
89
/* pmx functions */
 
90
int pmx_register(struct pmx_driver *driver);
 
91
 
 
92
#endif /* __PLAT_PADMUX_H */