diff options
483 files changed, 7127 insertions, 4083 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt index 5d2480d33b43..ecad6ee75705 100644 --- a/Documentation/block/biodoc.txt +++ b/Documentation/block/biodoc.txt | |||
@@ -954,14 +954,14 @@ elevator_allow_merge_fn called whenever the block layer determines | |||
954 | results in some sort of conflict internally, | 954 | results in some sort of conflict internally, |
955 | this hook allows it to do that. | 955 | this hook allows it to do that. |
956 | 956 | ||
957 | elevator_dispatch_fn fills the dispatch queue with ready requests. | 957 | elevator_dispatch_fn* fills the dispatch queue with ready requests. |
958 | I/O schedulers are free to postpone requests by | 958 | I/O schedulers are free to postpone requests by |
959 | not filling the dispatch queue unless @force | 959 | not filling the dispatch queue unless @force |
960 | is non-zero. Once dispatched, I/O schedulers | 960 | is non-zero. Once dispatched, I/O schedulers |
961 | are not allowed to manipulate the requests - | 961 | are not allowed to manipulate the requests - |
962 | they belong to generic dispatch queue. | 962 | they belong to generic dispatch queue. |
963 | 963 | ||
964 | elevator_add_req_fn called to add a new request into the scheduler | 964 | elevator_add_req_fn* called to add a new request into the scheduler |
965 | 965 | ||
966 | elevator_queue_empty_fn returns true if the merge queue is empty. | 966 | elevator_queue_empty_fn returns true if the merge queue is empty. |
967 | Drivers shouldn't use this, but rather check | 967 | Drivers shouldn't use this, but rather check |
@@ -991,7 +991,7 @@ elevator_activate_req_fn Called when device driver first sees a request. | |||
991 | elevator_deactivate_req_fn Called when device driver decides to delay | 991 | elevator_deactivate_req_fn Called when device driver decides to delay |
992 | a request by requeueing it. | 992 | a request by requeueing it. |
993 | 993 | ||
994 | elevator_init_fn | 994 | elevator_init_fn* |
995 | elevator_exit_fn Allocate and free any elevator specific storage | 995 | elevator_exit_fn Allocate and free any elevator specific storage |
996 | for a queue. | 996 | for a queue. |
997 | 997 | ||
diff --git a/Documentation/block/queue-sysfs.txt b/Documentation/block/queue-sysfs.txt new file mode 100644 index 000000000000..e164403f60e1 --- /dev/null +++ b/Documentation/block/queue-sysfs.txt | |||
@@ -0,0 +1,63 @@ | |||
1 | Queue sysfs files | ||
2 | ================= | ||
3 | |||
4 | This text file will detail the queue files that are located in the sysfs tree | ||
5 | for each block device. Note that stacked devices typically do not export | ||
6 | any settings, since their queue merely functions are a remapping target. | ||
7 | These files are the ones found in the /sys/block/xxx/queue/ directory. | ||
8 | |||
9 | Files denoted with a RO postfix are readonly and the RW postfix means | ||
10 | read-write. | ||
11 | |||
12 | hw_sector_size (RO) | ||
13 | ------------------- | ||
14 | This is the hardware sector size of the device, in bytes. | ||
15 | |||
16 | max_hw_sectors_kb (RO) | ||
17 | ---------------------- | ||
18 | This is the maximum number of kilobytes supported in a single data transfer. | ||
19 | |||
20 | max_sectors_kb (RW) | ||
21 | ------------------- | ||
22 | This is the maximum number of kilobytes that the block layer will allow | ||
23 | for a filesystem request. Must be smaller than or equal to the maximum | ||
24 | size allowed by the hardware. | ||
25 | |||
26 | nomerges (RW) | ||
27 | ------------- | ||
28 | This enables the user to disable the lookup logic involved with IO merging | ||
29 | requests in the block layer. Merging may still occur through a direct | ||
30 | 1-hit cache, since that comes for (almost) free. The IO scheduler will not | ||
31 | waste cycles doing tree/hash lookups for merges if nomerges is 1. Defaults | ||
32 | to 0, enabling all merges. | ||
33 | |||
34 | nr_requests (RW) | ||
35 | ---------------- | ||
36 | This controls how many requests may be allocated in the block layer for | ||
37 | read or write requests. Note that the total allocated number may be twice | ||
38 | this amount, since it applies only to reads or writes (not the accumulated | ||
39 | sum). | ||
40 | |||
41 | read_ahead_kb (RW) | ||
42 | ------------------ | ||
43 | Maximum number of kilobytes to read-ahead for filesystems on this block | ||
44 | device. | ||
45 | |||
46 | rq_affinity (RW) | ||
47 | ---------------- | ||
48 | If this option is enabled, the block layer will migrate request completions | ||
49 | to the CPU that originally submitted the request. For some workloads | ||
50 | this provides a significant reduction in CPU cycles due to caching effects. | ||
51 | |||
52 | scheduler (RW) | ||
53 | -------------- | ||
54 | When read, this file will display the current and available IO schedulers | ||
55 | for this block device. The currently active IO scheduler will be enclosed | ||
56 | in [] brackets. Writing an IO scheduler name to this file will switch | ||
57 | control of this block device to that new IO scheduler. Note that writing | ||
58 | an IO scheduler name to this file will attempt to load that IO scheduler | ||
59 | module, if it isn't already present in the system. | ||
60 | |||
61 | |||
62 | |||
63 | Jens Axboe <jens.axboe@oracle.com>, February 2009 | ||
diff --git a/Documentation/filesystems/ubifs.txt b/Documentation/filesystems/ubifs.txt index 84da2a4ba25a..12fedb7834c6 100644 --- a/Documentation/filesystems/ubifs.txt +++ b/Documentation/filesystems/ubifs.txt | |||
@@ -79,13 +79,6 @@ Mount options | |||
79 | 79 | ||
80 | (*) == default. | 80 | (*) == default. |
81 | 81 | ||
82 | norm_unmount (*) commit on unmount; the journal is committed | ||
83 | when the file-system is unmounted so that the | ||
84 | next mount does not have to replay the journal | ||
85 | and it becomes very fast; | ||
86 | fast_unmount do not commit on unmount; this option makes | ||
87 | unmount faster, but the next mount slower | ||
88 | because of the need to replay the journal. | ||
89 | bulk_read read more in one go to take advantage of flash | 82 | bulk_read read more in one go to take advantage of flash |
90 | media that read faster sequentially | 83 | media that read faster sequentially |
91 | no_bulk_read (*) do not bulk-read | 84 | no_bulk_read (*) do not bulk-read |
diff --git a/Documentation/networking/alias.txt b/Documentation/networking/alias.txt index cd12c2ff518a..85046f53fcfc 100644 --- a/Documentation/networking/alias.txt +++ b/Documentation/networking/alias.txt | |||
@@ -2,13 +2,13 @@ | |||
2 | IP-Aliasing: | 2 | IP-Aliasing: |
3 | ============ | 3 | ============ |
4 | 4 | ||
5 | IP-aliases are additional IP-addresses/masks hooked up to a base | 5 | IP-aliases are an obsolete way to manage multiple IP-addresses/masks |
6 | interface by adding a colon and a string when running ifconfig. | 6 | per interface. Newer tools such as iproute2 support multiple |
7 | This string is usually numeric, but this is not a must. | 7 | address/prefixes per interface, but aliases are still supported |
8 | 8 | for backwards compatibility. | |
9 | IP-Aliases are avail if CONFIG_INET (`standard' IPv4 networking) | ||
10 | is configured in the kernel. | ||
11 | 9 | ||
10 | An alias is formed by adding a colon and a string when running ifconfig. | ||
11 | This string is usually numeric, but this is not a must. | ||
12 | 12 | ||
13 | o Alias creation. | 13 | o Alias creation. |
14 | Alias creation is done by 'magic' interface naming: eg. to create a | 14 | Alias creation is done by 'magic' interface naming: eg. to create a |
@@ -38,16 +38,3 @@ o Relationship with main device | |||
38 | 38 | ||
39 | If the base device is shut down the added aliases will be deleted | 39 | If the base device is shut down the added aliases will be deleted |
40 | too. | 40 | too. |
41 | |||
42 | |||
43 | Contact | ||
44 | ------- | ||
45 | Please finger or e-mail me: | ||
46 | Juan Jose Ciarlante <jjciarla@raiz.uncu.edu.ar> | ||
47 | |||
48 | Updated by Erik Schoenfelder <schoenfr@gaertner.DE> | ||
49 | |||
50 | ; local variables: | ||
51 | ; mode: indented-text | ||
52 | ; mode: auto-fill | ||
53 | ; end: | ||
diff --git a/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt new file mode 100644 index 000000000000..8447fd7090d0 --- /dev/null +++ b/Documentation/powerpc/dts-bindings/fsl/mpc5200.txt | |||
@@ -0,0 +1,180 @@ | |||
1 | MPC5200 Device Tree Bindings | ||
2 | ---------------------------- | ||
3 | |||
4 | (c) 2006-2009 Secret Lab Technologies Ltd | ||
5 | Grant Likely <grant.likely@secretlab.ca> | ||
6 | |||
7 | Naming conventions | ||
8 | ------------------ | ||
9 | For mpc5200 on-chip devices, the format for each compatible value is | ||
10 | <chip>-<device>[-<mode>]. The OS should be able to match a device driver | ||
11 | to the device based solely on the compatible value. If two drivers | ||
12 | match on the compatible list; the 'most compatible' driver should be | ||
13 | selected. | ||
14 | |||
15 | The split between the MPC5200 and the MPC5200B leaves a bit of a | ||
16 | conundrum. How should the compatible property be set up to provide | ||
17 | maximum compatibility information; but still accurately describe the | ||
18 | chip? For the MPC5200; the answer is easy. Most of the SoC devices | ||
19 | originally appeared on the MPC5200. Since they didn't exist anywhere | ||
20 | else; the 5200 compatible properties will contain only one item; | ||
21 | "fsl,mpc5200-<device>". | ||
22 | |||
23 | The 5200B is almost the same as the 5200, but not quite. It fixes | ||
24 | silicon bugs and it adds a small number of enhancements. Most of the | ||
25 | devices either provide exactly the same interface as on the 5200. A few | ||
26 | devices have extra functions but still have a backwards compatible mode. | ||
27 | To express this information as completely as possible, 5200B device trees | ||
28 | should have two items in the compatible list: | ||
29 | compatible = "fsl,mpc5200b-<device>","fsl,mpc5200-<device>"; | ||
30 | |||
31 | It is *strongly* recommended that 5200B device trees follow this convention | ||
32 | (instead of only listing the base mpc5200 item). | ||
33 | |||
34 | ie. ethernet on mpc5200: compatible = "fsl,mpc5200-fec"; | ||
35 | ethernet on mpc5200b: compatible = "fsl,mpc5200b-fec", "fsl,mpc5200-fec"; | ||
36 | |||
37 | Modal devices, like PSCs, also append the configured function to the | ||
38 | end of the compatible field. ie. A PSC in i2s mode would specify | ||
39 | "fsl,mpc5200-psc-i2s", not "fsl,mpc5200-i2s". This convention is chosen to | ||
40 | avoid naming conflicts with non-psc devices providing the same | ||
41 | function. For example, "fsl,mpc5200-spi" and "fsl,mpc5200-psc-spi" describe | ||
42 | the mpc5200 simple spi device and a PSC spi mode respectively. | ||
43 | |||
44 | At the time of writing, exact chip may be either 'fsl,mpc5200' or | ||
45 | 'fsl,mpc5200b'. | ||
46 | |||
47 | The soc node | ||
48 | ------------ | ||
49 | This node describes the on chip SOC peripherals. Every mpc5200 based | ||
50 | board will have this node, and as such there is a common naming | ||
51 | convention for SOC devices. | ||
52 | |||
53 | Required properties: | ||
54 | name description | ||
55 | ---- ----------- | ||
56 | ranges Memory range of the internal memory mapped registers. | ||
57 | Should be <0 [baseaddr] 0xc000> | ||
58 | reg Should be <[baseaddr] 0x100> | ||
59 | compatible mpc5200: "fsl,mpc5200-immr" | ||
60 | mpc5200b: "fsl,mpc5200b-immr" | ||
61 | system-frequency 'fsystem' frequency in Hz; XLB, IPB, USB and PCI | ||
62 | clocks are derived from the fsystem clock. | ||
63 | bus-frequency IPB bus frequency in Hz. Clock rate | ||
64 | used by most of the soc devices. | ||
65 | |||
66 | soc child nodes | ||
67 | --------------- | ||
68 | Any on chip SOC devices available to Linux must appear as soc5200 child nodes. | ||
69 | |||
70 | Note: The tables below show the value for the mpc5200. A mpc5200b device | ||
71 | tree should use the "fsl,mpc5200b-<device>","fsl,mpc5200-<device>" form. | ||
72 | |||
73 | Required soc5200 child nodes: | ||
74 | name compatible Description | ||
75 | ---- ---------- ----------- | ||
76 | cdm@<addr> fsl,mpc5200-cdm Clock Distribution | ||
77 | interrupt-controller@<addr> fsl,mpc5200-pic need an interrupt | ||
78 | controller to boot | ||
79 | bestcomm@<addr> fsl,mpc5200-bestcomm Bestcomm DMA controller | ||
80 | |||
81 | Recommended soc5200 child nodes; populate as needed for your board | ||
82 | name compatible Description | ||
83 | ---- ---------- ----------- | ||
84 | timer@<addr> fsl,mpc5200-gpt General purpose timers | ||
85 | gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio controller | ||
86 | gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio controller | ||
87 | rtc@<addr> fsl,mpc5200-rtc Real time clock | ||
88 | mscan@<addr> fsl,mpc5200-mscan CAN bus controller | ||
89 | pci@<addr> fsl,mpc5200-pci PCI bridge | ||
90 | serial@<addr> fsl,mpc5200-psc-uart PSC in serial mode | ||
91 | i2s@<addr> fsl,mpc5200-psc-i2s PSC in i2s mode | ||
92 | ac97@<addr> fsl,mpc5200-psc-ac97 PSC in ac97 mode | ||
93 | spi@<addr> fsl,mpc5200-psc-spi PSC in spi mode | ||
94 | irda@<addr> fsl,mpc5200-psc-irda PSC in IrDA mode | ||
95 | spi@<addr> fsl,mpc5200-spi MPC5200 spi device | ||
96 | ethernet@<addr> fsl,mpc5200-fec MPC5200 ethernet device | ||
97 | ata@<addr> fsl,mpc5200-ata IDE ATA interface | ||
98 | i2c@<addr> fsl,mpc5200-i2c I2C controller | ||
99 | usb@<addr> fsl,mpc5200-ohci,ohci-be USB controller | ||
100 | xlb@<addr> fsl,mpc5200-xlb XLB arbitrator | ||
101 | |||
102 | fsl,mpc5200-gpt nodes | ||
103 | --------------------- | ||
104 | On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board | ||
105 | design supports the internal wdt, then the device node for GPT0 should | ||
106 | include the empty property 'fsl,has-wdt'. | ||
107 | |||
108 | An mpc5200-gpt can be used as a single line GPIO controller. To do so, | ||
109 | add the following properties to the gpt node: | ||
110 | gpio-controller; | ||
111 | #gpio-cells = <2>; | ||
112 | When referencing the GPIO line from another node, the first cell must always | ||
113 | be zero and the second cell represents the gpio flags and described in the | ||
114 | gpio device tree binding. | ||
115 | |||
116 | An mpc5200-gpt can be used as a single line edge sensitive interrupt | ||
117 | controller. To do so, add the following properties to the gpt node: | ||
118 | interrupt-controller; | ||
119 | #interrupt-cells = <1>; | ||
120 | When referencing the IRQ line from another node, the cell represents the | ||
121 | sense mode; 1 for edge rising, 2 for edge falling. | ||
122 | |||
123 | fsl,mpc5200-psc nodes | ||
124 | --------------------- | ||
125 | The PSCs should include a cell-index which is the index of the PSC in | ||
126 | hardware. cell-index is used to determine which shared SoC registers to | ||
127 | use when setting up PSC clocking. cell-index number starts at '0'. ie: | ||
128 | PSC1 has 'cell-index = <0>' | ||
129 | PSC4 has 'cell-index = <3>' | ||
130 | |||
131 | PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in | ||
132 | i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the | ||
133 | compatible field. | ||
134 | |||
135 | |||
136 | fsl,mpc5200-gpio and fsl,mpc5200-gpio-wkup nodes | ||
137 | ------------------------------------------------ | ||
138 | Each GPIO controller node should have the empty property gpio-controller and | ||
139 | #gpio-cells set to 2. First cell is the GPIO number which is interpreted | ||
140 | according to the bit numbers in the GPIO control registers. The second cell | ||
141 | is for flags which is currently unused. | ||
142 | |||
143 | fsl,mpc5200-fec nodes | ||
144 | --------------------- | ||
145 | The FEC node can specify one of the following properties to configure | ||
146 | the MII link: | ||
147 | - fsl,7-wire-mode - An empty property that specifies the link uses 7-wire | ||
148 | mode instead of MII | ||
149 | - current-speed - Specifies that the MII should be configured for a fixed | ||
150 | speed. This property should contain two cells. The | ||
151 | first cell specifies the speed in Mbps and the second | ||
152 | should be '0' for half duplex and '1' for full duplex | ||
153 | - phy-handle - Contains a phandle to an Ethernet PHY. | ||
154 | |||
155 | Interrupt controller (fsl,mpc5200-pic) node | ||
156 | ------------------------------------------- | ||
157 | The mpc5200 pic binding splits hardware IRQ numbers into two levels. The | ||
158 | split reflects the layout of the PIC hardware itself, which groups | ||
159 | interrupts into one of three groups; CRIT, MAIN or PERP. Also, the | ||
160 | Bestcomm dma engine has it's own set of interrupt sources which are | ||
161 | cascaded off of peripheral interrupt 0, which the driver interprets as a | ||
162 | fourth group, SDMA. | ||
163 | |||
164 | The interrupts property for device nodes using the mpc5200 pic consists | ||
165 | of three cells; <L1 L2 level> | ||
166 | |||
167 | L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3] | ||
168 | L2 := interrupt number; directly mapped from the value in the | ||
169 | "ICTL PerStat, MainStat, CritStat Encoded Register" | ||
170 | level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3] | ||
171 | |||
172 | For external IRQs, use the following interrupt property values (how to | ||
173 | specify external interrupts is a frequently asked question): | ||
174 | External interrupts: | ||
175 | external irq0: interrupts = <0 0 n>; | ||
176 | external irq1: interrupts = <1 1 n>; | ||
177 | external irq2: interrupts = <1 2 n>; | ||
178 | external irq3: interrupts = <1 3 n>; | ||
179 | 'n' is sense (0: level high, 1: edge rising, 2: edge falling 3: level low) | ||
180 | |||
diff --git a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt b/Documentation/powerpc/mpc52xx-device-tree-bindings.txt deleted file mode 100644 index 6f12f1c79c0c..000000000000 --- a/Documentation/powerpc/mpc52xx-device-tree-bindings.txt +++ /dev/null | |||
@@ -1,277 +0,0 @@ | |||
1 | MPC5200 Device Tree Bindings | ||
2 | ---------------------------- | ||
3 | |||
4 | (c) 2006-2007 Secret Lab Technologies Ltd | ||
5 | Grant Likely <grant.likely at secretlab.ca> | ||
6 | |||
7 | ********** DRAFT *********** | ||
8 | * WARNING: Do not depend on the stability of these bindings just yet. | ||
9 | * The MPC5200 device tree conventions are still in flux | ||
10 | * Keep an eye on the linuxppc-dev mailing list for more details | ||
11 | ********** DRAFT *********** | ||
12 | |||
13 | I - Introduction | ||
14 | ================ | ||
15 | Boards supported by the arch/powerpc architecture require device tree be | ||
16 | passed by the boot loader to the kernel at boot time. The device tree | ||
17 | describes what devices are present on the board and how they are | ||
18 | connected. The device tree can either be passed as a binary blob (as | ||
19 | described in Documentation/powerpc/booting-without-of.txt), or passed | ||
20 | by Open Firmware (IEEE 1275) compatible firmware using an OF compatible | ||
21 | client interface API. | ||
22 | |||
23 | This document specifies the requirements on the device-tree for mpc5200 | ||
24 | based boards. These requirements are above and beyond the details | ||
25 | specified in either the Open Firmware spec or booting-without-of.txt | ||
26 | |||
27 | All new mpc5200-based boards are expected to match this document. In | ||
28 | cases where this document is not sufficient to support a new board port, | ||
29 | this document should be updated as part of adding the new board support. | ||
30 | |||
31 | II - Philosophy | ||
32 | =============== | ||
33 | The core of this document is naming convention. The whole point of | ||
34 | defining this convention is to reduce or eliminate the number of | ||
35 | special cases required to support a 5200 board. If all 5200 boards | ||
36 | follow the same convention, then generic 5200 support code will work | ||
37 | rather than coding special cases for each new board. | ||
38 | |||
39 | This section tries to capture the thought process behind why the naming | ||
40 | convention is what it is. | ||
41 | |||
42 | 1. names | ||
43 | --------- | ||
44 | There is strong convention/requirements already established for children | ||
45 | of the root node. 'cpus' describes the processor cores, 'memory' | ||
46 | describes memory, and 'chosen' provides boot configuration. Other nodes | ||
47 | are added to describe devices attached to the processor local bus. | ||
48 | |||
49 | Following convention already established with other system-on-chip | ||
50 | processors, 5200 device trees should use the name 'soc5200' for the | ||
51 | parent node of on chip devices, and the root node should be its parent. | ||
52 | |||
53 | Child nodes are typically named after the configured function. ie. | ||
54 | the FEC node is named 'ethernet', and a PSC in uart mode is named 'serial'. | ||
55 | |||
56 | 2. device_type property | ||
57 | ----------------------- | ||
58 | similar to the node name convention above; the device_type reflects the | ||
59 | configured function of a device. ie. 'serial' for a uart and 'spi' for | ||
60 | an spi controller. However, while node names *should* reflect the | ||
61 | configured function, device_type *must* match the configured function | ||
62 | exactly. | ||
63 | |||
64 | 3. compatible property | ||
65 | ---------------------- | ||
66 | Since device_type isn't enough to match devices to drivers, there also | ||
67 | needs to be a naming convention for the compatible property. Compatible | ||
68 | is an list of device descriptions sorted from specific to generic. For | ||
69 | the mpc5200, the required format for each compatible value is | ||
70 | <chip>-<device>[-<mode>]. The OS should be able to match a device driver | ||
71 | to the device based solely on the compatible value. If two drivers | ||
72 | match on the compatible list; the 'most compatible' driver should be | ||
73 | selected. | ||
74 | |||
75 | The split between the MPC5200 and the MPC5200B leaves a bit of a | ||
76 | conundrum. How should the compatible property be set up to provide | ||
77 | maximum compatibility information; but still accurately describe the | ||
78 | chip? For the MPC5200; the answer is easy. Most of the SoC devices | ||
79 | originally appeared on the MPC5200. Since they didn't exist anywhere | ||
80 | else; the 5200 compatible properties will contain only one item; | ||
81 | "mpc5200-<device>". | ||
82 | |||
83 | The 5200B is almost the same as the 5200, but not quite. It fixes | ||
84 | silicon bugs and it adds a small number of enhancements. Most of the | ||
85 | devices either provide exactly the same interface as on the 5200. A few | ||
86 | devices have extra functions but still have a backwards compatible mode. | ||
87 | To express this information as completely as possible, 5200B device trees | ||
88 | should have two items in the compatible list; | ||
89 | "mpc5200b-<device>\0mpc5200-<device>". It is *strongly* recommended | ||
90 | that 5200B device trees follow this convention (instead of only listing | ||
91 | the base mpc5200 item). | ||
92 | |||
93 | If another chip appear on the market with one of the mpc5200 SoC | ||
94 | devices, then the compatible list should include mpc5200-<device>. | ||
95 | |||
96 | ie. ethernet on mpc5200: compatible = "mpc5200-ethernet" | ||
97 | ethernet on mpc5200b: compatible = "mpc5200b-ethernet\0mpc5200-ethernet" | ||
98 | |||
99 | Modal devices, like PSCs, also append the configured function to the | ||
100 | end of the compatible field. ie. A PSC in i2s mode would specify | ||
101 | "mpc5200-psc-i2s", not "mpc5200-i2s". This convention is chosen to | ||
102 | avoid naming conflicts with non-psc devices providing the same | ||
103 | function. For example, "mpc5200-spi" and "mpc5200-psc-spi" describe | ||
104 | the mpc5200 simple spi device and a PSC spi mode respectively. | ||
105 | |||
106 | If the soc device is more generic and present on other SOCs, the | ||
107 | compatible property can specify the more generic device type also. | ||
108 | |||
109 | ie. mscan: compatible = "mpc5200-mscan\0fsl,mscan"; | ||
110 | |||
111 | At the time of writing, exact chip may be either 'mpc5200' or | ||
112 | 'mpc5200b'. | ||
113 | |||
114 | Device drivers should always try to match as generically as possible. | ||
115 | |||
116 | III - Structure | ||
117 | =============== | ||
118 | The device tree for an mpc5200 board follows the structure defined in | ||
119 | booting-without-of.txt with the following additional notes: | ||
120 | |||
121 | 0) the root node | ||
122 | ---------------- | ||
123 | Typical root description node; see booting-without-of | ||
124 | |||
125 | 1) The cpus node | ||
126 | ---------------- | ||
127 | The cpus node follows the basic layout described in booting-without-of. | ||
128 | The bus-frequency property holds the XLB bus frequency | ||
129 | The clock-frequency property holds the core frequency | ||
130 | |||
131 | 2) The memory node | ||
132 | ------------------ | ||
133 | Typical memory description node; see booting-without-of. | ||
134 | |||
135 | 3) The soc5200 node | ||
136 | ------------------- | ||
137 | This node describes the on chip SOC peripherals. Every mpc5200 based | ||
138 | board will have this node, and as such there is a common naming | ||
139 | convention for SOC devices. | ||
140 | |||
141 | Required properties: | ||
142 | name type description | ||
143 | ---- ---- ----------- | ||
144 | device_type string must be "soc" | ||
145 | ranges int should be <0 baseaddr baseaddr+10000> | ||
146 | reg int must be <baseaddr 10000> | ||
147 | compatible string mpc5200: "mpc5200-soc" | ||
148 | mpc5200b: "mpc5200b-soc\0mpc5200-soc" | ||
149 | system-frequency int Fsystem frequency; source of all | ||
150 | other clocks. | ||
151 | bus-frequency int IPB bus frequency in HZ. Clock rate | ||
152 | used by most of the soc devices. | ||
153 | #interrupt-cells int must be <3>. | ||
154 | |||
155 | Recommended properties: | ||
156 | name type description | ||
157 | ---- ---- ----------- | ||
158 | model string Exact model of the chip; | ||
159 | ie: model="fsl,mpc5200" | ||
160 | revision string Silicon revision of chip | ||
161 | ie: revision="M08A" | ||
162 | |||
163 | The 'model' and 'revision' properties are *strongly* recommended. Having | ||
164 | them presence acts as a bit of a safety net for working around as yet | ||
165 | undiscovered bugs on one version of silicon. For example, device drivers | ||
166 | can use the model and revision properties to decide if a bug fix should | ||
167 | be turned on. | ||
168 | |||
169 | 4) soc5200 child nodes | ||
170 | ---------------------- | ||
171 | Any on chip SOC devices available to Linux must appear as soc5200 child nodes. | ||
172 | |||
173 | Note: The tables below show the value for the mpc5200. A mpc5200b device | ||
174 | tree should use the "mpc5200b-<device>\0mpc5200-<device> form. | ||
175 | |||
176 | Required soc5200 child nodes: | ||
177 | name device_type compatible Description | ||
178 | ---- ----------- ---------- ----------- | ||
179 | cdm@<addr> cdm mpc5200-cmd Clock Distribution | ||
180 | pic@<addr> interrupt-controller mpc5200-pic need an interrupt | ||
181 | controller to boot | ||
182 | bestcomm@<addr> dma-controller mpc5200-bestcomm 5200 pic also requires | ||
183 | the bestcomm device | ||
184 | |||
185 | Recommended soc5200 child nodes; populate as needed for your board | ||
186 | name device_type compatible Description | ||
187 | ---- ----------- ---------- ----------- | ||
188 | gpt@<addr> gpt fsl,mpc5200-gpt General purpose timers | ||
189 | gpt@<addr> gpt fsl,mpc5200-gpt-gpio General purpose | ||
190 | timers in GPIO mode | ||
191 | gpio@<addr> fsl,mpc5200-gpio MPC5200 simple gpio | ||
192 | controller | ||
193 | gpio@<addr> fsl,mpc5200-gpio-wkup MPC5200 wakeup gpio | ||
194 | controller | ||
195 | rtc@<addr> rtc mpc5200-rtc Real time clock | ||
196 | mscan@<addr> mscan mpc5200-mscan CAN bus controller | ||
197 | pci@<addr> pci mpc5200-pci PCI bridge | ||
198 | serial@<addr> serial mpc5200-psc-uart PSC in serial mode | ||
199 | i2s@<addr> sound mpc5200-psc-i2s PSC in i2s mode | ||
200 | ac97@<addr> sound mpc5200-psc-ac97 PSC in ac97 mode | ||
201 | spi@<addr> spi mpc5200-psc-spi PSC in spi mode | ||
202 | irda@<addr> irda mpc5200-psc-irda PSC in IrDA mode | ||
203 | spi@<addr> spi mpc5200-spi MPC5200 spi device | ||
204 | ethernet@<addr> network mpc5200-fec MPC5200 ethernet device | ||
205 | ata@<addr> ata mpc5200-ata IDE ATA interface | ||
206 | i2c@<addr> i2c mpc5200-i2c I2C controller | ||
207 | usb@<addr> usb-ohci-be mpc5200-ohci,ohci-be USB controller | ||
208 | xlb@<addr> xlb mpc5200-xlb XLB arbitrator | ||
209 | |||
210 | Important child node properties | ||
211 | name type description | ||
212 | ---- ---- ----------- | ||
213 | cell-index int When multiple devices are present, is the | ||
214 | index of the device in the hardware (ie. There | ||
215 | are 6 PSC on the 5200 numbered PSC1 to PSC6) | ||
216 | PSC1 has 'cell-index = <0>' | ||
217 | PSC4 has 'cell-index = <3>' | ||
218 | |||
219 | 5) General Purpose Timer nodes (child of soc5200 node) | ||
220 | On the mpc5200 and 5200b, GPT0 has a watchdog timer function. If the board | ||
221 | design supports the internal wdt, then the device node for GPT0 should | ||
222 | include the empty property 'fsl,has-wdt'. | ||
223 | |||
224 | 6) PSC nodes (child of soc5200 node) | ||
225 | PSC nodes can define the optional 'port-number' property to force assignment | ||
226 | order of serial ports. For example, PSC5 might be physically connected to | ||
227 | the port labeled 'COM1' and PSC1 wired to 'COM1'. In this case, PSC5 would | ||
228 | have a "port-number = <0>" property, and PSC1 would have "port-number = <1>". | ||
229 | |||
230 | PSC in i2s mode: The mpc5200 and mpc5200b PSCs are not compatible when in | ||
231 | i2s mode. An 'mpc5200b-psc-i2s' node cannot include 'mpc5200-psc-i2s' in the | ||
232 | compatible field. | ||
233 | |||
234 | 7) GPIO controller nodes | ||
235 | Each GPIO controller node should have the empty property gpio-controller and | ||
236 | #gpio-cells set to 2. First cell is the GPIO number which is interpreted | ||
237 | according to the bit numbers in the GPIO control registers. The second cell | ||
238 | is for flags which is currently unsused. | ||
239 | |||
240 | 8) FEC nodes | ||
241 | The FEC node can specify one of the following properties to configure | ||
242 | the MII link: | ||
243 | "fsl,7-wire-mode" - An empty property that specifies the link uses 7-wire | ||
244 | mode instead of MII | ||
245 | "current-speed" - Specifies that the MII should be configured for a fixed | ||
246 | speed. This property should contain two cells. The | ||
247 | first cell specifies the speed in Mbps and the second | ||
248 | should be '0' for half duplex and '1' for full duplex | ||
249 | "phy-handle" - Contains a phandle to an Ethernet PHY. | ||
250 | |||
251 | IV - Extra Notes | ||
252 | ================ | ||
253 | |||
254 | 1. Interrupt mapping | ||
255 | -------------------- | ||
256 | The mpc5200 pic driver splits hardware IRQ numbers into two levels. The | ||
257 | split reflects the layout of the PIC hardware itself, which groups | ||
258 | interrupts into one of three groups; CRIT, MAIN or PERP. Also, the | ||
259 | Bestcomm dma engine has it's own set of interrupt sources which are | ||
260 | cascaded off of peripheral interrupt 0, which the driver interprets as a | ||
261 | fourth group, SDMA. | ||
262 | |||
263 | The interrupts property for device nodes using the mpc5200 pic consists | ||
264 | of three cells; <L1 L2 level> | ||
265 | |||
266 | L1 := [CRIT=0, MAIN=1, PERP=2, SDMA=3] | ||
267 | L2 := interrupt number; directly mapped from the value in the | ||
268 | "ICTL PerStat, MainStat, CritStat Encoded Register" | ||
269 | level := [LEVEL_HIGH=0, EDGE_RISING=1, EDGE_FALLING=2, LEVEL_LOW=3] | ||
270 | |||
271 | 2. Shared registers | ||
272 | ------------------- | ||
273 | Some SoC devices share registers between them. ie. the i2c devices use | ||
274 | a single clock control register, and almost all device are affected by | ||
275 | the port_config register. Devices which need to manipulate shared regs | ||
276 | should look to the parent SoC node. The soc node is responsible | ||
277 | for arbitrating all shared register access. | ||
diff --git a/Documentation/video4linux/v4lgrab.c b/Documentation/video4linux/v4lgrab.c index 079b628481cf..d6e70bef8ad0 100644 --- a/Documentation/video4linux/v4lgrab.c +++ b/Documentation/video4linux/v4lgrab.c | |||
@@ -4,12 +4,21 @@ | |||
4 | * | 4 | * |
5 | * Compile with: | 5 | * Compile with: |
6 | * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab | 6 | * gcc -s -Wall -Wstrict-prototypes v4lgrab.c -o v4lgrab |
7 | * Use as: | 7 | * Use as: |
8 | * v4lgrab >image.ppm | 8 | * v4lgrab >image.ppm |
9 | * | 9 | * |
10 | * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> | 10 | * Copyright (C) 1998-05-03, Phil Blundell <philb@gnu.org> |
11 | * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c | 11 | * Copied from http://www.tazenda.demon.co.uk/phil/vgrabber.c |
12 | * with minor modifications (Dave Forrest, drf5n@virginia.edu). | 12 | * with minor modifications (Dave Forrest, drf5n@virginia.edu). |
13 | * | ||
14 | * | ||
15 | * For some cameras you may need to pre-load libv4l to perform | ||
16 | * the necessary decompression, e.g.: | ||
17 | * | ||
18 | * export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so | ||
19 | * ./v4lgrab >image.ppm | ||
20 | * | ||
21 | * see http://hansdegoede.livejournal.com/3636.html for details. | ||
13 | * | 22 | * |
14 | */ | 23 | */ |
15 | 24 | ||
@@ -24,7 +33,7 @@ | |||
24 | #include <linux/types.h> | 33 | #include <linux/types.h> |
25 | #include <linux/videodev.h> | 34 | #include <linux/videodev.h> |
26 | 35 | ||
27 | #define FILE "/dev/video0" | 36 | #define VIDEO_DEV "/dev/video0" |
28 | 37 | ||
29 | /* Stole this from tvset.c */ | 38 | /* Stole this from tvset.c */ |
30 | 39 | ||
@@ -90,7 +99,7 @@ int get_brightness_adj(unsigned char *image, long size, int *brightness) { | |||
90 | 99 | ||
91 | int main(int argc, char ** argv) | 100 | int main(int argc, char ** argv) |
92 | { | 101 | { |
93 | int fd = open(FILE, O_RDONLY), f; | 102 | int fd = open(VIDEO_DEV, O_RDONLY), f; |
94 | struct video_capability cap; | 103 | struct video_capability cap; |
95 | struct video_window win; | 104 | struct video_window win; |
96 | struct video_picture vpic; | 105 | struct video_picture vpic; |
@@ -100,13 +109,13 @@ int main(int argc, char ** argv) | |||
100 | unsigned int i, src_depth; | 109 | unsigned int i, src_depth; |
101 | 110 | ||
102 | if (fd < 0) { | 111 | if (fd < 0) { |
103 | perror(FILE); | 112 | perror(VIDEO_DEV); |
104 | exit(1); | 113 | exit(1); |
105 | } | 114 | } |
106 | 115 | ||
107 | if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { | 116 | if (ioctl(fd, VIDIOCGCAP, &cap) < 0) { |
108 | perror("VIDIOGCAP"); | 117 | perror("VIDIOGCAP"); |
109 | fprintf(stderr, "(" FILE " not a video4linux device?)\n"); | 118 | fprintf(stderr, "(" VIDEO_DEV " not a video4linux device?)\n"); |
110 | close(fd); | 119 | close(fd); |
111 | exit(1); | 120 | exit(1); |
112 | } | 121 | } |
diff --git a/MAINTAINERS b/MAINTAINERS index d992d407197b..5bff376d297c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -911,7 +911,7 @@ S: Maintained | |||
911 | BLACKFIN ARCHITECTURE | 911 | BLACKFIN ARCHITECTURE |
912 | P: Bryan Wu | 912 | P: Bryan Wu |
913 | M: cooloney@kernel.org | 913 | M: cooloney@kernel.org |
914 | L: uclinux-dist-devel@blackfin.uclinux.org (subscribers-only) | 914 | L: uclinux-dist-devel@blackfin.uclinux.org |
915 | W: http://blackfin.uclinux.org | 915 | W: http://blackfin.uclinux.org |
916 | S: Supported | 916 | S: Supported |
917 | 917 | ||
@@ -2836,8 +2836,6 @@ S: Maintained | |||
2836 | MAC80211 | 2836 | MAC80211 |
2837 | P: Johannes Berg | 2837 | P: Johannes Berg |
2838 | M: johannes@sipsolutions.net | 2838 | M: johannes@sipsolutions.net |
2839 | P: Michael Wu | ||
2840 | M: flamingice@sourmilk.net | ||
2841 | L: linux-wireless@vger.kernel.org | 2839 | L: linux-wireless@vger.kernel.org |
2842 | W: http://linuxwireless.org/ | 2840 | W: http://linuxwireless.org/ |
2843 | T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git | 2841 | T: git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 77b047475539..85040cfeb5e5 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -650,6 +650,7 @@ ENTRY(fp_enter) | |||
650 | no_fp: mov pc, lr | 650 | no_fp: mov pc, lr |
651 | 651 | ||
652 | __und_usr_unknown: | 652 | __und_usr_unknown: |
653 | enable_irq | ||
653 | mov r0, sp | 654 | mov r0, sp |
654 | adr lr, ret_from_exception | 655 | adr lr, ret_from_exception |
655 | b do_undefinstr | 656 | b do_undefinstr |
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S index 06269ea375c5..49a6ba926c2b 100644 --- a/arch/arm/kernel/entry-common.S +++ b/arch/arm/kernel/entry-common.S | |||
@@ -136,7 +136,7 @@ ENTRY(mcount) | |||
136 | ldmia sp!, {r0-r3, pc} | 136 | ldmia sp!, {r0-r3, pc} |
137 | 137 | ||
138 | trace: | 138 | trace: |
139 | ldr r1, [fp, #-4] | 139 | ldr r1, [fp, #-4] @ lr of instrumented routine |
140 | mov r0, lr | 140 | mov r0, lr |
141 | sub r0, r0, #MCOUNT_INSN_SIZE | 141 | sub r0, r0, #MCOUNT_INSN_SIZE |
142 | mov lr, pc | 142 | mov lr, pc |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 7141cee1fab7..363db186cb93 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -101,7 +101,7 @@ unlock: | |||
101 | /* Handle bad interrupts */ | 101 | /* Handle bad interrupts */ |
102 | static struct irq_desc bad_irq_desc = { | 102 | static struct irq_desc bad_irq_desc = { |
103 | .handle_irq = handle_bad_irq, | 103 | .handle_irq = handle_bad_irq, |
104 | .lock = SPIN_LOCK_UNLOCKED | 104 | .lock = __SPIN_LOCK_UNLOCKED(bad_irq_desc.lock), |
105 | }; | 105 | }; |
106 | 106 | ||
107 | /* | 107 | /* |
diff --git a/arch/arm/mach-msm/board-halibut.c b/arch/arm/mach-msm/board-halibut.c index c2a96e3965a6..e61967dde9a1 100644 --- a/arch/arm/mach-msm/board-halibut.c +++ b/arch/arm/mach-msm/board-halibut.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
28 | #include <asm/mach/flash.h> | 28 | #include <asm/mach/flash.h> |
29 | 29 | ||
30 | #include <mach/irqs.h> | ||
30 | #include <mach/board.h> | 31 | #include <mach/board.h> |
31 | #include <mach/msm_iomap.h> | 32 | #include <mach/msm_iomap.h> |
32 | 33 | ||
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c index 77382d8b6b2f..ba5d7c08dc17 100644 --- a/arch/arm/mach-omap1/devices.c +++ b/arch/arm/mach-omap1/devices.c | |||
@@ -181,7 +181,7 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
181 | } | 181 | } |
182 | size = OMAP1_MMC_SIZE; | 182 | size = OMAP1_MMC_SIZE; |
183 | 183 | ||
184 | omap_mmc_add(i, base, size, irq, mmc_data[i]); | 184 | omap_mmc_add("mmci-omap", i, base, size, irq, mmc_data[i]); |
185 | }; | 185 | }; |
186 | } | 186 | } |
187 | 187 | ||
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c index ca7a0cc1707c..575ba31295cf 100644 --- a/arch/arm/mach-omap1/mcbsp.c +++ b/arch/arm/mach-omap1/mcbsp.c | |||
@@ -28,81 +28,8 @@ | |||
28 | #define DPS_RSTCT2_PER_EN (1 << 0) | 28 | #define DPS_RSTCT2_PER_EN (1 << 0) |
29 | #define DSP_RSTCT2_WD_PER_EN (1 << 1) | 29 | #define DSP_RSTCT2_WD_PER_EN (1 << 1) |
30 | 30 | ||
31 | struct mcbsp_internal_clk { | ||
32 | struct clk clk; | ||
33 | struct clk **childs; | ||
34 | int n_childs; | ||
35 | }; | ||
36 | |||
37 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) | 31 | #if defined(CONFIG_ARCH_OMAP15XX) || defined(CONFIG_ARCH_OMAP16XX) |
38 | static void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk) | 32 | const char *clk_names[] = { "dsp_ck", "api_ck", "dspxor_ck" }; |
39 | { | ||
40 | const char *clk_names[] = { "dsp_ck", "api_ck", "dspxor_ck" }; | ||
41 | int i; | ||
42 | |||
43 | mclk->n_childs = ARRAY_SIZE(clk_names); | ||
44 | mclk->childs = kzalloc(mclk->n_childs * sizeof(struct clk *), | ||
45 | GFP_KERNEL); | ||
46 | |||
47 | for (i = 0; i < mclk->n_childs; i++) { | ||
48 | /* We fake a platform device to get correct device id */ | ||
49 | struct platform_device pdev; | ||
50 | |||
51 | pdev.dev.bus = &platform_bus_type; | ||
52 | pdev.id = mclk->clk.id; | ||
53 | mclk->childs[i] = clk_get(&pdev.dev, clk_names[i]); | ||
54 | if (IS_ERR(mclk->childs[i])) | ||
55 | printk(KERN_ERR "Could not get clock %s (%d).\n", | ||
56 | clk_names[i], mclk->clk.id); | ||
57 | } | ||
58 | } | ||
59 | |||
60 | static int omap_mcbsp_clk_enable(struct clk *clk) | ||
61 | { | ||
62 | struct mcbsp_internal_clk *mclk = container_of(clk, | ||
63 | struct mcbsp_internal_clk, clk); | ||
64 | int i; | ||
65 | |||
66 | for (i = 0; i < mclk->n_childs; i++) | ||
67 | clk_enable(mclk->childs[i]); | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | static void omap_mcbsp_clk_disable(struct clk *clk) | ||
72 | { | ||
73 | struct mcbsp_internal_clk *mclk = container_of(clk, | ||
74 | struct mcbsp_internal_clk, clk); | ||
75 | int i; | ||
76 | |||
77 | for (i = 0; i < mclk->n_childs; i++) | ||
78 | clk_disable(mclk->childs[i]); | ||
79 | } | ||
80 | |||
81 | static struct mcbsp_internal_clk omap_mcbsp_clks[] = { | ||
82 | { | ||
83 | .clk = { | ||
84 | .name = "mcbsp_clk", | ||
85 | .id = 1, | ||
86 | .enable = omap_mcbsp_clk_enable, | ||
87 | .disable = omap_mcbsp_clk_disable, | ||
88 | }, | ||
89 | }, | ||
90 | { | ||
91 | .clk = { | ||
92 | .name = "mcbsp_clk", | ||
93 | .id = 3, | ||
94 | .enable = omap_mcbsp_clk_enable, | ||
95 | .disable = omap_mcbsp_clk_disable, | ||
96 | }, | ||
97 | }, | ||
98 | }; | ||
99 | |||
100 | #define omap_mcbsp_clks_size ARRAY_SIZE(omap_mcbsp_clks) | ||
101 | #else | ||
102 | #define omap_mcbsp_clks_size 0 | ||
103 | static struct mcbsp_internal_clk __initdata *omap_mcbsp_clks; | ||
104 | static inline void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk) | ||
105 | { } | ||
106 | #endif | 33 | #endif |
107 | 34 | ||
108 | static void omap1_mcbsp_request(unsigned int id) | 35 | static void omap1_mcbsp_request(unsigned int id) |
@@ -167,8 +94,9 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | |||
167 | .rx_irq = INT_McBSP1RX, | 94 | .rx_irq = INT_McBSP1RX, |
168 | .tx_irq = INT_McBSP1TX, | 95 | .tx_irq = INT_McBSP1TX, |
169 | .ops = &omap1_mcbsp_ops, | 96 | .ops = &omap1_mcbsp_ops, |
170 | .clk_name = "mcbsp_clk", | 97 | .clk_names = clk_names, |
171 | }, | 98 | .num_clks = 3, |
99 | }, | ||
172 | { | 100 | { |
173 | .phys_base = OMAP1510_MCBSP2_BASE, | 101 | .phys_base = OMAP1510_MCBSP2_BASE, |
174 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, | 102 | .dma_rx_sync = OMAP_DMA_MCBSP2_RX, |
@@ -184,7 +112,8 @@ static struct omap_mcbsp_platform_data omap15xx_mcbsp_pdata[] = { | |||
184 | .rx_irq = INT_McBSP3RX, | 112 | .rx_irq = INT_McBSP3RX, |
185 | .tx_irq = INT_McBSP3TX, | 113 | .tx_irq = INT_McBSP3TX, |
186 | .ops = &omap1_mcbsp_ops, | 114 | .ops = &omap1_mcbsp_ops, |
187 | .clk_name = "mcbsp_clk", | 115 | .clk_names = clk_names, |
116 | .num_clks = 3, | ||
188 | }, | 117 | }, |
189 | }; | 118 | }; |
190 | #define OMAP15XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap15xx_mcbsp_pdata) | 119 | #define OMAP15XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap15xx_mcbsp_pdata) |
@@ -202,7 +131,8 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
202 | .rx_irq = INT_McBSP1RX, | 131 | .rx_irq = INT_McBSP1RX, |
203 | .tx_irq = INT_McBSP1TX, | 132 | .tx_irq = INT_McBSP1TX, |
204 | .ops = &omap1_mcbsp_ops, | 133 | .ops = &omap1_mcbsp_ops, |
205 | .clk_name = "mcbsp_clk", | 134 | .clk_names = clk_names, |
135 | .num_clks = 3, | ||
206 | }, | 136 | }, |
207 | { | 137 | { |
208 | .phys_base = OMAP1610_MCBSP2_BASE, | 138 | .phys_base = OMAP1610_MCBSP2_BASE, |
@@ -219,7 +149,8 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
219 | .rx_irq = INT_McBSP3RX, | 149 | .rx_irq = INT_McBSP3RX, |
220 | .tx_irq = INT_McBSP3TX, | 150 | .tx_irq = INT_McBSP3TX, |
221 | .ops = &omap1_mcbsp_ops, | 151 | .ops = &omap1_mcbsp_ops, |
222 | .clk_name = "mcbsp_clk", | 152 | .clk_names = clk_names, |
153 | .num_clks = 3, | ||
223 | }, | 154 | }, |
224 | }; | 155 | }; |
225 | #define OMAP16XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap16xx_mcbsp_pdata) | 156 | #define OMAP16XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap16xx_mcbsp_pdata) |
@@ -230,15 +161,6 @@ static struct omap_mcbsp_platform_data omap16xx_mcbsp_pdata[] = { | |||
230 | 161 | ||
231 | int __init omap1_mcbsp_init(void) | 162 | int __init omap1_mcbsp_init(void) |
232 | { | 163 | { |
233 | int i; | ||
234 | |||
235 | for (i = 0; i < omap_mcbsp_clks_size; i++) { | ||
236 | if (cpu_is_omap15xx() || cpu_is_omap16xx()) { | ||
237 | omap_mcbsp_clk_init(&omap_mcbsp_clks[i]); | ||
238 | clk_register(&omap_mcbsp_clks[i].clk); | ||
239 | } | ||
240 | } | ||
241 | |||
242 | if (cpu_is_omap730()) | 164 | if (cpu_is_omap730()) |
243 | omap_mcbsp_count = OMAP730_MCBSP_PDATA_SZ; | 165 | omap_mcbsp_count = OMAP730_MCBSP_PDATA_SZ; |
244 | if (cpu_is_omap15xx()) | 166 | if (cpu_is_omap15xx()) |
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 9d7216ff6c9f..ce03fa750775 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -421,6 +421,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
421 | int nr_controllers) | 421 | int nr_controllers) |
422 | { | 422 | { |
423 | int i; | 423 | int i; |
424 | char *name; | ||
424 | 425 | ||
425 | for (i = 0; i < nr_controllers; i++) { | 426 | for (i = 0; i < nr_controllers; i++) { |
426 | unsigned long base, size; | 427 | unsigned long base, size; |
@@ -450,12 +451,14 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
450 | continue; | 451 | continue; |
451 | } | 452 | } |
452 | 453 | ||
453 | if (cpu_is_omap2420()) | 454 | if (cpu_is_omap2420()) { |
454 | size = OMAP2420_MMC_SIZE; | 455 | size = OMAP2420_MMC_SIZE; |
455 | else | 456 | name = "mmci-omap"; |
457 | } else { | ||
456 | size = HSMMC_SIZE; | 458 | size = HSMMC_SIZE; |
457 | 459 | name = "mmci-omap-hs"; | |
458 | omap_mmc_add(i, base, size, irq, mmc_data[i]); | 460 | } |
461 | omap_mmc_add(name, i, base, size, irq, mmc_data[i]); | ||
459 | }; | 462 | }; |
460 | } | 463 | } |
461 | 464 | ||
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index b0f8e7d62798..b52a02fc7cd6 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c | |||
@@ -172,9 +172,13 @@ void __init omap34xx_check_revision(void) | |||
172 | omap_revision = OMAP3430_REV_ES3_0; | 172 | omap_revision = OMAP3430_REV_ES3_0; |
173 | rev_name = "ES3.0"; | 173 | rev_name = "ES3.0"; |
174 | break; | 174 | break; |
175 | case 4: | ||
176 | omap_revision = OMAP3430_REV_ES3_1; | ||
177 | rev_name = "ES3.1"; | ||
178 | break; | ||
175 | default: | 179 | default: |
176 | /* Use the latest known revision as default */ | 180 | /* Use the latest known revision as default */ |
177 | omap_revision = OMAP3430_REV_ES3_0; | 181 | omap_revision = OMAP3430_REV_ES3_1; |
178 | rev_name = "Unknown revision\n"; | 182 | rev_name = "Unknown revision\n"; |
179 | } | 183 | } |
180 | } | 184 | } |
diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 636e2821af7d..9ba20d985dda 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c | |||
@@ -134,6 +134,7 @@ static struct irq_chip omap_irq_chip = { | |||
134 | .ack = omap_mask_ack_irq, | 134 | .ack = omap_mask_ack_irq, |
135 | .mask = omap_mask_irq, | 135 | .mask = omap_mask_irq, |
136 | .unmask = omap_unmask_irq, | 136 | .unmask = omap_unmask_irq, |
137 | .disable = omap_mask_irq, | ||
137 | }; | 138 | }; |
138 | 139 | ||
139 | static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank) | 140 | static void __init omap_irq_bank_init_one(struct omap_irq_bank *bank) |
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c index e20023c9d15d..a9e631fc1134 100644 --- a/arch/arm/mach-omap2/mcbsp.c +++ b/arch/arm/mach-omap2/mcbsp.c | |||
@@ -24,106 +24,7 @@ | |||
24 | #include <mach/cpu.h> | 24 | #include <mach/cpu.h> |
25 | #include <mach/mcbsp.h> | 25 | #include <mach/mcbsp.h> |
26 | 26 | ||
27 | struct mcbsp_internal_clk { | 27 | const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" }; |
28 | struct clk clk; | ||
29 | struct clk **childs; | ||
30 | int n_childs; | ||
31 | }; | ||
32 | |||
33 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | ||
34 | static void omap_mcbsp_clk_init(struct mcbsp_internal_clk *mclk) | ||
35 | { | ||
36 | const char *clk_names[] = { "mcbsp_ick", "mcbsp_fck" }; | ||
37 | int i; | ||
38 | |||
39 | mclk->n_childs = ARRAY_SIZE(clk_names); | ||
40 | mclk->childs = kzalloc(mclk->n_childs * sizeof(struct clk *), | ||
41 | GFP_KERNEL); | ||
42 | |||
43 | for (i = 0; i < mclk->n_childs; i++) { | ||
44 | /* We fake a platform device to get correct device id */ | ||
45 | struct platform_device pdev; | ||
46 | |||
47 | pdev.dev.bus = &platform_bus_type; | ||
48 | pdev.id = mclk->clk.id; | ||
49 | mclk->childs[i] = clk_get(&pdev.dev, clk_names[i]); | ||
50 | if (IS_ERR(mclk->childs[i])) | ||
51 | printk(KERN_ERR "Could not get clock %s (%d).\n", | ||
52 | clk_names[i], mclk->clk.id); | ||
53 | } | ||
54 | } | ||
55 | |||
56 | static int omap_mcbsp_clk_enable(struct clk *clk) | ||
57 | { | ||
58 | struct mcbsp_internal_clk *mclk = container_of(clk, | ||
59 | struct mcbsp_internal_clk, clk); | ||
60 | int i; | ||
61 | |||
62 | for (i = 0; i < mclk->n_childs; i++) | ||
63 | clk_enable(mclk->childs[i]); | ||
64 | return 0; | ||
65 | } | ||
66 | |||
67 | static void omap_mcbsp_clk_disable(struct clk *clk) | ||
68 | { | ||
69 | struct mcbsp_internal_clk *mclk = container_of(clk, | ||
70 | struct mcbsp_internal_clk, clk); | ||
71 | int i; | ||
72 | |||
73 | for (i = 0; i < mclk->n_childs; i++) | ||
74 | clk_disable(mclk->childs[i]); | ||
75 | } | ||
76 | |||
77 | static struct mcbsp_internal_clk omap_mcbsp_clks[] = { | ||
78 | { | ||
79 | .clk = { | ||
80 | .name = "mcbsp_clk", | ||
81 | .id = 1, | ||
82 | .enable = omap_mcbsp_clk_enable, | ||
83 | .disable = omap_mcbsp_clk_disable, | ||
84 | }, | ||
85 | }, | ||
86 | { | ||
87 | .clk = { | ||
88 | .name = "mcbsp_clk", | ||
89 | .id = 2, | ||
90 | .enable = omap_mcbsp_clk_enable, | ||
91 | .disable = omap_mcbsp_clk_disable, | ||
92 | }, | ||
93 | }, | ||
94 | { | ||
95 | .clk = { | ||
96 | .name = "mcbsp_clk", | ||
97 | .id = 3, | ||
98 | .enable = omap_mcbsp_clk_enable, | ||
99 | .disable = omap_mcbsp_clk_disable, | ||
100 | }, | ||
101 | }, | ||
102 | { | ||
103 | .clk = { | ||
104 | .name = "mcbsp_clk", | ||
105 | .id = 4, | ||
106 | .enable = omap_mcbsp_clk_enable, | ||
107 | .disable = omap_mcbsp_clk_disable, | ||
108 | }, | ||
109 | }, | ||
110 | { | ||
111 | .clk = { | ||
112 | .name = "mcbsp_clk", | ||
113 | .id = 5, | ||
114 | .enable = omap_mcbsp_clk_enable, | ||
115 | .disable = omap_mcbsp_clk_disable, | ||
116 | }, | ||
117 | }, | ||
118 | }; | ||
119 | |||
120 | #define omap_mcbsp_clks_size ARRAY_SIZE(omap_mcbsp_clks) | ||
121 | #else | ||
122 | #define omap_mcbsp_clks_size 0 | ||
123 | static struct mcbsp_internal_clk __initdata *omap_mcbsp_clks; | ||
124 | static inline void omap_mcbsp_clk_init(struct clk *clk) | ||
125 | { } | ||
126 | #endif | ||
127 | 28 | ||
128 | static void omap2_mcbsp2_mux_setup(void) | 29 | static void omap2_mcbsp2_mux_setup(void) |
129 | { | 30 | { |
@@ -156,7 +57,8 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | |||
156 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 57 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
157 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 58 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
158 | .ops = &omap2_mcbsp_ops, | 59 | .ops = &omap2_mcbsp_ops, |
159 | .clk_name = "mcbsp_clk", | 60 | .clk_names = clk_names, |
61 | .num_clks = 2, | ||
160 | }, | 62 | }, |
161 | { | 63 | { |
162 | .phys_base = OMAP24XX_MCBSP2_BASE, | 64 | .phys_base = OMAP24XX_MCBSP2_BASE, |
@@ -165,7 +67,8 @@ static struct omap_mcbsp_platform_data omap2420_mcbsp_pdata[] = { | |||
165 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 67 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
166 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 68 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
167 | .ops = &omap2_mcbsp_ops, | 69 | .ops = &omap2_mcbsp_ops, |
168 | .clk_name = "mcbsp_clk", | 70 | .clk_names = clk_names, |
71 | .num_clks = 2, | ||
169 | }, | 72 | }, |
170 | }; | 73 | }; |
171 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) | 74 | #define OMAP2420_MCBSP_PDATA_SZ ARRAY_SIZE(omap2420_mcbsp_pdata) |
@@ -183,7 +86,8 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
183 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 86 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
184 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 87 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
185 | .ops = &omap2_mcbsp_ops, | 88 | .ops = &omap2_mcbsp_ops, |
186 | .clk_name = "mcbsp_clk", | 89 | .clk_names = clk_names, |
90 | .num_clks = 2, | ||
187 | }, | 91 | }, |
188 | { | 92 | { |
189 | .phys_base = OMAP24XX_MCBSP2_BASE, | 93 | .phys_base = OMAP24XX_MCBSP2_BASE, |
@@ -192,7 +96,8 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
192 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 96 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
193 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 97 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
194 | .ops = &omap2_mcbsp_ops, | 98 | .ops = &omap2_mcbsp_ops, |
195 | .clk_name = "mcbsp_clk", | 99 | .clk_names = clk_names, |
100 | .num_clks = 2, | ||
196 | }, | 101 | }, |
197 | { | 102 | { |
198 | .phys_base = OMAP2430_MCBSP3_BASE, | 103 | .phys_base = OMAP2430_MCBSP3_BASE, |
@@ -201,7 +106,8 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
201 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | 106 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, |
202 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | 107 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, |
203 | .ops = &omap2_mcbsp_ops, | 108 | .ops = &omap2_mcbsp_ops, |
204 | .clk_name = "mcbsp_clk", | 109 | .clk_names = clk_names, |
110 | .num_clks = 2, | ||
205 | }, | 111 | }, |
206 | { | 112 | { |
207 | .phys_base = OMAP2430_MCBSP4_BASE, | 113 | .phys_base = OMAP2430_MCBSP4_BASE, |
@@ -210,7 +116,8 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
210 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | 116 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, |
211 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | 117 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, |
212 | .ops = &omap2_mcbsp_ops, | 118 | .ops = &omap2_mcbsp_ops, |
213 | .clk_name = "mcbsp_clk", | 119 | .clk_names = clk_names, |
120 | .num_clks = 2, | ||
214 | }, | 121 | }, |
215 | { | 122 | { |
216 | .phys_base = OMAP2430_MCBSP5_BASE, | 123 | .phys_base = OMAP2430_MCBSP5_BASE, |
@@ -219,7 +126,8 @@ static struct omap_mcbsp_platform_data omap2430_mcbsp_pdata[] = { | |||
219 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | 126 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, |
220 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | 127 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, |
221 | .ops = &omap2_mcbsp_ops, | 128 | .ops = &omap2_mcbsp_ops, |
222 | .clk_name = "mcbsp_clk", | 129 | .clk_names = clk_names, |
130 | .num_clks = 2, | ||
223 | }, | 131 | }, |
224 | }; | 132 | }; |
225 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) | 133 | #define OMAP2430_MCBSP_PDATA_SZ ARRAY_SIZE(omap2430_mcbsp_pdata) |
@@ -237,7 +145,8 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
237 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, | 145 | .rx_irq = INT_24XX_MCBSP1_IRQ_RX, |
238 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, | 146 | .tx_irq = INT_24XX_MCBSP1_IRQ_TX, |
239 | .ops = &omap2_mcbsp_ops, | 147 | .ops = &omap2_mcbsp_ops, |
240 | .clk_name = "mcbsp_clk", | 148 | .clk_names = clk_names, |
149 | .num_clks = 2, | ||
241 | }, | 150 | }, |
242 | { | 151 | { |
243 | .phys_base = OMAP34XX_MCBSP2_BASE, | 152 | .phys_base = OMAP34XX_MCBSP2_BASE, |
@@ -246,7 +155,8 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
246 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, | 155 | .rx_irq = INT_24XX_MCBSP2_IRQ_RX, |
247 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, | 156 | .tx_irq = INT_24XX_MCBSP2_IRQ_TX, |
248 | .ops = &omap2_mcbsp_ops, | 157 | .ops = &omap2_mcbsp_ops, |
249 | .clk_name = "mcbsp_clk", | 158 | .clk_names = clk_names, |
159 | .num_clks = 2, | ||
250 | }, | 160 | }, |
251 | { | 161 | { |
252 | .phys_base = OMAP34XX_MCBSP3_BASE, | 162 | .phys_base = OMAP34XX_MCBSP3_BASE, |
@@ -255,7 +165,8 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
255 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, | 165 | .rx_irq = INT_24XX_MCBSP3_IRQ_RX, |
256 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, | 166 | .tx_irq = INT_24XX_MCBSP3_IRQ_TX, |
257 | .ops = &omap2_mcbsp_ops, | 167 | .ops = &omap2_mcbsp_ops, |
258 | .clk_name = "mcbsp_clk", | 168 | .clk_names = clk_names, |
169 | .num_clks = 2, | ||
259 | }, | 170 | }, |
260 | { | 171 | { |
261 | .phys_base = OMAP34XX_MCBSP4_BASE, | 172 | .phys_base = OMAP34XX_MCBSP4_BASE, |
@@ -264,7 +175,8 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
264 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, | 175 | .rx_irq = INT_24XX_MCBSP4_IRQ_RX, |
265 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, | 176 | .tx_irq = INT_24XX_MCBSP4_IRQ_TX, |
266 | .ops = &omap2_mcbsp_ops, | 177 | .ops = &omap2_mcbsp_ops, |
267 | .clk_name = "mcbsp_clk", | 178 | .clk_names = clk_names, |
179 | .num_clks = 2, | ||
268 | }, | 180 | }, |
269 | { | 181 | { |
270 | .phys_base = OMAP34XX_MCBSP5_BASE, | 182 | .phys_base = OMAP34XX_MCBSP5_BASE, |
@@ -273,7 +185,8 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
273 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, | 185 | .rx_irq = INT_24XX_MCBSP5_IRQ_RX, |
274 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, | 186 | .tx_irq = INT_24XX_MCBSP5_IRQ_TX, |
275 | .ops = &omap2_mcbsp_ops, | 187 | .ops = &omap2_mcbsp_ops, |
276 | .clk_name = "mcbsp_clk", | 188 | .clk_names = clk_names, |
189 | .num_clks = 2, | ||
277 | }, | 190 | }, |
278 | }; | 191 | }; |
279 | #define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) | 192 | #define OMAP34XX_MCBSP_PDATA_SZ ARRAY_SIZE(omap34xx_mcbsp_pdata) |
@@ -284,14 +197,6 @@ static struct omap_mcbsp_platform_data omap34xx_mcbsp_pdata[] = { | |||
284 | 197 | ||
285 | static int __init omap2_mcbsp_init(void) | 198 | static int __init omap2_mcbsp_init(void) |
286 | { | 199 | { |
287 | int i; | ||
288 | |||
289 | for (i = 0; i < omap_mcbsp_clks_size; i++) { | ||
290 | /* Once we call clk_get inside init, we do not register it */ | ||
291 | omap_mcbsp_clk_init(&omap_mcbsp_clks[i]); | ||
292 | clk_register(&omap_mcbsp_clks[i].clk); | ||
293 | } | ||
294 | |||
295 | if (cpu_is_omap2420()) | 200 | if (cpu_is_omap2420()) |
296 | omap_mcbsp_count = OMAP2420_MCBSP_PDATA_SZ; | 201 | omap_mcbsp_count = OMAP2420_MCBSP_PDATA_SZ; |
297 | if (cpu_is_omap2430()) | 202 | if (cpu_is_omap2430()) |
diff --git a/arch/arm/mach-omap2/sleep24xx.S b/arch/arm/mach-omap2/sleep24xx.S index 43336b93b21c..bf9e96105e11 100644 --- a/arch/arm/mach-omap2/sleep24xx.S +++ b/arch/arm/mach-omap2/sleep24xx.S | |||
@@ -93,9 +93,8 @@ ENTRY(omap24xx_cpu_suspend) | |||
93 | orr r4, r4, #0x40 @ enable self refresh on idle req | 93 | orr r4, r4, #0x40 @ enable self refresh on idle req |
94 | mov r5, #0x2000 @ set delay (DPLL relock + DLL relock) | 94 | mov r5, #0x2000 @ set delay (DPLL relock + DLL relock) |
95 | str r4, [r2] @ make it so | 95 | str r4, [r2] @ make it so |
96 | mov r2, #0 | ||
97 | nop | 96 | nop |
98 | mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt | 97 | mcr p15, 0, r3, c7, c0, 4 @ wait for interrupt |
99 | nop | 98 | nop |
100 | loop: | 99 | loop: |
101 | subs r5, r5, #0x1 @ awake, wait just a bit | 100 | subs r5, r5, #0x1 @ awake, wait just a bit |
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c index ae6036300f60..9fc13a2cc3f4 100644 --- a/arch/arm/mach-omap2/timer-gp.c +++ b/arch/arm/mach-omap2/timer-gp.c | |||
@@ -118,7 +118,8 @@ static void __init omap2_gp_clockevent_init(void) | |||
118 | clockevent_gpt.max_delta_ns = | 118 | clockevent_gpt.max_delta_ns = |
119 | clockevent_delta2ns(0xffffffff, &clockevent_gpt); | 119 | clockevent_delta2ns(0xffffffff, &clockevent_gpt); |
120 | clockevent_gpt.min_delta_ns = | 120 | clockevent_gpt.min_delta_ns = |
121 | clockevent_delta2ns(1, &clockevent_gpt); | 121 | clockevent_delta2ns(3, &clockevent_gpt); |
122 | /* Timer internal resynch latency. */ | ||
122 | 123 | ||
123 | clockevent_gpt.cpumask = cpumask_of(0); | 124 | clockevent_gpt.cpumask = cpumask_of(0); |
124 | clockevents_register_device(&clockevent_gpt); | 125 | clockevents_register_device(&clockevent_gpt); |
diff --git a/arch/arm/mach-sa1100/generic.c b/arch/arm/mach-sa1100/generic.c index c1fbd5b5f9c4..23cfdd593954 100644 --- a/arch/arm/mach-sa1100/generic.c +++ b/arch/arm/mach-sa1100/generic.c | |||
@@ -289,7 +289,7 @@ static struct platform_device sa11x0pcmcia_device = { | |||
289 | }; | 289 | }; |
290 | 290 | ||
291 | static struct platform_device sa11x0mtd_device = { | 291 | static struct platform_device sa11x0mtd_device = { |
292 | .name = "flash", | 292 | .name = "sa1100-mtd", |
293 | .id = -1, | 293 | .id = -1, |
294 | }; | 294 | }; |
295 | 295 | ||
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 81d0b8772de3..bc0099d5ae85 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -66,7 +66,10 @@ static int adjust_pte(struct vm_area_struct *vma, unsigned long address) | |||
66 | * fault (ie, is old), we can safely ignore any issues. | 66 | * fault (ie, is old), we can safely ignore any issues. |
67 | */ | 67 | */ |
68 | if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) { | 68 | if (ret && (pte_val(entry) & L_PTE_MT_MASK) != shared_pte_mask) { |
69 | flush_cache_page(vma, address, pte_pfn(entry)); | 69 | unsigned long pfn = pte_pfn(entry); |
70 | flush_cache_page(vma, address, pfn); | ||
71 | outer_flush_range((pfn << PAGE_SHIFT), | ||
72 | (pfn << PAGE_SHIFT) + PAGE_SIZE); | ||
70 | pte_val(entry) &= ~L_PTE_MT_MASK; | 73 | pte_val(entry) &= ~L_PTE_MT_MASK; |
71 | pte_val(entry) |= shared_pte_mask; | 74 | pte_val(entry) |= shared_pte_mask; |
72 | set_pte_at(vma->vm_mm, address, pte, entry); | 75 | set_pte_at(vma->vm_mm, address, pte, entry); |
diff --git a/arch/arm/plat-mxc/include/mach/mmc.h b/arch/arm/plat-mxc/include/mach/mmc.h new file mode 100644 index 000000000000..de2128dada5c --- /dev/null +++ b/arch/arm/plat-mxc/include/mach/mmc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | #ifndef ASMARM_ARCH_MMC_H | ||
2 | #define ASMARM_ARCH_MMC_H | ||
3 | |||
4 | #include <linux/mmc/host.h> | ||
5 | |||
6 | struct device; | ||
7 | |||
8 | /* board specific SDHC data, optional. | ||
9 | * If not present, a writable card with 3,3V is assumed. | ||
10 | */ | ||
11 | struct imxmmc_platform_data { | ||
12 | /* Return values for the get_ro callback should be: | ||
13 | * 0 for a read/write card | ||
14 | * 1 for a read-only card | ||
15 | * -ENOSYS when not supported (equal to NULL callback) | ||
16 | * or a negative errno value when something bad happened | ||
17 | */ | ||
18 | int (*get_ro)(struct device *); | ||
19 | |||
20 | /* board specific hook to (de)initialize the SD slot. | ||
21 | * The board code can call 'handler' on a card detection | ||
22 | * change giving data as argument. | ||
23 | */ | ||
24 | int (*init)(struct device *dev, irq_handler_t handler, void *data); | ||
25 | void (*exit)(struct device *dev, void *data); | ||
26 | |||
27 | /* available voltages. If not given, assume | ||
28 | * MMC_VDD_32_33 | MMC_VDD_33_34 | ||
29 | */ | ||
30 | unsigned int ocr_avail; | ||
31 | |||
32 | /* adjust slot voltage */ | ||
33 | void (*setpower)(struct device *, unsigned int vdd); | ||
34 | }; | ||
35 | |||
36 | #endif | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index ac15c23fd5da..208dbb121f47 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -200,14 +200,15 @@ void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config, | |||
200 | /* | 200 | /* |
201 | * Register MMC devices. Called from mach-omap1 and mach-omap2 device init. | 201 | * Register MMC devices. Called from mach-omap1 and mach-omap2 device init. |
202 | */ | 202 | */ |
203 | int __init omap_mmc_add(int id, unsigned long base, unsigned long size, | 203 | int __init omap_mmc_add(const char *name, int id, unsigned long base, |
204 | unsigned int irq, struct omap_mmc_platform_data *data) | 204 | unsigned long size, unsigned int irq, |
205 | struct omap_mmc_platform_data *data) | ||
205 | { | 206 | { |
206 | struct platform_device *pdev; | 207 | struct platform_device *pdev; |
207 | struct resource res[OMAP_MMC_NR_RES]; | 208 | struct resource res[OMAP_MMC_NR_RES]; |
208 | int ret; | 209 | int ret; |
209 | 210 | ||
210 | pdev = platform_device_alloc("mmci-omap", id); | 211 | pdev = platform_device_alloc(name, id); |
211 | if (!pdev) | 212 | if (!pdev) |
212 | return -ENOMEM; | 213 | return -ENOMEM; |
213 | 214 | ||
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index e77373c39f8c..47ec77af4ccb 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -709,6 +709,7 @@ int omap_request_dma(int dev_id, const char *dev_name, | |||
709 | chan->dev_name = dev_name; | 709 | chan->dev_name = dev_name; |
710 | chan->callback = callback; | 710 | chan->callback = callback; |
711 | chan->data = data; | 711 | chan->data = data; |
712 | chan->flags = 0; | ||
712 | 713 | ||
713 | #ifndef CONFIG_ARCH_OMAP1 | 714 | #ifndef CONFIG_ARCH_OMAP1 |
714 | if (cpu_class_is_omap2()) { | 715 | if (cpu_class_is_omap2()) { |
@@ -1888,11 +1889,11 @@ static int omap2_dma_handle_ch(int ch) | |||
1888 | status = dma_read(CSR(ch)); | 1889 | status = dma_read(CSR(ch)); |
1889 | } | 1890 | } |
1890 | 1891 | ||
1892 | dma_write(status, CSR(ch)); | ||
1893 | |||
1891 | if (likely(dma_chan[ch].callback != NULL)) | 1894 | if (likely(dma_chan[ch].callback != NULL)) |
1892 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); | 1895 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); |
1893 | 1896 | ||
1894 | dma_write(status, CSR(ch)); | ||
1895 | |||
1896 | return 0; | 1897 | return 0; |
1897 | } | 1898 | } |
1898 | 1899 | ||
diff --git a/arch/arm/plat-omap/include/mach/cpu.h b/arch/arm/plat-omap/include/mach/cpu.h index b2062f1175de..a8e1178a9468 100644 --- a/arch/arm/plat-omap/include/mach/cpu.h +++ b/arch/arm/plat-omap/include/mach/cpu.h | |||
@@ -339,6 +339,7 @@ IS_OMAP_TYPE(3430, 0x3430) | |||
339 | #define OMAP3430_REV_ES2_0 0x34301034 | 339 | #define OMAP3430_REV_ES2_0 0x34301034 |
340 | #define OMAP3430_REV_ES2_1 0x34302034 | 340 | #define OMAP3430_REV_ES2_1 0x34302034 |
341 | #define OMAP3430_REV_ES3_0 0x34303034 | 341 | #define OMAP3430_REV_ES3_0 0x34303034 |
342 | #define OMAP3430_REV_ES3_1 0x34304034 | ||
342 | 343 | ||
343 | /* | 344 | /* |
344 | * omap_chip bits | 345 | * omap_chip bits |
diff --git a/arch/arm/plat-omap/include/mach/mcbsp.h b/arch/arm/plat-omap/include/mach/mcbsp.h index eef873db3d48..113c2466c86a 100644 --- a/arch/arm/plat-omap/include/mach/mcbsp.h +++ b/arch/arm/plat-omap/include/mach/mcbsp.h | |||
@@ -344,7 +344,8 @@ struct omap_mcbsp_platform_data { | |||
344 | u8 dma_rx_sync, dma_tx_sync; | 344 | u8 dma_rx_sync, dma_tx_sync; |
345 | u16 rx_irq, tx_irq; | 345 | u16 rx_irq, tx_irq; |
346 | struct omap_mcbsp_ops *ops; | 346 | struct omap_mcbsp_ops *ops; |
347 | char const *clk_name; | 347 | char const **clk_names; |
348 | int num_clks; | ||
348 | }; | 349 | }; |
349 | 350 | ||
350 | struct omap_mcbsp { | 351 | struct omap_mcbsp { |
@@ -376,7 +377,8 @@ struct omap_mcbsp { | |||
376 | /* Protect the field .free, while checking if the mcbsp is in use */ | 377 | /* Protect the field .free, while checking if the mcbsp is in use */ |
377 | spinlock_t lock; | 378 | spinlock_t lock; |
378 | struct omap_mcbsp_platform_data *pdata; | 379 | struct omap_mcbsp_platform_data *pdata; |
379 | struct clk *clk; | 380 | struct clk **clks; |
381 | int num_clks; | ||
380 | }; | 382 | }; |
381 | extern struct omap_mcbsp **mcbsp_ptr; | 383 | extern struct omap_mcbsp **mcbsp_ptr; |
382 | extern int omap_mcbsp_count; | 384 | extern int omap_mcbsp_count; |
diff --git a/arch/arm/plat-omap/include/mach/mmc.h b/arch/arm/plat-omap/include/mach/mmc.h index 031250f02805..73a9e15031b1 100644 --- a/arch/arm/plat-omap/include/mach/mmc.h +++ b/arch/arm/plat-omap/include/mach/mmc.h | |||
@@ -115,8 +115,9 @@ void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
115 | int nr_controllers); | 115 | int nr_controllers); |
116 | void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | 116 | void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, |
117 | int nr_controllers); | 117 | int nr_controllers); |
118 | int omap_mmc_add(int id, unsigned long base, unsigned long size, | 118 | int omap_mmc_add(const char *name, int id, unsigned long base, |
119 | unsigned int irq, struct omap_mmc_platform_data *data); | 119 | unsigned long size, unsigned int irq, |
120 | struct omap_mmc_platform_data *data); | ||
120 | #else | 121 | #else |
121 | static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, | 122 | static inline void omap1_init_mmc(struct omap_mmc_platform_data **mmc_data, |
122 | int nr_controllers) | 123 | int nr_controllers) |
@@ -126,8 +127,9 @@ static inline void omap2_init_mmc(struct omap_mmc_platform_data **mmc_data, | |||
126 | int nr_controllers) | 127 | int nr_controllers) |
127 | { | 128 | { |
128 | } | 129 | } |
129 | static inline int omap_mmc_add(int id, unsigned long base, unsigned long size, | 130 | static inline int omap_mmc_add(const char *name, int id, unsigned long base, |
130 | unsigned int irq, struct omap_mmc_platform_data *data) | 131 | unsigned long size, unsigned int irq, |
132 | struct omap_mmc_platform_data *data) | ||
131 | { | 133 | { |
132 | return 0; | 134 | return 0; |
133 | } | 135 | } |
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c index f2401a831f99..e5842e30e534 100644 --- a/arch/arm/plat-omap/mcbsp.c +++ b/arch/arm/plat-omap/mcbsp.c | |||
@@ -214,6 +214,7 @@ EXPORT_SYMBOL(omap_mcbsp_set_io_type); | |||
214 | int omap_mcbsp_request(unsigned int id) | 214 | int omap_mcbsp_request(unsigned int id) |
215 | { | 215 | { |
216 | struct omap_mcbsp *mcbsp; | 216 | struct omap_mcbsp *mcbsp; |
217 | int i; | ||
217 | int err; | 218 | int err; |
218 | 219 | ||
219 | if (!omap_mcbsp_check_valid_id(id)) { | 220 | if (!omap_mcbsp_check_valid_id(id)) { |
@@ -225,7 +226,8 @@ int omap_mcbsp_request(unsigned int id) | |||
225 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request) | 226 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->request) |
226 | mcbsp->pdata->ops->request(id); | 227 | mcbsp->pdata->ops->request(id); |
227 | 228 | ||
228 | clk_enable(mcbsp->clk); | 229 | for (i = 0; i < mcbsp->num_clks; i++) |
230 | clk_enable(mcbsp->clks[i]); | ||
229 | 231 | ||
230 | spin_lock(&mcbsp->lock); | 232 | spin_lock(&mcbsp->lock); |
231 | if (!mcbsp->free) { | 233 | if (!mcbsp->free) { |
@@ -276,6 +278,7 @@ EXPORT_SYMBOL(omap_mcbsp_request); | |||
276 | void omap_mcbsp_free(unsigned int id) | 278 | void omap_mcbsp_free(unsigned int id) |
277 | { | 279 | { |
278 | struct omap_mcbsp *mcbsp; | 280 | struct omap_mcbsp *mcbsp; |
281 | int i; | ||
279 | 282 | ||
280 | if (!omap_mcbsp_check_valid_id(id)) { | 283 | if (!omap_mcbsp_check_valid_id(id)) { |
281 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); | 284 | printk(KERN_ERR "%s: Invalid id (%d)\n", __func__, id + 1); |
@@ -286,7 +289,8 @@ void omap_mcbsp_free(unsigned int id) | |||
286 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) | 289 | if (mcbsp->pdata && mcbsp->pdata->ops && mcbsp->pdata->ops->free) |
287 | mcbsp->pdata->ops->free(id); | 290 | mcbsp->pdata->ops->free(id); |
288 | 291 | ||
289 | clk_disable(mcbsp->clk); | 292 | for (i = mcbsp->num_clks - 1; i >= 0; i--) |
293 | clk_disable(mcbsp->clks[i]); | ||
290 | 294 | ||
291 | spin_lock(&mcbsp->lock); | 295 | spin_lock(&mcbsp->lock); |
292 | if (mcbsp->free) { | 296 | if (mcbsp->free) { |
@@ -872,6 +876,7 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
872 | struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data; | 876 | struct omap_mcbsp_platform_data *pdata = pdev->dev.platform_data; |
873 | struct omap_mcbsp *mcbsp; | 877 | struct omap_mcbsp *mcbsp; |
874 | int id = pdev->id - 1; | 878 | int id = pdev->id - 1; |
879 | int i; | ||
875 | int ret = 0; | 880 | int ret = 0; |
876 | 881 | ||
877 | if (!pdata) { | 882 | if (!pdata) { |
@@ -916,14 +921,25 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
916 | mcbsp->dma_rx_sync = pdata->dma_rx_sync; | 921 | mcbsp->dma_rx_sync = pdata->dma_rx_sync; |
917 | mcbsp->dma_tx_sync = pdata->dma_tx_sync; | 922 | mcbsp->dma_tx_sync = pdata->dma_tx_sync; |
918 | 923 | ||
919 | if (pdata->clk_name) | 924 | if (pdata->num_clks) { |
920 | mcbsp->clk = clk_get(&pdev->dev, pdata->clk_name); | 925 | mcbsp->num_clks = pdata->num_clks; |
921 | if (IS_ERR(mcbsp->clk)) { | 926 | mcbsp->clks = kzalloc(mcbsp->num_clks * sizeof(struct clk *), |
922 | dev_err(&pdev->dev, | 927 | GFP_KERNEL); |
923 | "Invalid clock configuration for McBSP%d.\n", | 928 | if (!mcbsp->clks) { |
924 | mcbsp->id); | 929 | ret = -ENOMEM; |
925 | ret = PTR_ERR(mcbsp->clk); | 930 | goto exit; |
926 | goto err_clk; | 931 | } |
932 | for (i = 0; i < mcbsp->num_clks; i++) { | ||
933 | mcbsp->clks[i] = clk_get(&pdev->dev, pdata->clk_names[i]); | ||
934 | if (IS_ERR(mcbsp->clks[i])) { | ||
935 | dev_err(&pdev->dev, | ||
936 | "Invalid %s configuration for McBSP%d.\n", | ||
937 | pdata->clk_names[i], mcbsp->id); | ||
938 | ret = PTR_ERR(mcbsp->clks[i]); | ||
939 | goto err_clk; | ||
940 | } | ||
941 | } | ||
942 | |||
927 | } | 943 | } |
928 | 944 | ||
929 | mcbsp->pdata = pdata; | 945 | mcbsp->pdata = pdata; |
@@ -932,6 +948,9 @@ static int __devinit omap_mcbsp_probe(struct platform_device *pdev) | |||
932 | return 0; | 948 | return 0; |
933 | 949 | ||
934 | err_clk: | 950 | err_clk: |
951 | while (i--) | ||
952 | clk_put(mcbsp->clks[i]); | ||
953 | kfree(mcbsp->clks); | ||
935 | iounmap(mcbsp->io_base); | 954 | iounmap(mcbsp->io_base); |
936 | err_ioremap: | 955 | err_ioremap: |
937 | mcbsp->free = 0; | 956 | mcbsp->free = 0; |
@@ -942,6 +961,7 @@ exit: | |||
942 | static int __devexit omap_mcbsp_remove(struct platform_device *pdev) | 961 | static int __devexit omap_mcbsp_remove(struct platform_device *pdev) |
943 | { | 962 | { |
944 | struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); | 963 | struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev); |
964 | int i; | ||
945 | 965 | ||
946 | platform_set_drvdata(pdev, NULL); | 966 | platform_set_drvdata(pdev, NULL); |
947 | if (mcbsp) { | 967 | if (mcbsp) { |
@@ -950,12 +970,18 @@ static int __devexit omap_mcbsp_remove(struct platform_device *pdev) | |||
950 | mcbsp->pdata->ops->free) | 970 | mcbsp->pdata->ops->free) |
951 | mcbsp->pdata->ops->free(mcbsp->id); | 971 | mcbsp->pdata->ops->free(mcbsp->id); |
952 | 972 | ||
953 | clk_disable(mcbsp->clk); | 973 | for (i = mcbsp->num_clks - 1; i >= 0; i--) { |
954 | clk_put(mcbsp->clk); | 974 | clk_disable(mcbsp->clks[i]); |
975 | clk_put(mcbsp->clks[i]); | ||
976 | } | ||
955 | 977 | ||
956 | iounmap(mcbsp->io_base); | 978 | iounmap(mcbsp->io_base); |
957 | 979 | ||
958 | mcbsp->clk = NULL; | 980 | if (mcbsp->num_clks) { |
981 | kfree(mcbsp->clks); | ||
982 | mcbsp->clks = NULL; | ||
983 | mcbsp->num_clks = 0; | ||
984 | } | ||
959 | mcbsp->free = 0; | 985 | mcbsp->free = 0; |
960 | mcbsp->dev = NULL; | 986 | mcbsp->dev = NULL; |
961 | } | 987 | } |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index a949c4fbbddd..8f1f97d56e1e 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -169,26 +169,51 @@ config BF542 | |||
169 | help | 169 | help |
170 | BF542 Processor Support. | 170 | BF542 Processor Support. |
171 | 171 | ||
172 | config BF542M | ||
173 | bool "BF542m" | ||
174 | help | ||
175 | BF542 Processor Support. | ||
176 | |||
172 | config BF544 | 177 | config BF544 |
173 | bool "BF544" | 178 | bool "BF544" |
174 | help | 179 | help |
175 | BF544 Processor Support. | 180 | BF544 Processor Support. |
176 | 181 | ||
182 | config BF544M | ||
183 | bool "BF544m" | ||
184 | help | ||
185 | BF544 Processor Support. | ||
186 | |||
177 | config BF547 | 187 | config BF547 |
178 | bool "BF547" | 188 | bool "BF547" |
179 | help | 189 | help |
180 | BF547 Processor Support. | 190 | BF547 Processor Support. |
181 | 191 | ||
192 | config BF547M | ||
193 | bool "BF547m" | ||
194 | help | ||
195 | BF547 Processor Support. | ||
196 | |||
182 | config BF548 | 197 | config BF548 |
183 | bool "BF548" | 198 | bool "BF548" |
184 | help | 199 | help |
185 | BF548 Processor Support. | 200 | BF548 Processor Support. |
186 | 201 | ||
202 | config BF548M | ||
203 | bool "BF548m" | ||
204 | help | ||
205 | BF548 Processor Support. | ||
206 | |||
187 | config BF549 | 207 | config BF549 |
188 | bool "BF549" | 208 | bool "BF549" |
189 | help | 209 | help |
190 | BF549 Processor Support. | 210 | BF549 Processor Support. |
191 | 211 | ||
212 | config BF549M | ||
213 | bool "BF549m" | ||
214 | help | ||
215 | BF549 Processor Support. | ||
216 | |||
192 | config BF561 | 217 | config BF561 |
193 | bool "BF561" | 218 | bool "BF561" |
194 | help | 219 | help |
@@ -224,39 +249,39 @@ config TICK_SOURCE_SYSTMR0 | |||
224 | 249 | ||
225 | config BF_REV_MIN | 250 | config BF_REV_MIN |
226 | int | 251 | int |
227 | default 0 if (BF51x || BF52x || BF54x) | 252 | default 0 if (BF51x || BF52x || (BF54x && !BF54xM)) |
228 | default 2 if (BF537 || BF536 || BF534) | 253 | default 2 if (BF537 || BF536 || BF534) |
229 | default 3 if (BF561 ||BF533 || BF532 || BF531) | 254 | default 3 if (BF561 || BF533 || BF532 || BF531 || BF54xM) |
230 | default 4 if (BF538 || BF539) | 255 | default 4 if (BF538 || BF539) |
231 | 256 | ||
232 | config BF_REV_MAX | 257 | config BF_REV_MAX |
233 | int | 258 | int |
234 | default 2 if (BF51x || BF52x || BF54x) | 259 | default 2 if (BF51x || BF52x || (BF54x && !BF54xM)) |
235 | default 3 if (BF537 || BF536 || BF534) | 260 | default 3 if (BF537 || BF536 || BF534 || BF54xM) |
236 | default 5 if (BF561 || BF538 || BF539) | 261 | default 5 if (BF561 || BF538 || BF539) |
237 | default 6 if (BF533 || BF532 || BF531) | 262 | default 6 if (BF533 || BF532 || BF531) |
238 | 263 | ||
239 | choice | 264 | choice |
240 | prompt "Silicon Rev" | 265 | prompt "Silicon Rev" |
241 | default BF_REV_0_1 if (BF51x || BF52x || BF54x) | 266 | default BF_REV_0_1 if (BF51x || BF52x || (BF54x && !BF54xM)) |
242 | default BF_REV_0_2 if (BF534 || BF536 || BF537) | 267 | default BF_REV_0_2 if (BF534 || BF536 || BF537) |
243 | default BF_REV_0_3 if (BF531 || BF532 || BF533 || BF561) | 268 | default BF_REV_0_3 if (BF531 || BF532 || BF533 || BF54xM || BF561) |
244 | 269 | ||
245 | config BF_REV_0_0 | 270 | config BF_REV_0_0 |
246 | bool "0.0" | 271 | bool "0.0" |
247 | depends on (BF51x || BF52x || BF54x) | 272 | depends on (BF51x || BF52x || (BF54x && !BF54xM)) |
248 | 273 | ||
249 | config BF_REV_0_1 | 274 | config BF_REV_0_1 |
250 | bool "0.1" | 275 | bool "0.1" |
251 | depends on (BF52x || BF54x) | 276 | depends on (BF52x || (BF54x && !BF54xM)) |
252 | 277 | ||
253 | config BF_REV_0_2 | 278 | config BF_REV_0_2 |
254 | bool "0.2" | 279 | bool "0.2" |
255 | depends on (BF52x || BF537 || BF536 || BF534 || BF54x) | 280 | depends on (BF52x || BF537 || BF536 || BF534 || (BF54x && !BF54xM)) |
256 | 281 | ||
257 | config BF_REV_0_3 | 282 | config BF_REV_0_3 |
258 | bool "0.3" | 283 | bool "0.3" |
259 | depends on (BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) | 284 | depends on (BF54xM || BF561 || BF537 || BF536 || BF534 || BF533 || BF532 || BF531) |
260 | 285 | ||
261 | config BF_REV_0_4 | 286 | config BF_REV_0_4 |
262 | bool "0.4" | 287 | bool "0.4" |
@@ -293,9 +318,14 @@ config BF53x | |||
293 | depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) | 318 | depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537) |
294 | default y | 319 | default y |
295 | 320 | ||
321 | config BF54xM | ||
322 | bool | ||
323 | depends on (BF542M || BF544M || BF547M || BF548M || BF549M) | ||
324 | default y | ||
325 | |||
296 | config BF54x | 326 | config BF54x |
297 | bool | 327 | bool |
298 | depends on (BF542 || BF544 || BF547 || BF548 || BF549) | 328 | depends on (BF542 || BF544 || BF547 || BF548 || BF549 || BF54xM) |
299 | default y | 329 | default y |
300 | 330 | ||
301 | config MEM_GENERIC_BOARD | 331 | config MEM_GENERIC_BOARD |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index e550c8d46066..d54c8283825c 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -21,57 +21,67 @@ KALLSYMS += --symbol-prefix=_ | |||
21 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig | 21 | KBUILD_DEFCONFIG := BF537-STAMP_defconfig |
22 | 22 | ||
23 | # setup the machine name and the machine dependent settings | 23 | # setup the machine name and the machine dependent settings |
24 | machine-$(CONFIG_BF512) := bf518 | 24 | machine-$(CONFIG_BF512) := bf518 |
25 | machine-$(CONFIG_BF514) := bf518 | 25 | machine-$(CONFIG_BF514) := bf518 |
26 | machine-$(CONFIG_BF516) := bf518 | 26 | machine-$(CONFIG_BF516) := bf518 |
27 | machine-$(CONFIG_BF518) := bf518 | 27 | machine-$(CONFIG_BF518) := bf518 |
28 | machine-$(CONFIG_BF522) := bf527 | 28 | machine-$(CONFIG_BF522) := bf527 |
29 | machine-$(CONFIG_BF523) := bf527 | 29 | machine-$(CONFIG_BF523) := bf527 |
30 | machine-$(CONFIG_BF524) := bf527 | 30 | machine-$(CONFIG_BF524) := bf527 |
31 | machine-$(CONFIG_BF525) := bf527 | 31 | machine-$(CONFIG_BF525) := bf527 |
32 | machine-$(CONFIG_BF526) := bf527 | 32 | machine-$(CONFIG_BF526) := bf527 |
33 | machine-$(CONFIG_BF527) := bf527 | 33 | machine-$(CONFIG_BF527) := bf527 |
34 | machine-$(CONFIG_BF531) := bf533 | 34 | machine-$(CONFIG_BF531) := bf533 |
35 | machine-$(CONFIG_BF532) := bf533 | 35 | machine-$(CONFIG_BF532) := bf533 |
36 | machine-$(CONFIG_BF533) := bf533 | 36 | machine-$(CONFIG_BF533) := bf533 |
37 | machine-$(CONFIG_BF534) := bf537 | 37 | machine-$(CONFIG_BF534) := bf537 |
38 | machine-$(CONFIG_BF536) := bf537 | 38 | machine-$(CONFIG_BF536) := bf537 |
39 | machine-$(CONFIG_BF537) := bf537 | 39 | machine-$(CONFIG_BF537) := bf537 |
40 | machine-$(CONFIG_BF538) := bf538 | 40 | machine-$(CONFIG_BF538) := bf538 |
41 | machine-$(CONFIG_BF539) := bf538 | 41 | machine-$(CONFIG_BF539) := bf538 |
42 | machine-$(CONFIG_BF542) := bf548 | 42 | machine-$(CONFIG_BF542) := bf548 |
43 | machine-$(CONFIG_BF544) := bf548 | 43 | machine-$(CONFIG_BF542M) := bf548 |
44 | machine-$(CONFIG_BF547) := bf548 | 44 | machine-$(CONFIG_BF544) := bf548 |
45 | machine-$(CONFIG_BF548) := bf548 | 45 | machine-$(CONFIG_BF544M) := bf548 |
46 | machine-$(CONFIG_BF549) := bf548 | 46 | machine-$(CONFIG_BF547) := bf548 |
47 | machine-$(CONFIG_BF561) := bf561 | 47 | machine-$(CONFIG_BF547M) := bf548 |
48 | machine-$(CONFIG_BF548) := bf548 | ||
49 | machine-$(CONFIG_BF548M) := bf548 | ||
50 | machine-$(CONFIG_BF549) := bf548 | ||
51 | machine-$(CONFIG_BF549M) := bf548 | ||
52 | machine-$(CONFIG_BF561) := bf561 | ||
48 | MACHINE := $(machine-y) | 53 | MACHINE := $(machine-y) |
49 | export MACHINE | 54 | export MACHINE |
50 | 55 | ||
51 | cpu-$(CONFIG_BF512) := bf512 | 56 | cpu-$(CONFIG_BF512) := bf512 |
52 | cpu-$(CONFIG_BF514) := bf514 | 57 | cpu-$(CONFIG_BF514) := bf514 |
53 | cpu-$(CONFIG_BF516) := bf516 | 58 | cpu-$(CONFIG_BF516) := bf516 |
54 | cpu-$(CONFIG_BF518) := bf518 | 59 | cpu-$(CONFIG_BF518) := bf518 |
55 | cpu-$(CONFIG_BF522) := bf522 | 60 | cpu-$(CONFIG_BF522) := bf522 |
56 | cpu-$(CONFIG_BF523) := bf523 | 61 | cpu-$(CONFIG_BF523) := bf523 |
57 | cpu-$(CONFIG_BF524) := bf524 | 62 | cpu-$(CONFIG_BF524) := bf524 |
58 | cpu-$(CONFIG_BF525) := bf525 | 63 | cpu-$(CONFIG_BF525) := bf525 |
59 | cpu-$(CONFIG_BF526) := bf526 | 64 | cpu-$(CONFIG_BF526) := bf526 |
60 | cpu-$(CONFIG_BF527) := bf527 | 65 | cpu-$(CONFIG_BF527) := bf527 |
61 | cpu-$(CONFIG_BF531) := bf531 | 66 | cpu-$(CONFIG_BF531) := bf531 |
62 | cpu-$(CONFIG_BF532) := bf532 | 67 | cpu-$(CONFIG_BF532) := bf532 |
63 | cpu-$(CONFIG_BF533) := bf533 | 68 | cpu-$(CONFIG_BF533) := bf533 |
64 | cpu-$(CONFIG_BF534) := bf534 | 69 | cpu-$(CONFIG_BF534) := bf534 |
65 | cpu-$(CONFIG_BF536) := bf536 | 70 | cpu-$(CONFIG_BF536) := bf536 |
66 | cpu-$(CONFIG_BF537) := bf537 | 71 | cpu-$(CONFIG_BF537) := bf537 |
67 | cpu-$(CONFIG_BF538) := bf538 | 72 | cpu-$(CONFIG_BF538) := bf538 |
68 | cpu-$(CONFIG_BF539) := bf539 | 73 | cpu-$(CONFIG_BF539) := bf539 |
69 | cpu-$(CONFIG_BF542) := bf542 | 74 | cpu-$(CONFIG_BF542) := bf542 |
70 | cpu-$(CONFIG_BF544) := bf544 | 75 | cpu-$(CONFIG_BF542M) := bf542m |
71 | cpu-$(CONFIG_BF547) := bf547 | 76 | cpu-$(CONFIG_BF544) := bf544 |
72 | cpu-$(CONFIG_BF548) := bf548 | 77 | cpu-$(CONFIG_BF544M) := bf544m |
73 | cpu-$(CONFIG_BF549) := bf549 | 78 | cpu-$(CONFIG_BF547) := bf547 |
74 | cpu-$(CONFIG_BF561) := bf561 | 79 | cpu-$(CONFIG_BF547M) := bf547m |
80 | cpu-$(CONFIG_BF548) := bf548 | ||
81 | cpu-$(CONFIG_BF548M) := bf548m | ||
82 | cpu-$(CONFIG_BF549) := bf549 | ||
83 | cpu-$(CONFIG_BF549M) := bf549m | ||
84 | cpu-$(CONFIG_BF561) := bf561 | ||
75 | 85 | ||
76 | rev-$(CONFIG_BF_REV_0_0) := 0.0 | 86 | rev-$(CONFIG_BF_REV_0_0) := 0.0 |
77 | rev-$(CONFIG_BF_REV_0_1) := 0.1 | 87 | rev-$(CONFIG_BF_REV_0_1) := 0.1 |
diff --git a/arch/blackfin/configs/BF518F-EZBRD_defconfig b/arch/blackfin/configs/BF518F-EZBRD_defconfig index defb9785c65b..4fdb9e04759f 100644 --- a/arch/blackfin/configs/BF518F-EZBRD_defconfig +++ b/arch/blackfin/configs/BF518F-EZBRD_defconfig | |||
@@ -1,6 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc2 | 3 | # Linux kernel version: 2.6.28-rc2 |
4 | # Fri Jan 9 17:58:41 2009 | ||
4 | # | 5 | # |
5 | # CONFIG_MMU is not set | 6 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 7 | # CONFIG_FPU is not set |
@@ -149,6 +150,7 @@ CONFIG_BF_REV_0_0=y | |||
149 | # CONFIG_BF_REV_ANY is not set | 150 | # CONFIG_BF_REV_ANY is not set |
150 | # CONFIG_BF_REV_NONE is not set | 151 | # CONFIG_BF_REV_NONE is not set |
151 | CONFIG_BF51x=y | 152 | CONFIG_BF51x=y |
153 | CONFIG_MEM_MT48LC32M8A2_75=y | ||
152 | CONFIG_BFIN518F_EZBRD=y | 154 | CONFIG_BFIN518F_EZBRD=y |
153 | 155 | ||
154 | # | 156 | # |
@@ -598,7 +600,10 @@ CONFIG_PHYLIB=y | |||
598 | # CONFIG_MDIO_BITBANG is not set | 600 | # CONFIG_MDIO_BITBANG is not set |
599 | CONFIG_NET_ETHERNET=y | 601 | CONFIG_NET_ETHERNET=y |
600 | CONFIG_MII=y | 602 | CONFIG_MII=y |
601 | # CONFIG_BFIN_MAC is not set | 603 | CONFIG_BFIN_MAC=y |
604 | CONFIG_BFIN_TX_DESC_NUM=10 | ||
605 | CONFIG_BFIN_RX_DESC_NUM=20 | ||
606 | # CONFIG_BFIN_MAC_RMII is not set | ||
602 | # CONFIG_SMC91X is not set | 607 | # CONFIG_SMC91X is not set |
603 | # CONFIG_SMSC911X is not set | 608 | # CONFIG_SMSC911X is not set |
604 | # CONFIG_DM9000 is not set | 609 | # CONFIG_DM9000 is not set |
@@ -679,7 +684,7 @@ CONFIG_VT_CONSOLE=y | |||
679 | CONFIG_HW_CONSOLE=y | 684 | CONFIG_HW_CONSOLE=y |
680 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 685 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
681 | # CONFIG_DEVKMEM is not set | 686 | # CONFIG_DEVKMEM is not set |
682 | # CONFIG_BFIN_JTAG_COMM is not set | 687 | CONFIG_BFIN_JTAG_COMM=m |
683 | # CONFIG_SERIAL_NONSTANDARD is not set | 688 | # CONFIG_SERIAL_NONSTANDARD is not set |
684 | 689 | ||
685 | # | 690 | # |
diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig index 992424ff3153..8e2b855b8db7 100644 --- a/arch/blackfin/configs/BF526-EZBRD_defconfig +++ b/arch/blackfin/configs/BF526-EZBRD_defconfig | |||
@@ -723,7 +723,7 @@ CONFIG_VT_CONSOLE=y | |||
723 | CONFIG_HW_CONSOLE=y | 723 | CONFIG_HW_CONSOLE=y |
724 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 724 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
725 | # CONFIG_DEVKMEM is not set | 725 | # CONFIG_DEVKMEM is not set |
726 | # CONFIG_BFIN_JTAG_COMM is not set | 726 | CONFIG_BFIN_JTAG_COMM=m |
727 | # CONFIG_SERIAL_NONSTANDARD is not set | 727 | # CONFIG_SERIAL_NONSTANDARD is not set |
728 | 728 | ||
729 | # | 729 | # |
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig index 21e3c1af55ba..833128b39724 100644 --- a/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
@@ -767,7 +767,7 @@ CONFIG_VT_CONSOLE=y | |||
767 | CONFIG_HW_CONSOLE=y | 767 | CONFIG_HW_CONSOLE=y |
768 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 768 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
769 | # CONFIG_DEVKMEM is not set | 769 | # CONFIG_DEVKMEM is not set |
770 | # CONFIG_BFIN_JTAG_COMM is not set | 770 | CONFIG_BFIN_JTAG_COMM=m |
771 | # CONFIG_SERIAL_NONSTANDARD is not set | 771 | # CONFIG_SERIAL_NONSTANDARD is not set |
772 | 772 | ||
773 | # | 773 | # |
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig index 0bdf20a1af61..334c94b51c40 100644 --- a/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/arch/blackfin/configs/BF533-EZKIT_defconfig | |||
@@ -672,7 +672,7 @@ CONFIG_BFIN_DMA_INTERFACE=m | |||
672 | CONFIG_SIMPLE_GPIO=m | 672 | CONFIG_SIMPLE_GPIO=m |
673 | # CONFIG_VT is not set | 673 | # CONFIG_VT is not set |
674 | # CONFIG_DEVKMEM is not set | 674 | # CONFIG_DEVKMEM is not set |
675 | # CONFIG_BFIN_JTAG_COMM is not set | 675 | CONFIG_BFIN_JTAG_COMM=m |
676 | # CONFIG_SERIAL_NONSTANDARD is not set | 676 | # CONFIG_SERIAL_NONSTANDARD is not set |
677 | 677 | ||
678 | # | 678 | # |
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig index 2f747d6e97e2..9d733436e300 100644 --- a/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/arch/blackfin/configs/BF533-STAMP_defconfig | |||
@@ -679,7 +679,7 @@ CONFIG_BFIN_DMA_INTERFACE=m | |||
679 | CONFIG_SIMPLE_GPIO=m | 679 | CONFIG_SIMPLE_GPIO=m |
680 | # CONFIG_VT is not set | 680 | # CONFIG_VT is not set |
681 | # CONFIG_DEVKMEM is not set | 681 | # CONFIG_DEVKMEM is not set |
682 | # CONFIG_BFIN_JTAG_COMM is not set | 682 | CONFIG_BFIN_JTAG_COMM=m |
683 | # CONFIG_SERIAL_NONSTANDARD is not set | 683 | # CONFIG_SERIAL_NONSTANDARD is not set |
684 | 684 | ||
685 | # | 685 | # |
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig index 8b0a81294e65..4fb4108d3103 100644 --- a/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/arch/blackfin/configs/BF537-STAMP_defconfig | |||
@@ -722,7 +722,7 @@ CONFIG_BFIN_DMA_INTERFACE=m | |||
722 | CONFIG_SIMPLE_GPIO=m | 722 | CONFIG_SIMPLE_GPIO=m |
723 | # CONFIG_VT is not set | 723 | # CONFIG_VT is not set |
724 | # CONFIG_DEVKMEM is not set | 724 | # CONFIG_DEVKMEM is not set |
725 | # CONFIG_BFIN_JTAG_COMM is not set | 725 | CONFIG_BFIN_JTAG_COMM=m |
726 | # CONFIG_SERIAL_NONSTANDARD is not set | 726 | # CONFIG_SERIAL_NONSTANDARD is not set |
727 | 727 | ||
728 | # | 728 | # |
diff --git a/arch/blackfin/configs/BF538-EZKIT_defconfig b/arch/blackfin/configs/BF538-EZKIT_defconfig index a1f766bf7d9b..cb32f5624a1b 100644 --- a/arch/blackfin/configs/BF538-EZKIT_defconfig +++ b/arch/blackfin/configs/BF538-EZKIT_defconfig | |||
@@ -726,7 +726,7 @@ CONFIG_BFIN_DMA_INTERFACE=m | |||
726 | CONFIG_SIMPLE_GPIO=m | 726 | CONFIG_SIMPLE_GPIO=m |
727 | # CONFIG_VT is not set | 727 | # CONFIG_VT is not set |
728 | # CONFIG_DEVKMEM is not set | 728 | # CONFIG_DEVKMEM is not set |
729 | # CONFIG_BFIN_JTAG_COMM is not set | 729 | CONFIG_BFIN_JTAG_COMM=m |
730 | # CONFIG_SERIAL_NONSTANDARD is not set | 730 | # CONFIG_SERIAL_NONSTANDARD is not set |
731 | 731 | ||
732 | # | 732 | # |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index cd2da6b7692c..0f8697618aa5 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
@@ -856,7 +856,7 @@ CONFIG_VT_CONSOLE=y | |||
856 | CONFIG_HW_CONSOLE=y | 856 | CONFIG_HW_CONSOLE=y |
857 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | 857 | # CONFIG_VT_HW_CONSOLE_BINDING is not set |
858 | # CONFIG_DEVKMEM is not set | 858 | # CONFIG_DEVKMEM is not set |
859 | # CONFIG_BFIN_JTAG_COMM is not set | 859 | CONFIG_BFIN_JTAG_COMM=m |
860 | # CONFIG_SERIAL_NONSTANDARD is not set | 860 | # CONFIG_SERIAL_NONSTANDARD is not set |
861 | 861 | ||
862 | # | 862 | # |
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index b398ca202dbd..042c7adfccfa 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig | |||
@@ -709,7 +709,7 @@ CONFIG_BFIN_DMA_INTERFACE=m | |||
709 | CONFIG_SIMPLE_GPIO=m | 709 | CONFIG_SIMPLE_GPIO=m |
710 | # CONFIG_VT is not set | 710 | # CONFIG_VT is not set |
711 | # CONFIG_DEVKMEM is not set | 711 | # CONFIG_DEVKMEM is not set |
712 | # CONFIG_BFIN_JTAG_COMM is not set | 712 | CONFIG_BFIN_JTAG_COMM=m |
713 | # CONFIG_SERIAL_NONSTANDARD is not set | 713 | # CONFIG_SERIAL_NONSTANDARD is not set |
714 | 714 | ||
715 | # | 715 | # |
diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig index 95146948166f..865ed85a5760 100644 --- a/arch/blackfin/configs/CM-BF527_defconfig +++ b/arch/blackfin/configs/CM-BF527_defconfig | |||
@@ -1,7 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.24.7 | 3 | # Linux kernel version: 2.6.28 |
4 | # Fri Jul 18 18:00:41 2008 | ||
5 | # | 4 | # |
6 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
7 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -9,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
10 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
11 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
12 | CONFIG_SEMAPHORE_SLEEPERS=y | ||
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 11 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 12 | CONFIG_GENERIC_HWEIGHT=y |
15 | CONFIG_GENERIC_HARDIRQS=y | 13 | CONFIG_GENERIC_HARDIRQS=y |
@@ -32,18 +30,16 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
32 | # CONFIG_POSIX_MQUEUE is not set | 30 | # CONFIG_POSIX_MQUEUE is not set |
33 | # CONFIG_BSD_PROCESS_ACCT is not set | 31 | # CONFIG_BSD_PROCESS_ACCT is not set |
34 | # CONFIG_TASKSTATS is not set | 32 | # CONFIG_TASKSTATS is not set |
35 | # CONFIG_USER_NS is not set | ||
36 | # CONFIG_PID_NS is not set | ||
37 | # CONFIG_AUDIT is not set | 33 | # CONFIG_AUDIT is not set |
38 | CONFIG_IKCONFIG=y | 34 | CONFIG_IKCONFIG=y |
39 | CONFIG_IKCONFIG_PROC=y | 35 | CONFIG_IKCONFIG_PROC=y |
40 | CONFIG_LOG_BUF_SHIFT=14 | 36 | CONFIG_LOG_BUF_SHIFT=14 |
41 | # CONFIG_CGROUPS is not set | 37 | # CONFIG_CGROUPS is not set |
42 | CONFIG_FAIR_GROUP_SCHED=y | 38 | # CONFIG_GROUP_SCHED is not set |
43 | CONFIG_FAIR_USER_SCHED=y | 39 | CONFIG_SYSFS_DEPRECATED=y |
44 | # CONFIG_FAIR_CGROUP_SCHED is not set | 40 | CONFIG_SYSFS_DEPRECATED_V2=y |
45 | # CONFIG_SYSFS_DEPRECATED is not set | ||
46 | # CONFIG_RELAY is not set | 41 | # CONFIG_RELAY is not set |
42 | # CONFIG_NAMESPACES is not set | ||
47 | CONFIG_BLK_DEV_INITRD=y | 43 | CONFIG_BLK_DEV_INITRD=y |
48 | CONFIG_INITRAMFS_SOURCE="" | 44 | CONFIG_INITRAMFS_SOURCE="" |
49 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 45 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -52,26 +48,35 @@ CONFIG_EMBEDDED=y | |||
52 | CONFIG_UID16=y | 48 | CONFIG_UID16=y |
53 | CONFIG_SYSCTL_SYSCALL=y | 49 | CONFIG_SYSCTL_SYSCALL=y |
54 | CONFIG_KALLSYMS=y | 50 | CONFIG_KALLSYMS=y |
51 | # CONFIG_KALLSYMS_ALL is not set | ||
55 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 52 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
56 | CONFIG_HOTPLUG=y | 53 | CONFIG_HOTPLUG=y |
57 | CONFIG_PRINTK=y | 54 | CONFIG_PRINTK=y |
58 | CONFIG_BUG=y | 55 | CONFIG_BUG=y |
59 | # CONFIG_ELF_CORE is not set | 56 | # CONFIG_ELF_CORE is not set |
57 | CONFIG_COMPAT_BRK=y | ||
60 | CONFIG_BASE_FULL=y | 58 | CONFIG_BASE_FULL=y |
61 | CONFIG_FUTEX=y | 59 | CONFIG_FUTEX=y |
62 | CONFIG_ANON_INODES=y | 60 | CONFIG_ANON_INODES=y |
63 | CONFIG_EPOLL=y | 61 | CONFIG_EPOLL=y |
64 | CONFIG_SIGNALFD=y | 62 | CONFIG_SIGNALFD=y |
63 | CONFIG_TIMERFD=y | ||
65 | CONFIG_EVENTFD=y | 64 | CONFIG_EVENTFD=y |
65 | CONFIG_AIO=y | ||
66 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
67 | CONFIG_SLAB=y | 67 | CONFIG_SLAB=y |
68 | # CONFIG_SLUB is not set | 68 | # CONFIG_SLUB is not set |
69 | # CONFIG_SLOB is not set | 69 | # CONFIG_SLOB is not set |
70 | # CONFIG_PROFILING is not set | ||
71 | # CONFIG_MARKERS is not set | ||
72 | CONFIG_HAVE_OPROFILE=y | ||
73 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | ||
70 | CONFIG_SLABINFO=y | 74 | CONFIG_SLABINFO=y |
71 | CONFIG_RT_MUTEXES=y | 75 | CONFIG_RT_MUTEXES=y |
72 | CONFIG_TINY_SHMEM=y | 76 | CONFIG_TINY_SHMEM=y |
73 | CONFIG_BASE_SMALL=0 | 77 | CONFIG_BASE_SMALL=0 |
74 | CONFIG_MODULES=y | 78 | CONFIG_MODULES=y |
79 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
75 | CONFIG_MODULE_UNLOAD=y | 80 | CONFIG_MODULE_UNLOAD=y |
76 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 81 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
77 | # CONFIG_MODVERSIONS is not set | 82 | # CONFIG_MODVERSIONS is not set |
@@ -82,6 +87,7 @@ CONFIG_BLOCK=y | |||
82 | # CONFIG_BLK_DEV_IO_TRACE is not set | 87 | # CONFIG_BLK_DEV_IO_TRACE is not set |
83 | # CONFIG_LSF is not set | 88 | # CONFIG_LSF is not set |
84 | # CONFIG_BLK_DEV_BSG is not set | 89 | # CONFIG_BLK_DEV_BSG is not set |
90 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
85 | 91 | ||
86 | # | 92 | # |
87 | # IO Schedulers | 93 | # IO Schedulers |
@@ -95,9 +101,11 @@ CONFIG_IOSCHED_CFQ=y | |||
95 | CONFIG_DEFAULT_CFQ=y | 101 | CONFIG_DEFAULT_CFQ=y |
96 | # CONFIG_DEFAULT_NOOP is not set | 102 | # CONFIG_DEFAULT_NOOP is not set |
97 | CONFIG_DEFAULT_IOSCHED="cfq" | 103 | CONFIG_DEFAULT_IOSCHED="cfq" |
104 | CONFIG_CLASSIC_RCU=y | ||
98 | # CONFIG_PREEMPT_NONE is not set | 105 | # CONFIG_PREEMPT_NONE is not set |
99 | CONFIG_PREEMPT_VOLUNTARY=y | 106 | CONFIG_PREEMPT_VOLUNTARY=y |
100 | # CONFIG_PREEMPT is not set | 107 | # CONFIG_PREEMPT is not set |
108 | # CONFIG_FREEZER is not set | ||
101 | 109 | ||
102 | # | 110 | # |
103 | # Blackfin Processor Options | 111 | # Blackfin Processor Options |
@@ -106,6 +114,10 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
106 | # | 114 | # |
107 | # Processor and Board Settings | 115 | # Processor and Board Settings |
108 | # | 116 | # |
117 | # CONFIG_BF512 is not set | ||
118 | # CONFIG_BF514 is not set | ||
119 | # CONFIG_BF516 is not set | ||
120 | # CONFIG_BF518 is not set | ||
109 | # CONFIG_BF522 is not set | 121 | # CONFIG_BF522 is not set |
110 | # CONFIG_BF523 is not set | 122 | # CONFIG_BF523 is not set |
111 | # CONFIG_BF524 is not set | 123 | # CONFIG_BF524 is not set |
@@ -118,48 +130,32 @@ CONFIG_BF527=y | |||
118 | # CONFIG_BF534 is not set | 130 | # CONFIG_BF534 is not set |
119 | # CONFIG_BF536 is not set | 131 | # CONFIG_BF536 is not set |
120 | # CONFIG_BF537 is not set | 132 | # CONFIG_BF537 is not set |
133 | # CONFIG_BF538 is not set | ||
134 | # CONFIG_BF539 is not set | ||
121 | # CONFIG_BF542 is not set | 135 | # CONFIG_BF542 is not set |
136 | # CONFIG_BF542M is not set | ||
122 | # CONFIG_BF544 is not set | 137 | # CONFIG_BF544 is not set |
138 | # CONFIG_BF544M is not set | ||
123 | # CONFIG_BF547 is not set | 139 | # CONFIG_BF547 is not set |
140 | # CONFIG_BF547M is not set | ||
124 | # CONFIG_BF548 is not set | 141 | # CONFIG_BF548 is not set |
142 | # CONFIG_BF548M is not set | ||
125 | # CONFIG_BF549 is not set | 143 | # CONFIG_BF549 is not set |
144 | # CONFIG_BF549M is not set | ||
126 | # CONFIG_BF561 is not set | 145 | # CONFIG_BF561 is not set |
146 | CONFIG_BF_REV_MIN=0 | ||
147 | CONFIG_BF_REV_MAX=2 | ||
127 | # CONFIG_BF_REV_0_0 is not set | 148 | # CONFIG_BF_REV_0_0 is not set |
128 | CONFIG_BF_REV_0_1=y | 149 | CONFIG_BF_REV_0_1=y |
129 | # CONFIG_BF_REV_0_2 is not set | 150 | # CONFIG_BF_REV_0_2 is not set |
130 | # CONFIG_BF_REV_0_3 is not set | 151 | # CONFIG_BF_REV_0_3 is not set |
131 | # CONFIG_BF_REV_0_4 is not set | 152 | # CONFIG_BF_REV_0_4 is not set |
132 | # CONFIG_BF_REV_0_5 is not set | 153 | # CONFIG_BF_REV_0_5 is not set |
154 | # CONFIG_BF_REV_0_6 is not set | ||
133 | # CONFIG_BF_REV_ANY is not set | 155 | # CONFIG_BF_REV_ANY is not set |
134 | # CONFIG_BF_REV_NONE is not set | 156 | # CONFIG_BF_REV_NONE is not set |
135 | CONFIG_BF52x=y | 157 | CONFIG_BF52x=y |
136 | CONFIG_MEM_MT48LC16M16A2TG_75=y | 158 | CONFIG_MEM_MT48LC16M16A2TG_75=y |
137 | # CONFIG_BFIN527_EZKIT is not set | ||
138 | CONFIG_BFIN527_BLUETECHNIX_CM=y | ||
139 | |||
140 | # | ||
141 | # BF527 Specific Configuration | ||
142 | # | ||
143 | |||
144 | # | ||
145 | # Alternative Multiplexing Scheme | ||
146 | # | ||
147 | # CONFIG_BF527_SPORT0_PORTF is not set | ||
148 | CONFIG_BF527_SPORT0_PORTG=y | ||
149 | CONFIG_BF527_SPORT0_TSCLK_PG10=y | ||
150 | # CONFIG_BF527_SPORT0_TSCLK_PG14 is not set | ||
151 | CONFIG_BF527_UART1_PORTF=y | ||
152 | # CONFIG_BF527_UART1_PORTG is not set | ||
153 | # CONFIG_BF527_NAND_D_PORTF is not set | ||
154 | CONFIG_BF527_NAND_D_PORTH=y | ||
155 | |||
156 | # | ||
157 | # Interrupt Priority Assignment | ||
158 | # | ||
159 | |||
160 | # | ||
161 | # Priority | ||
162 | # | ||
163 | CONFIG_IRQ_PLL_WAKEUP=7 | 159 | CONFIG_IRQ_PLL_WAKEUP=7 |
164 | CONFIG_IRQ_DMA0_ERROR=7 | 160 | CONFIG_IRQ_DMA0_ERROR=7 |
165 | CONFIG_IRQ_DMAR0_BLK=7 | 161 | CONFIG_IRQ_DMAR0_BLK=7 |
@@ -179,7 +175,6 @@ CONFIG_IRQ_SPORT0_TX=9 | |||
179 | CONFIG_IRQ_SPORT1_RX=9 | 175 | CONFIG_IRQ_SPORT1_RX=9 |
180 | CONFIG_IRQ_SPORT1_TX=9 | 176 | CONFIG_IRQ_SPORT1_TX=9 |
181 | CONFIG_IRQ_TWI=10 | 177 | CONFIG_IRQ_TWI=10 |
182 | CONFIG_IRQ_SPI=10 | ||
183 | CONFIG_IRQ_UART0_RX=10 | 178 | CONFIG_IRQ_UART0_RX=10 |
184 | CONFIG_IRQ_UART0_TX=10 | 179 | CONFIG_IRQ_UART0_TX=10 |
185 | CONFIG_IRQ_UART1_RX=10 | 180 | CONFIG_IRQ_UART1_RX=10 |
@@ -205,6 +200,34 @@ CONFIG_IRQ_MEM_DMA1=13 | |||
205 | CONFIG_IRQ_WATCH=13 | 200 | CONFIG_IRQ_WATCH=13 |
206 | CONFIG_IRQ_PORTF_INTA=13 | 201 | CONFIG_IRQ_PORTF_INTA=13 |
207 | CONFIG_IRQ_PORTF_INTB=13 | 202 | CONFIG_IRQ_PORTF_INTB=13 |
203 | # CONFIG_BFIN527_EZKIT is not set | ||
204 | CONFIG_BFIN527_BLUETECHNIX_CM=y | ||
205 | # CONFIG_BFIN526_EZBRD is not set | ||
206 | |||
207 | # | ||
208 | # BF527 Specific Configuration | ||
209 | # | ||
210 | |||
211 | # | ||
212 | # Alternative Multiplexing Scheme | ||
213 | # | ||
214 | # CONFIG_BF527_SPORT0_PORTF is not set | ||
215 | CONFIG_BF527_SPORT0_PORTG=y | ||
216 | CONFIG_BF527_SPORT0_TSCLK_PG10=y | ||
217 | # CONFIG_BF527_SPORT0_TSCLK_PG14 is not set | ||
218 | CONFIG_BF527_UART1_PORTF=y | ||
219 | # CONFIG_BF527_UART1_PORTG is not set | ||
220 | # CONFIG_BF527_NAND_D_PORTF is not set | ||
221 | CONFIG_BF527_NAND_D_PORTH=y | ||
222 | |||
223 | # | ||
224 | # Interrupt Priority Assignment | ||
225 | # | ||
226 | |||
227 | # | ||
228 | # Priority | ||
229 | # | ||
230 | CONFIG_IRQ_SPI=10 | ||
208 | CONFIG_IRQ_SPI_ERROR=7 | 231 | CONFIG_IRQ_SPI_ERROR=7 |
209 | CONFIG_IRQ_NFC_ERROR=7 | 232 | CONFIG_IRQ_NFC_ERROR=7 |
210 | CONFIG_IRQ_HDMA_ERROR=7 | 233 | CONFIG_IRQ_HDMA_ERROR=7 |
@@ -226,7 +249,6 @@ CONFIG_BOOT_LOAD=0x1000 | |||
226 | # | 249 | # |
227 | CONFIG_CLKIN_HZ=25000000 | 250 | CONFIG_CLKIN_HZ=25000000 |
228 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 251 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
229 | CONFIG_MAX_MEM_SIZE=512 | ||
230 | CONFIG_MAX_VCO_HZ=600000000 | 252 | CONFIG_MAX_VCO_HZ=600000000 |
231 | CONFIG_MIN_VCO_HZ=50000000 | 253 | CONFIG_MIN_VCO_HZ=50000000 |
232 | CONFIG_MAX_SCLK_HZ=133333333 | 254 | CONFIG_MAX_SCLK_HZ=133333333 |
@@ -240,10 +262,10 @@ CONFIG_HZ_250=y | |||
240 | # CONFIG_HZ_300 is not set | 262 | # CONFIG_HZ_300 is not set |
241 | # CONFIG_HZ_1000 is not set | 263 | # CONFIG_HZ_1000 is not set |
242 | CONFIG_HZ=250 | 264 | CONFIG_HZ=250 |
265 | # CONFIG_SCHED_HRTICK is not set | ||
243 | CONFIG_GENERIC_TIME=y | 266 | CONFIG_GENERIC_TIME=y |
244 | CONFIG_GENERIC_CLOCKEVENTS=y | 267 | CONFIG_GENERIC_CLOCKEVENTS=y |
245 | # CONFIG_CYCLES_CLOCKSOURCE is not set | 268 | # CONFIG_CYCLES_CLOCKSOURCE is not set |
246 | # CONFIG_TICK_ONESHOT is not set | ||
247 | # CONFIG_NO_HZ is not set | 269 | # CONFIG_NO_HZ is not set |
248 | # CONFIG_HIGH_RES_TIMERS is not set | 270 | # CONFIG_HIGH_RES_TIMERS is not set |
249 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | 271 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y |
@@ -277,6 +299,12 @@ CONFIG_ACCESS_OK_L1=y | |||
277 | CONFIG_CACHELINE_ALIGNED_L1=y | 299 | CONFIG_CACHELINE_ALIGNED_L1=y |
278 | # CONFIG_SYSCALL_TAB_L1 is not set | 300 | # CONFIG_SYSCALL_TAB_L1 is not set |
279 | # CONFIG_CPLB_SWITCH_TAB_L1 is not set | 301 | # CONFIG_CPLB_SWITCH_TAB_L1 is not set |
302 | CONFIG_APP_STACK_L1=y | ||
303 | |||
304 | # | ||
305 | # Speed Optimizations | ||
306 | # | ||
307 | CONFIG_BFIN_INS_LOWOVERHEAD=y | ||
280 | CONFIG_RAMKERNEL=y | 308 | CONFIG_RAMKERNEL=y |
281 | # CONFIG_ROMKERNEL is not set | 309 | # CONFIG_ROMKERNEL is not set |
282 | CONFIG_SELECT_MEMORY_MODEL=y | 310 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -285,10 +313,10 @@ CONFIG_FLATMEM_MANUAL=y | |||
285 | # CONFIG_SPARSEMEM_MANUAL is not set | 313 | # CONFIG_SPARSEMEM_MANUAL is not set |
286 | CONFIG_FLATMEM=y | 314 | CONFIG_FLATMEM=y |
287 | CONFIG_FLAT_NODE_MEM_MAP=y | 315 | CONFIG_FLAT_NODE_MEM_MAP=y |
288 | # CONFIG_SPARSEMEM_STATIC is not set | 316 | CONFIG_PAGEFLAGS_EXTENDED=y |
289 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
290 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 317 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
291 | # CONFIG_RESOURCES_64BIT is not set | 318 | # CONFIG_RESOURCES_64BIT is not set |
319 | # CONFIG_PHYS_ADDR_T_64BIT is not set | ||
292 | CONFIG_ZONE_DMA_FLAG=1 | 320 | CONFIG_ZONE_DMA_FLAG=1 |
293 | CONFIG_VIRT_TO_BUS=y | 321 | CONFIG_VIRT_TO_BUS=y |
294 | CONFIG_BFIN_GPTIMERS=y | 322 | CONFIG_BFIN_GPTIMERS=y |
@@ -334,7 +362,6 @@ CONFIG_BANK_3=0xFFC0 | |||
334 | # | 362 | # |
335 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 363 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
336 | # | 364 | # |
337 | # CONFIG_PCI is not set | ||
338 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 365 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
339 | # CONFIG_PCCARD is not set | 366 | # CONFIG_PCCARD is not set |
340 | 367 | ||
@@ -345,25 +372,20 @@ CONFIG_BINFMT_ELF_FDPIC=y | |||
345 | CONFIG_BINFMT_FLAT=y | 372 | CONFIG_BINFMT_FLAT=y |
346 | CONFIG_BINFMT_ZFLAT=y | 373 | CONFIG_BINFMT_ZFLAT=y |
347 | # CONFIG_BINFMT_SHARED_FLAT is not set | 374 | # CONFIG_BINFMT_SHARED_FLAT is not set |
375 | # CONFIG_HAVE_AOUT is not set | ||
348 | # CONFIG_BINFMT_MISC is not set | 376 | # CONFIG_BINFMT_MISC is not set |
349 | 377 | ||
350 | # | 378 | # |
351 | # Power management options | 379 | # Power management options |
352 | # | 380 | # |
353 | # CONFIG_PM is not set | 381 | # CONFIG_PM is not set |
354 | CONFIG_SUSPEND_UP_POSSIBLE=y | 382 | CONFIG_ARCH_SUSPEND_POSSIBLE=y |
355 | # CONFIG_PM_BFIN_SLEEP_DEEPER is not set | ||
356 | # CONFIG_PM_BFIN_SLEEP is not set | ||
357 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | 383 | # CONFIG_PM_WAKEUP_BY_GPIO is not set |
358 | 384 | ||
359 | # | 385 | # |
360 | # CPU Frequency scaling | 386 | # CPU Frequency scaling |
361 | # | 387 | # |
362 | # CONFIG_CPU_FREQ is not set | 388 | # CONFIG_CPU_FREQ is not set |
363 | |||
364 | # | ||
365 | # Networking | ||
366 | # | ||
367 | CONFIG_NET=y | 389 | CONFIG_NET=y |
368 | 390 | ||
369 | # | 391 | # |
@@ -376,6 +398,7 @@ CONFIG_XFRM=y | |||
376 | # CONFIG_XFRM_USER is not set | 398 | # CONFIG_XFRM_USER is not set |
377 | # CONFIG_XFRM_SUB_POLICY is not set | 399 | # CONFIG_XFRM_SUB_POLICY is not set |
378 | # CONFIG_XFRM_MIGRATE is not set | 400 | # CONFIG_XFRM_MIGRATE is not set |
401 | # CONFIG_XFRM_STATISTICS is not set | ||
379 | # CONFIG_NET_KEY is not set | 402 | # CONFIG_NET_KEY is not set |
380 | CONFIG_INET=y | 403 | CONFIG_INET=y |
381 | # CONFIG_IP_MULTICAST is not set | 404 | # CONFIG_IP_MULTICAST is not set |
@@ -405,8 +428,6 @@ CONFIG_TCP_CONG_CUBIC=y | |||
405 | CONFIG_DEFAULT_TCP_CONG="cubic" | 428 | CONFIG_DEFAULT_TCP_CONG="cubic" |
406 | # CONFIG_TCP_MD5SIG is not set | 429 | # CONFIG_TCP_MD5SIG is not set |
407 | # CONFIG_IPV6 is not set | 430 | # CONFIG_IPV6 is not set |
408 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
409 | # CONFIG_INET6_TUNNEL is not set | ||
410 | # CONFIG_NETLABEL is not set | 431 | # CONFIG_NETLABEL is not set |
411 | # CONFIG_NETWORK_SECMARK is not set | 432 | # CONFIG_NETWORK_SECMARK is not set |
412 | # CONFIG_NETFILTER is not set | 433 | # CONFIG_NETFILTER is not set |
@@ -415,6 +436,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
415 | # CONFIG_TIPC is not set | 436 | # CONFIG_TIPC is not set |
416 | # CONFIG_ATM is not set | 437 | # CONFIG_ATM is not set |
417 | # CONFIG_BRIDGE is not set | 438 | # CONFIG_BRIDGE is not set |
439 | # CONFIG_NET_DSA is not set | ||
418 | # CONFIG_VLAN_8021Q is not set | 440 | # CONFIG_VLAN_8021Q is not set |
419 | # CONFIG_DECNET is not set | 441 | # CONFIG_DECNET is not set |
420 | # CONFIG_LLC2 is not set | 442 | # CONFIG_LLC2 is not set |
@@ -431,14 +453,14 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
431 | # | 453 | # |
432 | # CONFIG_NET_PKTGEN is not set | 454 | # CONFIG_NET_PKTGEN is not set |
433 | # CONFIG_HAMRADIO is not set | 455 | # CONFIG_HAMRADIO is not set |
456 | # CONFIG_CAN is not set | ||
434 | # CONFIG_IRDA is not set | 457 | # CONFIG_IRDA is not set |
435 | # CONFIG_BT is not set | 458 | # CONFIG_BT is not set |
436 | # CONFIG_AF_RXRPC is not set | 459 | # CONFIG_AF_RXRPC is not set |
437 | 460 | # CONFIG_PHONET is not set | |
438 | # | 461 | CONFIG_WIRELESS=y |
439 | # Wireless | ||
440 | # | ||
441 | # CONFIG_CFG80211 is not set | 462 | # CONFIG_CFG80211 is not set |
463 | CONFIG_WIRELESS_OLD_REGULATORY=y | ||
442 | # CONFIG_WIRELESS_EXT is not set | 464 | # CONFIG_WIRELESS_EXT is not set |
443 | # CONFIG_MAC80211 is not set | 465 | # CONFIG_MAC80211 is not set |
444 | # CONFIG_IEEE80211 is not set | 466 | # CONFIG_IEEE80211 is not set |
@@ -456,6 +478,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
456 | CONFIG_STANDALONE=y | 478 | CONFIG_STANDALONE=y |
457 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 479 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
458 | # CONFIG_FW_LOADER is not set | 480 | # CONFIG_FW_LOADER is not set |
481 | # CONFIG_DEBUG_DRIVER is not set | ||
482 | # CONFIG_DEBUG_DEVRES is not set | ||
459 | # CONFIG_SYS_HYPERVISOR is not set | 483 | # CONFIG_SYS_HYPERVISOR is not set |
460 | # CONFIG_CONNECTOR is not set | 484 | # CONFIG_CONNECTOR is not set |
461 | CONFIG_MTD=y | 485 | CONFIG_MTD=y |
@@ -464,6 +488,7 @@ CONFIG_MTD=y | |||
464 | CONFIG_MTD_PARTITIONS=y | 488 | CONFIG_MTD_PARTITIONS=y |
465 | # CONFIG_MTD_REDBOOT_PARTS is not set | 489 | # CONFIG_MTD_REDBOOT_PARTS is not set |
466 | # CONFIG_MTD_CMDLINE_PARTS is not set | 490 | # CONFIG_MTD_CMDLINE_PARTS is not set |
491 | # CONFIG_MTD_AR7_PARTS is not set | ||
467 | 492 | ||
468 | # | 493 | # |
469 | # User Modules And Translation Layers | 494 | # User Modules And Translation Layers |
@@ -507,6 +532,7 @@ CONFIG_MTD_ROM=m | |||
507 | # | 532 | # |
508 | CONFIG_MTD_COMPLEX_MAPPINGS=y | 533 | CONFIG_MTD_COMPLEX_MAPPINGS=y |
509 | # CONFIG_MTD_PHYSMAP is not set | 534 | # CONFIG_MTD_PHYSMAP is not set |
535 | # CONFIG_MTD_GPIO_ADDR is not set | ||
510 | # CONFIG_MTD_UCLINUX is not set | 536 | # CONFIG_MTD_UCLINUX is not set |
511 | # CONFIG_MTD_PLATRAM is not set | 537 | # CONFIG_MTD_PLATRAM is not set |
512 | 538 | ||
@@ -542,10 +568,12 @@ CONFIG_BLK_DEV=y | |||
542 | CONFIG_BLK_DEV_RAM=y | 568 | CONFIG_BLK_DEV_RAM=y |
543 | CONFIG_BLK_DEV_RAM_COUNT=16 | 569 | CONFIG_BLK_DEV_RAM_COUNT=16 |
544 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 570 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
545 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 571 | # CONFIG_BLK_DEV_XIP is not set |
546 | # CONFIG_CDROM_PKTCDVD is not set | 572 | # CONFIG_CDROM_PKTCDVD is not set |
547 | # CONFIG_ATA_OVER_ETH is not set | 573 | # CONFIG_ATA_OVER_ETH is not set |
574 | # CONFIG_BLK_DEV_HD is not set | ||
548 | # CONFIG_MISC_DEVICES is not set | 575 | # CONFIG_MISC_DEVICES is not set |
576 | CONFIG_HAVE_IDE=y | ||
549 | # CONFIG_IDE is not set | 577 | # CONFIG_IDE is not set |
550 | 578 | ||
551 | # | 579 | # |
@@ -558,7 +586,6 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
558 | # CONFIG_ATA is not set | 586 | # CONFIG_ATA is not set |
559 | # CONFIG_MD is not set | 587 | # CONFIG_MD is not set |
560 | CONFIG_NETDEVICES=y | 588 | CONFIG_NETDEVICES=y |
561 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
562 | # CONFIG_DUMMY is not set | 589 | # CONFIG_DUMMY is not set |
563 | # CONFIG_BONDING is not set | 590 | # CONFIG_BONDING is not set |
564 | # CONFIG_MACVLAN is not set | 591 | # CONFIG_MACVLAN is not set |
@@ -579,6 +606,7 @@ CONFIG_PHYLIB=y | |||
579 | # CONFIG_SMSC_PHY is not set | 606 | # CONFIG_SMSC_PHY is not set |
580 | # CONFIG_BROADCOM_PHY is not set | 607 | # CONFIG_BROADCOM_PHY is not set |
581 | # CONFIG_ICPLUS_PHY is not set | 608 | # CONFIG_ICPLUS_PHY is not set |
609 | # CONFIG_REALTEK_PHY is not set | ||
582 | # CONFIG_FIXED_PHY is not set | 610 | # CONFIG_FIXED_PHY is not set |
583 | # CONFIG_MDIO_BITBANG is not set | 611 | # CONFIG_MDIO_BITBANG is not set |
584 | CONFIG_NET_ETHERNET=y | 612 | CONFIG_NET_ETHERNET=y |
@@ -591,11 +619,14 @@ CONFIG_BFIN_MAC_RMII=y | |||
591 | # CONFIG_SMC91X is not set | 619 | # CONFIG_SMC91X is not set |
592 | # CONFIG_SMSC911X is not set | 620 | # CONFIG_SMSC911X is not set |
593 | # CONFIG_DM9000 is not set | 621 | # CONFIG_DM9000 is not set |
622 | # CONFIG_ENC28J60 is not set | ||
594 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | 623 | # CONFIG_IBM_NEW_EMAC_ZMII is not set |
595 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | 624 | # CONFIG_IBM_NEW_EMAC_RGMII is not set |
596 | # CONFIG_IBM_NEW_EMAC_TAH is not set | 625 | # CONFIG_IBM_NEW_EMAC_TAH is not set |
597 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 626 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
598 | # CONFIG_B44 is not set | 627 | # CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set |
628 | # CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set | ||
629 | # CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set | ||
599 | # CONFIG_NETDEV_1000 is not set | 630 | # CONFIG_NETDEV_1000 is not set |
600 | # CONFIG_NETDEV_10000 is not set | 631 | # CONFIG_NETDEV_10000 is not set |
601 | 632 | ||
@@ -604,6 +635,7 @@ CONFIG_BFIN_MAC_RMII=y | |||
604 | # | 635 | # |
605 | # CONFIG_WLAN_PRE80211 is not set | 636 | # CONFIG_WLAN_PRE80211 is not set |
606 | # CONFIG_WLAN_80211 is not set | 637 | # CONFIG_WLAN_80211 is not set |
638 | # CONFIG_IWLWIFI_LEDS is not set | ||
607 | 639 | ||
608 | # | 640 | # |
609 | # USB Network Adapters | 641 | # USB Network Adapters |
@@ -616,7 +648,6 @@ CONFIG_BFIN_MAC_RMII=y | |||
616 | # CONFIG_WAN is not set | 648 | # CONFIG_WAN is not set |
617 | # CONFIG_PPP is not set | 649 | # CONFIG_PPP is not set |
618 | # CONFIG_SLIP is not set | 650 | # CONFIG_SLIP is not set |
619 | # CONFIG_SHAPER is not set | ||
620 | # CONFIG_NETCONSOLE is not set | 651 | # CONFIG_NETCONSOLE is not set |
621 | # CONFIG_NETPOLL is not set | 652 | # CONFIG_NETPOLL is not set |
622 | # CONFIG_NET_POLL_CONTROLLER is not set | 653 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -642,14 +673,15 @@ CONFIG_BFIN_MAC_RMII=y | |||
642 | # CONFIG_BF5xx_PPIFCD is not set | 673 | # CONFIG_BF5xx_PPIFCD is not set |
643 | # CONFIG_BFIN_SIMPLE_TIMER is not set | 674 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
644 | # CONFIG_BF5xx_PPI is not set | 675 | # CONFIG_BF5xx_PPI is not set |
645 | CONFIG_BFIN_OTP=y | 676 | # CONFIG_BF5xx_EPPI is not set |
646 | # CONFIG_BFIN_OTP_WRITE_ENABLE is not set | ||
647 | # CONFIG_BFIN_SPORT is not set | 677 | # CONFIG_BFIN_SPORT is not set |
648 | # CONFIG_BFIN_TIMER_LATENCY is not set | 678 | # CONFIG_BFIN_TIMER_LATENCY is not set |
649 | # CONFIG_TWI_LCD is not set | 679 | # CONFIG_TWI_LCD is not set |
680 | CONFIG_BFIN_DMA_INTERFACE=m | ||
650 | CONFIG_SIMPLE_GPIO=m | 681 | CONFIG_SIMPLE_GPIO=m |
651 | # CONFIG_VT is not set | 682 | # CONFIG_VT is not set |
652 | # CONFIG_DEVKMEM is not set | 683 | # CONFIG_DEVKMEM is not set |
684 | # CONFIG_BFIN_JTAG_COMM is not set | ||
653 | # CONFIG_SERIAL_NONSTANDARD is not set | 685 | # CONFIG_SERIAL_NONSTANDARD is not set |
654 | 686 | ||
655 | # | 687 | # |
@@ -673,6 +705,8 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
673 | # CONFIG_SERIAL_BFIN_SPORT is not set | 705 | # CONFIG_SERIAL_BFIN_SPORT is not set |
674 | CONFIG_UNIX98_PTYS=y | 706 | CONFIG_UNIX98_PTYS=y |
675 | # CONFIG_LEGACY_PTYS is not set | 707 | # CONFIG_LEGACY_PTYS is not set |
708 | CONFIG_BFIN_OTP=y | ||
709 | # CONFIG_BFIN_OTP_WRITE_ENABLE is not set | ||
676 | 710 | ||
677 | # | 711 | # |
678 | # CAN, the car bus and industrial fieldbus | 712 | # CAN, the car bus and industrial fieldbus |
@@ -680,44 +714,49 @@ CONFIG_UNIX98_PTYS=y | |||
680 | # CONFIG_CAN4LINUX is not set | 714 | # CONFIG_CAN4LINUX is not set |
681 | # CONFIG_IPMI_HANDLER is not set | 715 | # CONFIG_IPMI_HANDLER is not set |
682 | # CONFIG_HW_RANDOM is not set | 716 | # CONFIG_HW_RANDOM is not set |
683 | # CONFIG_GEN_RTC is not set | ||
684 | # CONFIG_R3964 is not set | 717 | # CONFIG_R3964 is not set |
685 | # CONFIG_RAW_DRIVER is not set | 718 | # CONFIG_RAW_DRIVER is not set |
686 | # CONFIG_TCG_TPM is not set | 719 | # CONFIG_TCG_TPM is not set |
687 | CONFIG_I2C=y | 720 | CONFIG_I2C=y |
688 | CONFIG_I2C_BOARDINFO=y | 721 | CONFIG_I2C_BOARDINFO=y |
689 | CONFIG_I2C_CHARDEV=m | 722 | CONFIG_I2C_CHARDEV=m |
723 | CONFIG_I2C_HELPER_AUTO=y | ||
690 | 724 | ||
691 | # | 725 | # |
692 | # I2C Algorithms | 726 | # I2C Hardware Bus support |
693 | # | 727 | # |
694 | # CONFIG_I2C_ALGOBIT is not set | ||
695 | # CONFIG_I2C_ALGOPCF is not set | ||
696 | # CONFIG_I2C_ALGOPCA is not set | ||
697 | 728 | ||
698 | # | 729 | # |
699 | # I2C Hardware Bus support | 730 | # I2C system bus drivers (mostly embedded / system-on-chip) |
700 | # | 731 | # |
701 | CONFIG_I2C_BLACKFIN_TWI=m | 732 | CONFIG_I2C_BLACKFIN_TWI=m |
702 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 | 733 | CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 |
703 | # CONFIG_I2C_GPIO is not set | 734 | # CONFIG_I2C_GPIO is not set |
704 | # CONFIG_I2C_OCORES is not set | 735 | # CONFIG_I2C_OCORES is not set |
705 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
706 | # CONFIG_I2C_SIMTEC is not set | 736 | # CONFIG_I2C_SIMTEC is not set |
737 | |||
738 | # | ||
739 | # External I2C/SMBus adapter drivers | ||
740 | # | ||
741 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
707 | # CONFIG_I2C_TAOS_EVM is not set | 742 | # CONFIG_I2C_TAOS_EVM is not set |
708 | # CONFIG_I2C_STUB is not set | ||
709 | # CONFIG_I2C_TINY_USB is not set | 743 | # CONFIG_I2C_TINY_USB is not set |
710 | 744 | ||
711 | # | 745 | # |
746 | # Other I2C/SMBus bus drivers | ||
747 | # | ||
748 | # CONFIG_I2C_PCA_PLATFORM is not set | ||
749 | # CONFIG_I2C_STUB is not set | ||
750 | |||
751 | # | ||
712 | # Miscellaneous I2C Chip support | 752 | # Miscellaneous I2C Chip support |
713 | # | 753 | # |
714 | # CONFIG_SENSORS_DS1337 is not set | ||
715 | # CONFIG_SENSORS_DS1374 is not set | ||
716 | # CONFIG_DS1682 is not set | 754 | # CONFIG_DS1682 is not set |
755 | # CONFIG_AT24 is not set | ||
717 | # CONFIG_SENSORS_AD5252 is not set | 756 | # CONFIG_SENSORS_AD5252 is not set |
718 | # CONFIG_EEPROM_LEGACY is not set | 757 | # CONFIG_SENSORS_EEPROM is not set |
719 | # CONFIG_SENSORS_PCF8574 is not set | 758 | # CONFIG_SENSORS_PCF8574 is not set |
720 | # CONFIG_SENSORS_PCF8575 is not set | 759 | # CONFIG_PCF8575 is not set |
721 | # CONFIG_SENSORS_PCA9539 is not set | 760 | # CONFIG_SENSORS_PCA9539 is not set |
722 | # CONFIG_SENSORS_PCF8591 is not set | 761 | # CONFIG_SENSORS_PCF8591 is not set |
723 | # CONFIG_SENSORS_MAX6875 is not set | 762 | # CONFIG_SENSORS_MAX6875 is not set |
@@ -726,37 +765,41 @@ CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=100 | |||
726 | # CONFIG_I2C_DEBUG_ALGO is not set | 765 | # CONFIG_I2C_DEBUG_ALGO is not set |
727 | # CONFIG_I2C_DEBUG_BUS is not set | 766 | # CONFIG_I2C_DEBUG_BUS is not set |
728 | # CONFIG_I2C_DEBUG_CHIP is not set | 767 | # CONFIG_I2C_DEBUG_CHIP is not set |
729 | |||
730 | # | ||
731 | # SPI support | ||
732 | # | ||
733 | CONFIG_SPI=y | 768 | CONFIG_SPI=y |
769 | # CONFIG_SPI_DEBUG is not set | ||
734 | CONFIG_SPI_MASTER=y | 770 | CONFIG_SPI_MASTER=y |
735 | 771 | ||
736 | # | 772 | # |
737 | # SPI Master Controller Drivers | 773 | # SPI Master Controller Drivers |
738 | # | 774 | # |
739 | CONFIG_SPI_BFIN=y | 775 | CONFIG_SPI_BFIN=y |
776 | # CONFIG_SPI_BFIN_LOCK is not set | ||
740 | # CONFIG_SPI_BITBANG is not set | 777 | # CONFIG_SPI_BITBANG is not set |
741 | 778 | ||
742 | # | 779 | # |
743 | # SPI Protocol Masters | 780 | # SPI Protocol Masters |
744 | # | 781 | # |
745 | # CONFIG_EEPROM_AT25 is not set | 782 | # CONFIG_SPI_AT25 is not set |
746 | # CONFIG_SPI_SPIDEV is not set | 783 | # CONFIG_SPI_SPIDEV is not set |
747 | # CONFIG_SPI_TLE62X0 is not set | 784 | # CONFIG_SPI_TLE62X0 is not set |
785 | CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y | ||
786 | # CONFIG_GPIOLIB is not set | ||
748 | # CONFIG_W1 is not set | 787 | # CONFIG_W1 is not set |
749 | # CONFIG_POWER_SUPPLY is not set | 788 | # CONFIG_POWER_SUPPLY is not set |
750 | CONFIG_HWMON=y | 789 | CONFIG_HWMON=y |
751 | # CONFIG_HWMON_VID is not set | 790 | # CONFIG_HWMON_VID is not set |
791 | # CONFIG_SENSORS_AD7414 is not set | ||
752 | # CONFIG_SENSORS_AD7418 is not set | 792 | # CONFIG_SENSORS_AD7418 is not set |
793 | # CONFIG_SENSORS_ADCXX is not set | ||
753 | # CONFIG_SENSORS_ADM1021 is not set | 794 | # CONFIG_SENSORS_ADM1021 is not set |
754 | # CONFIG_SENSORS_ADM1025 is not set | 795 | # CONFIG_SENSORS_ADM1025 is not set |
755 | # CONFIG_SENSORS_ADM1026 is not set | 796 | # CONFIG_SENSORS_ADM1026 is not set |
756 | # CONFIG_SENSORS_ADM1029 is not set | 797 | # CONFIG_SENSORS_ADM1029 is not set |
757 | # CONFIG_SENSORS_ADM1031 is not set | 798 | # CONFIG_SENSORS_ADM1031 is not set |
758 | # CONFIG_SENSORS_ADM9240 is not set | 799 | # CONFIG_SENSORS_ADM9240 is not set |
800 | # CONFIG_SENSORS_ADT7462 is not set | ||
759 | # CONFIG_SENSORS_ADT7470 is not set | 801 | # CONFIG_SENSORS_ADT7470 is not set |
802 | # CONFIG_SENSORS_ADT7473 is not set | ||
760 | # CONFIG_SENSORS_ATXP1 is not set | 803 | # CONFIG_SENSORS_ATXP1 is not set |
761 | # CONFIG_SENSORS_DS1621 is not set | 804 | # CONFIG_SENSORS_DS1621 is not set |
762 | # CONFIG_SENSORS_F71805F is not set | 805 | # CONFIG_SENSORS_F71805F is not set |
@@ -777,6 +820,7 @@ CONFIG_HWMON=y | |||
777 | # CONFIG_SENSORS_LM90 is not set | 820 | # CONFIG_SENSORS_LM90 is not set |
778 | # CONFIG_SENSORS_LM92 is not set | 821 | # CONFIG_SENSORS_LM92 is not set |
779 | # CONFIG_SENSORS_LM93 is not set | 822 | # CONFIG_SENSORS_LM93 is not set |
823 | # CONFIG_SENSORS_MAX1111 is not set | ||
780 | # CONFIG_SENSORS_MAX1619 is not set | 824 | # CONFIG_SENSORS_MAX1619 is not set |
781 | # CONFIG_SENSORS_MAX6650 is not set | 825 | # CONFIG_SENSORS_MAX6650 is not set |
782 | # CONFIG_SENSORS_PC87360 is not set | 826 | # CONFIG_SENSORS_PC87360 is not set |
@@ -785,6 +829,7 @@ CONFIG_HWMON=y | |||
785 | # CONFIG_SENSORS_SMSC47M1 is not set | 829 | # CONFIG_SENSORS_SMSC47M1 is not set |
786 | # CONFIG_SENSORS_SMSC47M192 is not set | 830 | # CONFIG_SENSORS_SMSC47M192 is not set |
787 | # CONFIG_SENSORS_SMSC47B397 is not set | 831 | # CONFIG_SENSORS_SMSC47B397 is not set |
832 | # CONFIG_SENSORS_ADS7828 is not set | ||
788 | # CONFIG_SENSORS_THMC50 is not set | 833 | # CONFIG_SENSORS_THMC50 is not set |
789 | # CONFIG_SENSORS_VT1211 is not set | 834 | # CONFIG_SENSORS_VT1211 is not set |
790 | # CONFIG_SENSORS_W83781D is not set | 835 | # CONFIG_SENSORS_W83781D is not set |
@@ -792,9 +837,12 @@ CONFIG_HWMON=y | |||
792 | # CONFIG_SENSORS_W83792D is not set | 837 | # CONFIG_SENSORS_W83792D is not set |
793 | # CONFIG_SENSORS_W83793 is not set | 838 | # CONFIG_SENSORS_W83793 is not set |
794 | # CONFIG_SENSORS_W83L785TS is not set | 839 | # CONFIG_SENSORS_W83L785TS is not set |
840 | # CONFIG_SENSORS_W83L786NG is not set | ||
795 | # CONFIG_SENSORS_W83627HF is not set | 841 | # CONFIG_SENSORS_W83627HF is not set |
796 | # CONFIG_SENSORS_W83627EHF is not set | 842 | # CONFIG_SENSORS_W83627EHF is not set |
797 | # CONFIG_HWMON_DEBUG_CHIP is not set | 843 | # CONFIG_HWMON_DEBUG_CHIP is not set |
844 | # CONFIG_THERMAL is not set | ||
845 | # CONFIG_THERMAL_HWMON is not set | ||
798 | CONFIG_WATCHDOG=y | 846 | CONFIG_WATCHDOG=y |
799 | # CONFIG_WATCHDOG_NOWAYOUT is not set | 847 | # CONFIG_WATCHDOG_NOWAYOUT is not set |
800 | 848 | ||
@@ -810,21 +858,31 @@ CONFIG_BFIN_WDT=y | |||
810 | # CONFIG_USBPCWATCHDOG is not set | 858 | # CONFIG_USBPCWATCHDOG is not set |
811 | 859 | ||
812 | # | 860 | # |
813 | # Sonics Silicon Backplane | ||
814 | # | ||
815 | CONFIG_SSB_POSSIBLE=y | ||
816 | # CONFIG_SSB is not set | ||
817 | |||
818 | # | ||
819 | # Multifunction device drivers | 861 | # Multifunction device drivers |
820 | # | 862 | # |
863 | # CONFIG_MFD_CORE is not set | ||
821 | # CONFIG_MFD_SM501 is not set | 864 | # CONFIG_MFD_SM501 is not set |
865 | # CONFIG_HTC_PASIC3 is not set | ||
866 | # CONFIG_MFD_TMIO is not set | ||
867 | # CONFIG_PMIC_DA903X is not set | ||
868 | # CONFIG_MFD_WM8400 is not set | ||
869 | # CONFIG_MFD_WM8350_I2C is not set | ||
870 | # CONFIG_REGULATOR is not set | ||
822 | 871 | ||
823 | # | 872 | # |
824 | # Multimedia devices | 873 | # Multimedia devices |
825 | # | 874 | # |
875 | |||
876 | # | ||
877 | # Multimedia core support | ||
878 | # | ||
826 | # CONFIG_VIDEO_DEV is not set | 879 | # CONFIG_VIDEO_DEV is not set |
827 | # CONFIG_DVB_CORE is not set | 880 | # CONFIG_DVB_CORE is not set |
881 | # CONFIG_VIDEO_MEDIA is not set | ||
882 | |||
883 | # | ||
884 | # Multimedia drivers | ||
885 | # | ||
828 | # CONFIG_DAB is not set | 886 | # CONFIG_DAB is not set |
829 | 887 | ||
830 | # | 888 | # |
@@ -839,10 +897,6 @@ CONFIG_SSB_POSSIBLE=y | |||
839 | # Display device support | 897 | # Display device support |
840 | # | 898 | # |
841 | # CONFIG_DISPLAY_SUPPORT is not set | 899 | # CONFIG_DISPLAY_SUPPORT is not set |
842 | |||
843 | # | ||
844 | # Sound | ||
845 | # | ||
846 | # CONFIG_SOUND is not set | 900 | # CONFIG_SOUND is not set |
847 | CONFIG_USB_SUPPORT=y | 901 | CONFIG_USB_SUPPORT=y |
848 | CONFIG_USB_ARCH_HAS_HCD=y | 902 | CONFIG_USB_ARCH_HAS_HCD=y |
@@ -850,6 +904,7 @@ CONFIG_USB_ARCH_HAS_HCD=y | |||
850 | # CONFIG_USB_ARCH_HAS_EHCI is not set | 904 | # CONFIG_USB_ARCH_HAS_EHCI is not set |
851 | CONFIG_USB=y | 905 | CONFIG_USB=y |
852 | # CONFIG_USB_DEBUG is not set | 906 | # CONFIG_USB_DEBUG is not set |
907 | # CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set | ||
853 | 908 | ||
854 | # | 909 | # |
855 | # Miscellaneous USB options | 910 | # Miscellaneous USB options |
@@ -860,40 +915,48 @@ CONFIG_USB_DEVICE_CLASS=y | |||
860 | # CONFIG_USB_OTG is not set | 915 | # CONFIG_USB_OTG is not set |
861 | # CONFIG_USB_OTG_WHITELIST is not set | 916 | # CONFIG_USB_OTG_WHITELIST is not set |
862 | CONFIG_USB_OTG_BLACKLIST_HUB=y | 917 | CONFIG_USB_OTG_BLACKLIST_HUB=y |
918 | CONFIG_USB_MON=y | ||
919 | # CONFIG_USB_WUSB is not set | ||
920 | # CONFIG_USB_WUSB_CBAF is not set | ||
863 | 921 | ||
864 | # | 922 | # |
865 | # USB Host Controller Drivers | 923 | # USB Host Controller Drivers |
866 | # | 924 | # |
925 | # CONFIG_USB_C67X00_HCD is not set | ||
867 | # CONFIG_USB_ISP116X_HCD is not set | 926 | # CONFIG_USB_ISP116X_HCD is not set |
868 | # CONFIG_USB_ISP1362_HCD is not set | ||
869 | # CONFIG_USB_ISP1760_HCD is not set | 927 | # CONFIG_USB_ISP1760_HCD is not set |
928 | # CONFIG_USB_ISP1362_HCD is not set | ||
870 | # CONFIG_USB_SL811_HCD is not set | 929 | # CONFIG_USB_SL811_HCD is not set |
871 | # CONFIG_USB_R8A66597_HCD is not set | 930 | # CONFIG_USB_R8A66597_HCD is not set |
931 | # CONFIG_USB_HWA_HCD is not set | ||
872 | CONFIG_USB_MUSB_HDRC=y | 932 | CONFIG_USB_MUSB_HDRC=y |
873 | CONFIG_USB_MUSB_SOC=y | 933 | CONFIG_USB_MUSB_SOC=y |
874 | 934 | ||
875 | # | 935 | # |
876 | # Blackfin high speed USB support | 936 | # Blackfin high speed USB Support |
877 | # | 937 | # |
878 | CONFIG_USB_MUSB_HOST=y | 938 | CONFIG_USB_MUSB_HOST=y |
879 | # CONFIG_USB_MUSB_PERIPHERAL is not set | 939 | # CONFIG_USB_MUSB_PERIPHERAL is not set |
880 | # CONFIG_USB_MUSB_OTG is not set | 940 | # CONFIG_USB_MUSB_OTG is not set |
881 | CONFIG_USB_MUSB_HDRC_HCD=y | 941 | CONFIG_USB_MUSB_HDRC_HCD=y |
882 | CONFIG_MUSB_PIO_ONLY=y | 942 | CONFIG_MUSB_PIO_ONLY=y |
883 | CONFIG_USB_MUSB_LOGLEVEL=0 | 943 | CONFIG_MUSB_DMA_POLL=y |
944 | # CONFIG_USB_MUSB_DEBUG is not set | ||
884 | 945 | ||
885 | # | 946 | # |
886 | # USB Device Class drivers | 947 | # USB Device Class drivers |
887 | # | 948 | # |
888 | # CONFIG_USB_ACM is not set | 949 | # CONFIG_USB_ACM is not set |
889 | # CONFIG_USB_PRINTER is not set | 950 | # CONFIG_USB_PRINTER is not set |
951 | # CONFIG_USB_WDM is not set | ||
952 | # CONFIG_USB_TMC is not set | ||
890 | 953 | ||
891 | # | 954 | # |
892 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 955 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
893 | # | 956 | # |
894 | 957 | ||
895 | # | 958 | # |
896 | # may also be needed; see USB_STORAGE Help for more information | 959 | # see USB_STORAGE Help for more information |
897 | # | 960 | # |
898 | # CONFIG_USB_LIBUSUAL is not set | 961 | # CONFIG_USB_LIBUSUAL is not set |
899 | 962 | ||
@@ -901,15 +964,10 @@ CONFIG_USB_MUSB_LOGLEVEL=0 | |||
901 | # USB Imaging devices | 964 | # USB Imaging devices |
902 | # | 965 | # |
903 | # CONFIG_USB_MDC800 is not set | 966 | # CONFIG_USB_MDC800 is not set |
904 | CONFIG_USB_MON=y | ||
905 | 967 | ||
906 | # | 968 | # |
907 | # USB port drivers | 969 | # USB port drivers |
908 | # | 970 | # |
909 | |||
910 | # | ||
911 | # USB Serial Converter support | ||
912 | # | ||
913 | # CONFIG_USB_SERIAL is not set | 971 | # CONFIG_USB_SERIAL is not set |
914 | 972 | ||
915 | # | 973 | # |
@@ -918,7 +976,7 @@ CONFIG_USB_MON=y | |||
918 | # CONFIG_USB_EMI62 is not set | 976 | # CONFIG_USB_EMI62 is not set |
919 | # CONFIG_USB_EMI26 is not set | 977 | # CONFIG_USB_EMI26 is not set |
920 | # CONFIG_USB_ADUTUX is not set | 978 | # CONFIG_USB_ADUTUX is not set |
921 | # CONFIG_USB_AUERSWALD is not set | 979 | # CONFIG_USB_SEVSEG is not set |
922 | # CONFIG_USB_RIO500 is not set | 980 | # CONFIG_USB_RIO500 is not set |
923 | # CONFIG_USB_LEGOTOWER is not set | 981 | # CONFIG_USB_LEGOTOWER is not set |
924 | # CONFIG_USB_LCD is not set | 982 | # CONFIG_USB_LCD is not set |
@@ -934,17 +992,13 @@ CONFIG_USB_MON=y | |||
934 | # CONFIG_USB_LD is not set | 992 | # CONFIG_USB_LD is not set |
935 | # CONFIG_USB_TRANCEVIBRATOR is not set | 993 | # CONFIG_USB_TRANCEVIBRATOR is not set |
936 | # CONFIG_USB_IOWARRIOR is not set | 994 | # CONFIG_USB_IOWARRIOR is not set |
937 | 995 | # CONFIG_USB_ISIGHTFW is not set | |
938 | # | 996 | # CONFIG_USB_VST is not set |
939 | # USB DSL modem support | ||
940 | # | ||
941 | |||
942 | # | ||
943 | # USB Gadget Support | ||
944 | # | ||
945 | # CONFIG_USB_GADGET is not set | 997 | # CONFIG_USB_GADGET is not set |
946 | # CONFIG_MMC is not set | 998 | # CONFIG_MMC is not set |
999 | # CONFIG_MEMSTICK is not set | ||
947 | # CONFIG_NEW_LEDS is not set | 1000 | # CONFIG_NEW_LEDS is not set |
1001 | # CONFIG_ACCESSIBILITY is not set | ||
948 | CONFIG_RTC_LIB=y | 1002 | CONFIG_RTC_LIB=y |
949 | CONFIG_RTC_CLASS=y | 1003 | CONFIG_RTC_CLASS=y |
950 | CONFIG_RTC_HCTOSYS=y | 1004 | CONFIG_RTC_HCTOSYS=y |
@@ -973,51 +1027,59 @@ CONFIG_RTC_INTF_DEV=y | |||
973 | # CONFIG_RTC_DRV_PCF8563 is not set | 1027 | # CONFIG_RTC_DRV_PCF8563 is not set |
974 | # CONFIG_RTC_DRV_PCF8583 is not set | 1028 | # CONFIG_RTC_DRV_PCF8583 is not set |
975 | # CONFIG_RTC_DRV_M41T80 is not set | 1029 | # CONFIG_RTC_DRV_M41T80 is not set |
1030 | # CONFIG_RTC_DRV_S35390A is not set | ||
1031 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1032 | # CONFIG_RTC_DRV_RX8581 is not set | ||
976 | 1033 | ||
977 | # | 1034 | # |
978 | # SPI RTC drivers | 1035 | # SPI RTC drivers |
979 | # | 1036 | # |
980 | # CONFIG_RTC_DRV_RS5C348 is not set | 1037 | # CONFIG_RTC_DRV_M41T94 is not set |
1038 | # CONFIG_RTC_DRV_DS1305 is not set | ||
1039 | # CONFIG_RTC_DRV_DS1390 is not set | ||
981 | # CONFIG_RTC_DRV_MAX6902 is not set | 1040 | # CONFIG_RTC_DRV_MAX6902 is not set |
1041 | # CONFIG_RTC_DRV_R9701 is not set | ||
1042 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
1043 | # CONFIG_RTC_DRV_DS3234 is not set | ||
982 | 1044 | ||
983 | # | 1045 | # |
984 | # Platform RTC drivers | 1046 | # Platform RTC drivers |
985 | # | 1047 | # |
1048 | # CONFIG_RTC_DRV_DS1286 is not set | ||
1049 | # CONFIG_RTC_DRV_DS1511 is not set | ||
986 | # CONFIG_RTC_DRV_DS1553 is not set | 1050 | # CONFIG_RTC_DRV_DS1553 is not set |
987 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
988 | # CONFIG_RTC_DRV_DS1742 is not set | 1051 | # CONFIG_RTC_DRV_DS1742 is not set |
1052 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
989 | # CONFIG_RTC_DRV_M48T86 is not set | 1053 | # CONFIG_RTC_DRV_M48T86 is not set |
1054 | # CONFIG_RTC_DRV_M48T35 is not set | ||
990 | # CONFIG_RTC_DRV_M48T59 is not set | 1055 | # CONFIG_RTC_DRV_M48T59 is not set |
1056 | # CONFIG_RTC_DRV_BQ4802 is not set | ||
991 | # CONFIG_RTC_DRV_V3020 is not set | 1057 | # CONFIG_RTC_DRV_V3020 is not set |
992 | 1058 | ||
993 | # | 1059 | # |
994 | # on-CPU RTC drivers | 1060 | # on-CPU RTC drivers |
995 | # | 1061 | # |
996 | CONFIG_RTC_DRV_BFIN=y | 1062 | CONFIG_RTC_DRV_BFIN=y |
997 | 1063 | # CONFIG_DMADEVICES is not set | |
998 | # | ||
999 | # Userspace I/O | ||
1000 | # | ||
1001 | # CONFIG_UIO is not set | 1064 | # CONFIG_UIO is not set |
1065 | # CONFIG_STAGING is not set | ||
1002 | 1066 | ||
1003 | # | 1067 | # |
1004 | # File systems | 1068 | # File systems |
1005 | # | 1069 | # |
1006 | # CONFIG_EXT2_FS is not set | 1070 | # CONFIG_EXT2_FS is not set |
1007 | # CONFIG_EXT3_FS is not set | 1071 | # CONFIG_EXT3_FS is not set |
1008 | # CONFIG_EXT4DEV_FS is not set | 1072 | # CONFIG_EXT4_FS is not set |
1009 | # CONFIG_REISERFS_FS is not set | 1073 | # CONFIG_REISERFS_FS is not set |
1010 | # CONFIG_JFS_FS is not set | 1074 | # CONFIG_JFS_FS is not set |
1011 | # CONFIG_FS_POSIX_ACL is not set | 1075 | # CONFIG_FS_POSIX_ACL is not set |
1076 | CONFIG_FILE_LOCKING=y | ||
1012 | # CONFIG_XFS_FS is not set | 1077 | # CONFIG_XFS_FS is not set |
1013 | # CONFIG_GFS2_FS is not set | ||
1014 | # CONFIG_OCFS2_FS is not set | 1078 | # CONFIG_OCFS2_FS is not set |
1015 | # CONFIG_MINIX_FS is not set | 1079 | # CONFIG_DNOTIFY is not set |
1016 | # CONFIG_ROMFS_FS is not set | ||
1017 | CONFIG_INOTIFY=y | 1080 | CONFIG_INOTIFY=y |
1018 | CONFIG_INOTIFY_USER=y | 1081 | CONFIG_INOTIFY_USER=y |
1019 | # CONFIG_QUOTA is not set | 1082 | # CONFIG_QUOTA is not set |
1020 | # CONFIG_DNOTIFY is not set | ||
1021 | # CONFIG_AUTOFS_FS is not set | 1083 | # CONFIG_AUTOFS_FS is not set |
1022 | # CONFIG_AUTOFS4_FS is not set | 1084 | # CONFIG_AUTOFS4_FS is not set |
1023 | # CONFIG_FUSE_FS is not set | 1085 | # CONFIG_FUSE_FS is not set |
@@ -1059,8 +1121,11 @@ CONFIG_SYSFS=y | |||
1059 | # CONFIG_JFFS2_FS is not set | 1121 | # CONFIG_JFFS2_FS is not set |
1060 | # CONFIG_CRAMFS is not set | 1122 | # CONFIG_CRAMFS is not set |
1061 | # CONFIG_VXFS_FS is not set | 1123 | # CONFIG_VXFS_FS is not set |
1124 | # CONFIG_MINIX_FS is not set | ||
1125 | # CONFIG_OMFS_FS is not set | ||
1062 | # CONFIG_HPFS_FS is not set | 1126 | # CONFIG_HPFS_FS is not set |
1063 | # CONFIG_QNX4FS_FS is not set | 1127 | # CONFIG_QNX4FS_FS is not set |
1128 | # CONFIG_ROMFS_FS is not set | ||
1064 | # CONFIG_SYSV_FS is not set | 1129 | # CONFIG_SYSV_FS is not set |
1065 | # CONFIG_UFS_FS is not set | 1130 | # CONFIG_UFS_FS is not set |
1066 | CONFIG_NETWORK_FILESYSTEMS=y | 1131 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -1068,13 +1133,12 @@ CONFIG_NFS_FS=m | |||
1068 | CONFIG_NFS_V3=y | 1133 | CONFIG_NFS_V3=y |
1069 | # CONFIG_NFS_V3_ACL is not set | 1134 | # CONFIG_NFS_V3_ACL is not set |
1070 | # CONFIG_NFS_V4 is not set | 1135 | # CONFIG_NFS_V4 is not set |
1071 | # CONFIG_NFS_DIRECTIO is not set | ||
1072 | # CONFIG_NFSD is not set | 1136 | # CONFIG_NFSD is not set |
1073 | CONFIG_LOCKD=m | 1137 | CONFIG_LOCKD=m |
1074 | CONFIG_LOCKD_V4=y | 1138 | CONFIG_LOCKD_V4=y |
1075 | CONFIG_NFS_COMMON=y | 1139 | CONFIG_NFS_COMMON=y |
1076 | CONFIG_SUNRPC=m | 1140 | CONFIG_SUNRPC=m |
1077 | # CONFIG_SUNRPC_BIND34 is not set | 1141 | # CONFIG_SUNRPC_REGISTER_V4 is not set |
1078 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 1142 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
1079 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 1143 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
1080 | CONFIG_SMB_FS=m | 1144 | CONFIG_SMB_FS=m |
@@ -1130,7 +1194,6 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1130 | # CONFIG_NLS_KOI8_U is not set | 1194 | # CONFIG_NLS_KOI8_U is not set |
1131 | # CONFIG_NLS_UTF8 is not set | 1195 | # CONFIG_NLS_UTF8 is not set |
1132 | # CONFIG_DLM is not set | 1196 | # CONFIG_DLM is not set |
1133 | # CONFIG_INSTRUMENTATION is not set | ||
1134 | 1197 | ||
1135 | # | 1198 | # |
1136 | # Kernel hacking | 1199 | # Kernel hacking |
@@ -1138,14 +1201,61 @@ CONFIG_NLS_DEFAULT="iso8859-1" | |||
1138 | # CONFIG_PRINTK_TIME is not set | 1201 | # CONFIG_PRINTK_TIME is not set |
1139 | CONFIG_ENABLE_WARN_DEPRECATED=y | 1202 | CONFIG_ENABLE_WARN_DEPRECATED=y |
1140 | CONFIG_ENABLE_MUST_CHECK=y | 1203 | CONFIG_ENABLE_MUST_CHECK=y |
1204 | CONFIG_FRAME_WARN=1024 | ||
1141 | # CONFIG_MAGIC_SYSRQ is not set | 1205 | # CONFIG_MAGIC_SYSRQ is not set |
1142 | # CONFIG_UNUSED_SYMBOLS is not set | 1206 | # CONFIG_UNUSED_SYMBOLS is not set |
1143 | CONFIG_DEBUG_FS=y | 1207 | CONFIG_DEBUG_FS=y |
1144 | # CONFIG_HEADERS_CHECK is not set | 1208 | # CONFIG_HEADERS_CHECK is not set |
1145 | # CONFIG_DEBUG_KERNEL is not set | 1209 | CONFIG_DEBUG_KERNEL=y |
1210 | # CONFIG_DEBUG_SHIRQ is not set | ||
1211 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1212 | # CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set | ||
1213 | CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0 | ||
1214 | # CONFIG_SCHED_DEBUG is not set | ||
1215 | # CONFIG_SCHEDSTATS is not set | ||
1216 | # CONFIG_TIMER_STATS is not set | ||
1217 | # CONFIG_DEBUG_OBJECTS is not set | ||
1218 | # CONFIG_DEBUG_SLAB is not set | ||
1219 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1220 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1221 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1222 | # CONFIG_DEBUG_MUTEXES is not set | ||
1223 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1224 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1225 | # CONFIG_DEBUG_KOBJECT is not set | ||
1146 | # CONFIG_DEBUG_BUGVERBOSE is not set | 1226 | # CONFIG_DEBUG_BUGVERBOSE is not set |
1227 | # CONFIG_DEBUG_INFO is not set | ||
1228 | # CONFIG_DEBUG_VM is not set | ||
1229 | # CONFIG_DEBUG_WRITECOUNT is not set | ||
1230 | # CONFIG_DEBUG_MEMORY_INIT is not set | ||
1231 | # CONFIG_DEBUG_LIST is not set | ||
1232 | # CONFIG_DEBUG_SG is not set | ||
1233 | # CONFIG_FRAME_POINTER is not set | ||
1234 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1235 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1236 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | ||
1237 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
1238 | # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set | ||
1239 | # CONFIG_FAULT_INJECTION is not set | ||
1240 | # CONFIG_SYSCTL_SYSCALL_CHECK is not set | ||
1241 | |||
1242 | # | ||
1243 | # Tracers | ||
1244 | # | ||
1245 | # CONFIG_SCHED_TRACER is not set | ||
1246 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1247 | # CONFIG_BOOT_TRACER is not set | ||
1248 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | ||
1147 | # CONFIG_SAMPLES is not set | 1249 | # CONFIG_SAMPLES is not set |
1250 | CONFIG_HAVE_ARCH_KGDB=y | ||
1251 | # CONFIG_KGDB is not set | ||
1252 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
1253 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
1254 | # CONFIG_KGDB_TESTCASE is not set | ||
1255 | CONFIG_DEBUG_VERBOSE=y | ||
1148 | CONFIG_DEBUG_MMRS=y | 1256 | CONFIG_DEBUG_MMRS=y |
1257 | # CONFIG_DEBUG_HWERR is not set | ||
1258 | # CONFIG_DEBUG_DOUBLEFAULT is not set | ||
1149 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | 1259 | CONFIG_DEBUG_HUNT_FOR_ZERO=y |
1150 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | 1260 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y |
1151 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | 1261 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y |
@@ -1154,7 +1264,7 @@ CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | |||
1154 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 | 1264 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 |
1155 | # CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set | 1265 | # CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set |
1156 | # CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set | 1266 | # CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set |
1157 | CONFIG_EARLY_PRINTK=y | 1267 | # CONFIG_EARLY_PRINTK is not set |
1158 | # CONFIG_CPLB_INFO is not set | 1268 | # CONFIG_CPLB_INFO is not set |
1159 | CONFIG_ACCESS_CHECK=y | 1269 | CONFIG_ACCESS_CHECK=y |
1160 | 1270 | ||
@@ -1163,10 +1273,96 @@ CONFIG_ACCESS_CHECK=y | |||
1163 | # | 1273 | # |
1164 | # CONFIG_KEYS is not set | 1274 | # CONFIG_KEYS is not set |
1165 | CONFIG_SECURITY=y | 1275 | CONFIG_SECURITY=y |
1276 | # CONFIG_SECURITYFS is not set | ||
1166 | # CONFIG_SECURITY_NETWORK is not set | 1277 | # CONFIG_SECURITY_NETWORK is not set |
1167 | # CONFIG_SECURITY_CAPABILITIES is not set | 1278 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1168 | # CONFIG_SECURITY_ROOTPLUG is not set | 1279 | # CONFIG_SECURITY_ROOTPLUG is not set |
1169 | # CONFIG_CRYPTO is not set | 1280 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 |
1281 | CONFIG_CRYPTO=y | ||
1282 | |||
1283 | # | ||
1284 | # Crypto core or helper | ||
1285 | # | ||
1286 | # CONFIG_CRYPTO_FIPS is not set | ||
1287 | # CONFIG_CRYPTO_MANAGER is not set | ||
1288 | # CONFIG_CRYPTO_MANAGER2 is not set | ||
1289 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1290 | # CONFIG_CRYPTO_NULL is not set | ||
1291 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1292 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1293 | # CONFIG_CRYPTO_TEST is not set | ||
1294 | |||
1295 | # | ||
1296 | # Authenticated Encryption with Associated Data | ||
1297 | # | ||
1298 | # CONFIG_CRYPTO_CCM is not set | ||
1299 | # CONFIG_CRYPTO_GCM is not set | ||
1300 | # CONFIG_CRYPTO_SEQIV is not set | ||
1301 | |||
1302 | # | ||
1303 | # Block modes | ||
1304 | # | ||
1305 | # CONFIG_CRYPTO_CBC is not set | ||
1306 | # CONFIG_CRYPTO_CTR is not set | ||
1307 | # CONFIG_CRYPTO_CTS is not set | ||
1308 | # CONFIG_CRYPTO_ECB is not set | ||
1309 | # CONFIG_CRYPTO_LRW is not set | ||
1310 | # CONFIG_CRYPTO_PCBC is not set | ||
1311 | # CONFIG_CRYPTO_XTS is not set | ||
1312 | |||
1313 | # | ||
1314 | # Hash modes | ||
1315 | # | ||
1316 | # CONFIG_CRYPTO_HMAC is not set | ||
1317 | # CONFIG_CRYPTO_XCBC is not set | ||
1318 | |||
1319 | # | ||
1320 | # Digest | ||
1321 | # | ||
1322 | # CONFIG_CRYPTO_CRC32C is not set | ||
1323 | # CONFIG_CRYPTO_MD4 is not set | ||
1324 | # CONFIG_CRYPTO_MD5 is not set | ||
1325 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1326 | # CONFIG_CRYPTO_RMD128 is not set | ||
1327 | # CONFIG_CRYPTO_RMD160 is not set | ||
1328 | # CONFIG_CRYPTO_RMD256 is not set | ||
1329 | # CONFIG_CRYPTO_RMD320 is not set | ||
1330 | # CONFIG_CRYPTO_SHA1 is not set | ||
1331 | # CONFIG_CRYPTO_SHA256 is not set | ||
1332 | # CONFIG_CRYPTO_SHA512 is not set | ||
1333 | # CONFIG_CRYPTO_TGR192 is not set | ||
1334 | # CONFIG_CRYPTO_WP512 is not set | ||
1335 | |||
1336 | # | ||
1337 | # Ciphers | ||
1338 | # | ||
1339 | # CONFIG_CRYPTO_AES is not set | ||
1340 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1341 | # CONFIG_CRYPTO_ARC4 is not set | ||
1342 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1343 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1344 | # CONFIG_CRYPTO_CAST5 is not set | ||
1345 | # CONFIG_CRYPTO_CAST6 is not set | ||
1346 | # CONFIG_CRYPTO_DES is not set | ||
1347 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1348 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1349 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1350 | # CONFIG_CRYPTO_SEED is not set | ||
1351 | # CONFIG_CRYPTO_SERPENT is not set | ||
1352 | # CONFIG_CRYPTO_TEA is not set | ||
1353 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1354 | |||
1355 | # | ||
1356 | # Compression | ||
1357 | # | ||
1358 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1359 | # CONFIG_CRYPTO_LZO is not set | ||
1360 | |||
1361 | # | ||
1362 | # Random Number Generation | ||
1363 | # | ||
1364 | # CONFIG_CRYPTO_ANSI_CPRNG is not set | ||
1365 | CONFIG_CRYPTO_HW=y | ||
1170 | 1366 | ||
1171 | # | 1367 | # |
1172 | # Library routines | 1368 | # Library routines |
@@ -1174,6 +1370,7 @@ CONFIG_SECURITY=y | |||
1174 | CONFIG_BITREVERSE=y | 1370 | CONFIG_BITREVERSE=y |
1175 | CONFIG_CRC_CCITT=m | 1371 | CONFIG_CRC_CCITT=m |
1176 | # CONFIG_CRC16 is not set | 1372 | # CONFIG_CRC16 is not set |
1373 | # CONFIG_CRC_T10DIF is not set | ||
1177 | # CONFIG_CRC_ITU_T is not set | 1374 | # CONFIG_CRC_ITU_T is not set |
1178 | CONFIG_CRC32=y | 1375 | CONFIG_CRC32=y |
1179 | # CONFIG_CRC7 is not set | 1376 | # CONFIG_CRC7 is not set |
diff --git a/arch/blackfin/include/asm/checksum.h b/arch/blackfin/include/asm/checksum.h index f67289a0d8d2..793581fc9556 100644 --- a/arch/blackfin/include/asm/checksum.h +++ b/arch/blackfin/include/asm/checksum.h | |||
@@ -63,23 +63,23 @@ static inline __wsum | |||
63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, | 63 | csum_tcpudp_nofold(__be32 saddr, __be32 daddr, unsigned short len, |
64 | unsigned short proto, __wsum sum) | 64 | unsigned short proto, __wsum sum) |
65 | { | 65 | { |
66 | 66 | unsigned int carry; | |
67 | __asm__ ("%0 = %0 + %1;\n\t" | 67 | |
68 | "CC = AC0;\n\t" | 68 | __asm__ ("%0 = %0 + %2;\n\t" |
69 | "if !CC jump 4;\n\t" | 69 | "CC = AC0;\n\t" |
70 | "%0 = %0 + %4;\n\t" | 70 | "%1 = CC;\n\t" |
71 | "%0 = %0 + %2;\n\t" | 71 | "%0 = %0 + %1;\n\t" |
72 | "CC = AC0;\n\t" | 72 | "%0 = %0 + %3;\n\t" |
73 | "if !CC jump 4;\n\t" | 73 | "CC = AC0;\n\t" |
74 | "%0 = %0 + %4;\n\t" | 74 | "%1 = CC;\n\t" |
75 | "%0 = %0 + %3;\n\t" | 75 | "%0 = %0 + %1;\n\t" |
76 | "CC = AC0;\n\t" | 76 | "%0 = %0 + %4;\n\t" |
77 | "if !CC jump 4;\n\t" | 77 | "CC = AC0;\n\t" |
78 | "%0 = %0 + %4;\n\t" | 78 | "%1 = CC;\n\t" |
79 | "NOP;\n\t" | 79 | "%0 = %0 + %1;\n\t" |
80 | : "=d" (sum) | 80 | : "=d" (sum), "=&d" (carry) |
81 | : "d" (daddr), "d" (saddr), "d" ((ntohs(len)<<16)+proto*256), "d" (1), "0"(sum) | 81 | : "d" (daddr), "d" (saddr), "d" ((len + proto) << 8), "0"(sum) |
82 | : "CC"); | 82 | : "CC"); |
83 | 83 | ||
84 | return (sum); | 84 | return (sum); |
85 | } | 85 | } |
diff --git a/arch/blackfin/include/asm/delay.h b/arch/blackfin/include/asm/delay.h index 0889c3abb593..c31f91cc1d5d 100644 --- a/arch/blackfin/include/asm/delay.h +++ b/arch/blackfin/include/asm/delay.h | |||
@@ -13,29 +13,7 @@ | |||
13 | 13 | ||
14 | static inline void __delay(unsigned long loops) | 14 | static inline void __delay(unsigned long loops) |
15 | { | 15 | { |
16 | if (ANOMALY_05000312) { | 16 | __asm__ __volatile__ ( |
17 | /* Interrupted loads to loop registers -> bad */ | ||
18 | unsigned long tmp; | ||
19 | __asm__ __volatile__( | ||
20 | "[--SP] = LC0;" | ||
21 | "[--SP] = LT0;" | ||
22 | "[--SP] = LB0;" | ||
23 | "LSETUP (1f,1f) LC0 = %1;" | ||
24 | "1: NOP;" | ||
25 | /* We take advantage of the fact that LC0 is 0 at | ||
26 | * the end of the loop. Otherwise we'd need some | ||
27 | * NOPs after the CLI here. | ||
28 | */ | ||
29 | "CLI %0;" | ||
30 | "LB0 = [SP++];" | ||
31 | "LT0 = [SP++];" | ||
32 | "LC0 = [SP++];" | ||
33 | "STI %0;" | ||
34 | : "=d" (tmp) | ||
35 | : "a" (loops) | ||
36 | ); | ||
37 | } else | ||
38 | __asm__ __volatile__ ( | ||
39 | "LSETUP(1f, 1f) LC0 = %0;" | 17 | "LSETUP(1f, 1f) LC0 = %0;" |
40 | "1: NOP;" | 18 | "1: NOP;" |
41 | : | 19 | : |
@@ -47,16 +25,15 @@ static inline void __delay(unsigned long loops) | |||
47 | #include <linux/param.h> /* needed for HZ */ | 25 | #include <linux/param.h> /* needed for HZ */ |
48 | 26 | ||
49 | /* | 27 | /* |
50 | * Use only for very small delays ( < 1 msec). Should probably use a | 28 | * close approximation borrowed from m68knommu to avoid 64-bit math |
51 | * lookup table, really, as the multiplications take much too long with | ||
52 | * short delays. This is a "reasonable" implementation, though (and the | ||
53 | * first constant multiplications gets optimized away if the delay is | ||
54 | * a constant) | ||
55 | */ | 29 | */ |
30 | |||
31 | #define HZSCALE (268435456 / (1000000/HZ)) | ||
32 | |||
56 | static inline void udelay(unsigned long usecs) | 33 | static inline void udelay(unsigned long usecs) |
57 | { | 34 | { |
58 | extern unsigned long loops_per_jiffy; | 35 | extern unsigned long loops_per_jiffy; |
59 | __delay(usecs * loops_per_jiffy / (1000000 / HZ)); | 36 | __delay((((usecs * HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6); |
60 | } | 37 | } |
61 | 38 | ||
62 | #endif | 39 | #endif |
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index 9477d82fcad2..d4a082ef75b4 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h | |||
@@ -27,60 +27,6 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | ||
31 | * Number BF537/6/4 BF561 BF533/2/1 | ||
32 | * BF527/5/2 | ||
33 | * | ||
34 | * GPIO_0 PF0 PF0 PF0 | ||
35 | * GPIO_1 PF1 PF1 PF1 | ||
36 | * GPIO_2 PF2 PF2 PF2 | ||
37 | * GPIO_3 PF3 PF3 PF3 | ||
38 | * GPIO_4 PF4 PF4 PF4 | ||
39 | * GPIO_5 PF5 PF5 PF5 | ||
40 | * GPIO_6 PF6 PF6 PF6 | ||
41 | * GPIO_7 PF7 PF7 PF7 | ||
42 | * GPIO_8 PF8 PF8 PF8 | ||
43 | * GPIO_9 PF9 PF9 PF9 | ||
44 | * GPIO_10 PF10 PF10 PF10 | ||
45 | * GPIO_11 PF11 PF11 PF11 | ||
46 | * GPIO_12 PF12 PF12 PF12 | ||
47 | * GPIO_13 PF13 PF13 PF13 | ||
48 | * GPIO_14 PF14 PF14 PF14 | ||
49 | * GPIO_15 PF15 PF15 PF15 | ||
50 | * GPIO_16 PG0 PF16 | ||
51 | * GPIO_17 PG1 PF17 | ||
52 | * GPIO_18 PG2 PF18 | ||
53 | * GPIO_19 PG3 PF19 | ||
54 | * GPIO_20 PG4 PF20 | ||
55 | * GPIO_21 PG5 PF21 | ||
56 | * GPIO_22 PG6 PF22 | ||
57 | * GPIO_23 PG7 PF23 | ||
58 | * GPIO_24 PG8 PF24 | ||
59 | * GPIO_25 PG9 PF25 | ||
60 | * GPIO_26 PG10 PF26 | ||
61 | * GPIO_27 PG11 PF27 | ||
62 | * GPIO_28 PG12 PF28 | ||
63 | * GPIO_29 PG13 PF29 | ||
64 | * GPIO_30 PG14 PF30 | ||
65 | * GPIO_31 PG15 PF31 | ||
66 | * GPIO_32 PH0 PF32 | ||
67 | * GPIO_33 PH1 PF33 | ||
68 | * GPIO_34 PH2 PF34 | ||
69 | * GPIO_35 PH3 PF35 | ||
70 | * GPIO_36 PH4 PF36 | ||
71 | * GPIO_37 PH5 PF37 | ||
72 | * GPIO_38 PH6 PF38 | ||
73 | * GPIO_39 PH7 PF39 | ||
74 | * GPIO_40 PH8 PF40 | ||
75 | * GPIO_41 PH9 PF41 | ||
76 | * GPIO_42 PH10 PF42 | ||
77 | * GPIO_43 PH11 PF43 | ||
78 | * GPIO_44 PH12 PF44 | ||
79 | * GPIO_45 PH13 PF45 | ||
80 | * GPIO_46 PH14 PF46 | ||
81 | * GPIO_47 PH15 PF47 | ||
82 | */ | ||
83 | |||
84 | #ifndef __ARCH_BLACKFIN_GPIO_H__ | 30 | #ifndef __ARCH_BLACKFIN_GPIO_H__ |
85 | #define __ARCH_BLACKFIN_GPIO_H__ | 31 | #define __ARCH_BLACKFIN_GPIO_H__ |
86 | 32 | ||
@@ -295,10 +241,6 @@ int bfin_gpio_direction_output(unsigned gpio, int value); | |||
295 | int bfin_gpio_get_value(unsigned gpio); | 241 | int bfin_gpio_get_value(unsigned gpio); |
296 | void bfin_gpio_set_value(unsigned gpio, int value); | 242 | void bfin_gpio_set_value(unsigned gpio, int value); |
297 | 243 | ||
298 | #ifndef BF548_FAMILY | ||
299 | #define bfin_gpio_set_value(gpio, value) set_gpio_data(gpio, value) | ||
300 | #endif | ||
301 | |||
302 | #ifdef CONFIG_GPIOLIB | 244 | #ifdef CONFIG_GPIOLIB |
303 | #include <asm-generic/gpio.h> /* cansleep wrappers */ | 245 | #include <asm-generic/gpio.h> /* cansleep wrappers */ |
304 | 246 | ||
diff --git a/arch/blackfin/include/asm/kgdb.h b/arch/blackfin/include/asm/kgdb.h index 26ebac6646d8..c8b256d2ea30 100644 --- a/arch/blackfin/include/asm/kgdb.h +++ b/arch/blackfin/include/asm/kgdb.h | |||
@@ -1,32 +1,8 @@ | |||
1 | /* | 1 | /* Blackfin KGDB header |
2 | * File: include/asm-blackfin/kgdb.h | ||
3 | * Based on: | ||
4 | * Author: Sonic Zhang | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: | ||
8 | * | ||
9 | * Rev: $Id: kgdb_bfin_linux-2.6.x.patch 4934 2007-02-13 09:32:11Z sonicz $ | ||
10 | * | ||
11 | * Modified: | ||
12 | * Copyright 2005-2006 Analog Devices Inc. | ||
13 | * | ||
14 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
15 | * | 2 | * |
16 | * This program is free software; you can redistribute it and/or modify | 3 | * Copyright 2005-2009 Analog Devices Inc. |
17 | * it under the terms of the GNU General Public License as published by | ||
18 | * the Free Software Foundation; either version 2 of the License, or | ||
19 | * (at your option) any later version. | ||
20 | * | 4 | * |
21 | * This program is distributed in the hope that it will be useful, | 5 | * Licensed under the GPL-2 or later. |
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
24 | * GNU General Public License for more details. | ||
25 | * | ||
26 | * You should have received a copy of the GNU General Public License | ||
27 | * along with this program; if not, see the file COPYING, or write | ||
28 | * to the Free Software Foundation, Inc., | ||
29 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
30 | */ | 6 | */ |
31 | 7 | ||
32 | #ifndef __ASM_BLACKFIN_KGDB_H__ | 8 | #ifndef __ASM_BLACKFIN_KGDB_H__ |
@@ -37,17 +13,18 @@ | |||
37 | /* gdb locks */ | 13 | /* gdb locks */ |
38 | #define KGDB_MAX_NO_CPUS 8 | 14 | #define KGDB_MAX_NO_CPUS 8 |
39 | 15 | ||
40 | /************************************************************************/ | 16 | /* |
41 | /* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ | 17 | * BUFMAX defines the maximum number of characters in inbound/outbound buffers. |
42 | /* at least NUMREGBYTES*2 are needed for register packets */ | 18 | * At least NUMREGBYTES*2 are needed for register packets. |
43 | /* Longer buffer is needed to list all threads */ | 19 | * Longer buffer is needed to list all threads. |
20 | */ | ||
44 | #define BUFMAX 2048 | 21 | #define BUFMAX 2048 |
45 | 22 | ||
46 | /* | 23 | /* |
47 | * Note that this register image is different from | 24 | * Note that this register image is different from |
48 | * the register image that Linux produces at interrupt time. | 25 | * the register image that Linux produces at interrupt time. |
49 | * | 26 | * |
50 | * Linux's register image is defined by struct pt_regs in ptrace.h. | 27 | * Linux's register image is defined by struct pt_regs in ptrace.h. |
51 | */ | 28 | */ |
52 | enum regnames { | 29 | enum regnames { |
53 | /* Core Registers */ | 30 | /* Core Registers */ |
@@ -104,14 +81,14 @@ enum regnames { | |||
104 | BFIN_RETX, | 81 | BFIN_RETX, |
105 | BFIN_RETN, | 82 | BFIN_RETN, |
106 | BFIN_RETE, | 83 | BFIN_RETE, |
107 | 84 | ||
108 | /* Pseudo Registers */ | 85 | /* Pseudo Registers */ |
109 | BFIN_PC, | 86 | BFIN_PC, |
110 | BFIN_CC, | 87 | BFIN_CC, |
111 | BFIN_EXTRA1, /* Address of .text section. */ | 88 | BFIN_EXTRA1, /* Address of .text section. */ |
112 | BFIN_EXTRA2, /* Address of .data section. */ | 89 | BFIN_EXTRA2, /* Address of .data section. */ |
113 | BFIN_EXTRA3, /* Address of .bss section. */ | 90 | BFIN_EXTRA3, /* Address of .bss section. */ |
114 | BFIN_FDPIC_EXEC, | 91 | BFIN_FDPIC_EXEC, |
115 | BFIN_FDPIC_INTERP, | 92 | BFIN_FDPIC_INTERP, |
116 | 93 | ||
117 | /* MMRs */ | 94 | /* MMRs */ |
@@ -126,7 +103,7 @@ enum regnames { | |||
126 | 103 | ||
127 | static inline void arch_kgdb_breakpoint(void) | 104 | static inline void arch_kgdb_breakpoint(void) |
128 | { | 105 | { |
129 | asm(" EXCPT 2;"); | 106 | asm("EXCPT 2;"); |
130 | } | 107 | } |
131 | #define BREAK_INSTR_SIZE 2 | 108 | #define BREAK_INSTR_SIZE 2 |
132 | #define CACHE_FLUSH_IS_SAFE 1 | 109 | #define CACHE_FLUSH_IS_SAFE 1 |
diff --git a/arch/blackfin/include/asm/mem_init.h b/arch/blackfin/include/asm/mem_init.h index 255a9316ad36..61f7487fbf12 100644 --- a/arch/blackfin/include/asm/mem_init.h +++ b/arch/blackfin/include/asm/mem_init.h | |||
@@ -115,7 +115,7 @@ | |||
115 | #define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) | 115 | #define mem_SDRRC (((CONFIG_SCLK_HZ / 1000) * SDRAM_Tref) / SDRAM_NRA) - (SDRAM_tRAS_num + SDRAM_tRP_num) |
116 | 116 | ||
117 | /* Enable SCLK Out */ | 117 | /* Enable SCLK Out */ |
118 | #define mem_SDGCTL (0x80000000 | SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS) | 118 | #define mem_SDGCTL (SCTLE | SDRAM_CL | SDRAM_tRAS | SDRAM_tRP | SDRAM_tRCD | SDRAM_tWR | PSS) |
119 | #else | 119 | #else |
120 | #define mem_SDRRC CONFIG_MEM_SDRRC | 120 | #define mem_SDRRC CONFIG_MEM_SDRRC |
121 | #define mem_SDGCTL CONFIG_MEM_SDGCTL | 121 | #define mem_SDGCTL CONFIG_MEM_SDGCTL |
diff --git a/arch/blackfin/include/asm/pda.h b/arch/blackfin/include/asm/pda.h index bd8d4a7efeb2..a67142740df0 100644 --- a/arch/blackfin/include/asm/pda.h +++ b/arch/blackfin/include/asm/pda.h | |||
@@ -59,6 +59,7 @@ struct blackfin_pda { /* Per-processor Data Area */ | |||
59 | unsigned long icplb_fault_addr; | 59 | unsigned long icplb_fault_addr; |
60 | unsigned long retx; | 60 | unsigned long retx; |
61 | unsigned long seqstat; | 61 | unsigned long seqstat; |
62 | unsigned int __nmi_count; /* number of times NMI asserted on this CPU */ | ||
62 | }; | 63 | }; |
63 | 64 | ||
64 | extern struct blackfin_pda cpu_pda[]; | 65 | extern struct blackfin_pda cpu_pda[]; |
diff --git a/arch/blackfin/include/asm/reboot.h b/arch/blackfin/include/asm/reboot.h index 4856d62b7467..ae1e36329bec 100644 --- a/arch/blackfin/include/asm/reboot.h +++ b/arch/blackfin/include/asm/reboot.h | |||
@@ -15,6 +15,6 @@ extern void native_machine_halt(void); | |||
15 | extern void native_machine_power_off(void); | 15 | extern void native_machine_power_off(void); |
16 | 16 | ||
17 | /* common reboot workarounds */ | 17 | /* common reboot workarounds */ |
18 | extern void bfin_gpio_reset_spi0_ssel1(void); | 18 | extern void bfin_reset_boot_spi_cs(unsigned short pin); |
19 | 19 | ||
20 | #endif | 20 | #endif |
diff --git a/arch/blackfin/kernel/Makefile b/arch/blackfin/kernel/Makefile index 38a233374f07..4a92a86824b7 100644 --- a/arch/blackfin/kernel/Makefile +++ b/arch/blackfin/kernel/Makefile | |||
@@ -15,6 +15,8 @@ else | |||
15 | obj-y += time.o | 15 | obj-y += time.o |
16 | endif | 16 | endif |
17 | 17 | ||
18 | CFLAGS_kgdb_test.o := -mlong-calls -O0 | ||
19 | |||
18 | obj-$(CONFIG_IPIPE) += ipipe.o | 20 | obj-$(CONFIG_IPIPE) += ipipe.o |
19 | obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount.o | 21 | obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount.o |
20 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o | 22 | obj-$(CONFIG_BFIN_GPTIMERS) += gptimers.o |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 07e02c0d1c07..8531693fb48d 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -249,6 +249,13 @@ static void __dma_memcpy(u32 daddr, s16 dmod, u32 saddr, s16 smod, size_t cnt, u | |||
249 | 249 | ||
250 | spin_lock_irqsave(&mdma_lock, flags); | 250 | spin_lock_irqsave(&mdma_lock, flags); |
251 | 251 | ||
252 | /* Force a sync in case a previous config reset on this channel | ||
253 | * occurred. This is needed so subsequent writes to DMA registers | ||
254 | * are not spuriously lost/corrupted. Do it under irq lock and | ||
255 | * without the anomaly version (because we are atomic already). | ||
256 | */ | ||
257 | __builtin_bfin_ssync(); | ||
258 | |||
252 | if (bfin_read_MDMA_S0_CONFIG()) | 259 | if (bfin_read_MDMA_S0_CONFIG()) |
253 | while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) | 260 | while (!(bfin_read_MDMA_D0_IRQ_STATUS() & DMA_DONE)) |
254 | continue; | 261 | continue; |
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 4c14331978f6..51dac55c524a 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -27,59 +27,6 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | /* | ||
31 | * Number BF537/6/4 BF561 BF533/2/1 BF549/8/4/2 | ||
32 | * | ||
33 | * GPIO_0 PF0 PF0 PF0 PA0...PJ13 | ||
34 | * GPIO_1 PF1 PF1 PF1 | ||
35 | * GPIO_2 PF2 PF2 PF2 | ||
36 | * GPIO_3 PF3 PF3 PF3 | ||
37 | * GPIO_4 PF4 PF4 PF4 | ||
38 | * GPIO_5 PF5 PF5 PF5 | ||
39 | * GPIO_6 PF6 PF6 PF6 | ||
40 | * GPIO_7 PF7 PF7 PF7 | ||
41 | * GPIO_8 PF8 PF8 PF8 | ||
42 | * GPIO_9 PF9 PF9 PF9 | ||
43 | * GPIO_10 PF10 PF10 PF10 | ||
44 | * GPIO_11 PF11 PF11 PF11 | ||
45 | * GPIO_12 PF12 PF12 PF12 | ||
46 | * GPIO_13 PF13 PF13 PF13 | ||
47 | * GPIO_14 PF14 PF14 PF14 | ||
48 | * GPIO_15 PF15 PF15 PF15 | ||
49 | * GPIO_16 PG0 PF16 | ||
50 | * GPIO_17 PG1 PF17 | ||
51 | * GPIO_18 PG2 PF18 | ||
52 | * GPIO_19 PG3 PF19 | ||
53 | * GPIO_20 PG4 PF20 | ||
54 | * GPIO_21 PG5 PF21 | ||
55 | * GPIO_22 PG6 PF22 | ||
56 | * GPIO_23 PG7 PF23 | ||
57 | * GPIO_24 PG8 PF24 | ||
58 | * GPIO_25 PG9 PF25 | ||
59 | * GPIO_26 PG10 PF26 | ||
60 | * GPIO_27 PG11 PF27 | ||
61 | * GPIO_28 PG12 PF28 | ||
62 | * GPIO_29 PG13 PF29 | ||
63 | * GPIO_30 PG14 PF30 | ||
64 | * GPIO_31 PG15 PF31 | ||
65 | * GPIO_32 PH0 PF32 | ||
66 | * GPIO_33 PH1 PF33 | ||
67 | * GPIO_34 PH2 PF34 | ||
68 | * GPIO_35 PH3 PF35 | ||
69 | * GPIO_36 PH4 PF36 | ||
70 | * GPIO_37 PH5 PF37 | ||
71 | * GPIO_38 PH6 PF38 | ||
72 | * GPIO_39 PH7 PF39 | ||
73 | * GPIO_40 PH8 PF40 | ||
74 | * GPIO_41 PH9 PF41 | ||
75 | * GPIO_42 PH10 PF42 | ||
76 | * GPIO_43 PH11 PF43 | ||
77 | * GPIO_44 PH12 PF44 | ||
78 | * GPIO_45 PH13 PF45 | ||
79 | * GPIO_46 PH14 PF46 | ||
80 | * GPIO_47 PH15 PF47 | ||
81 | */ | ||
82 | |||
83 | #include <linux/delay.h> | 30 | #include <linux/delay.h> |
84 | #include <linux/module.h> | 31 | #include <linux/module.h> |
85 | #include <linux/err.h> | 32 | #include <linux/err.h> |
@@ -119,62 +66,61 @@ enum { | |||
119 | #define AWA_DUMMY_READ(...) do { } while (0) | 66 | #define AWA_DUMMY_READ(...) do { } while (0) |
120 | #endif | 67 | #endif |
121 | 68 | ||
69 | static struct gpio_port_t * const gpio_array[] = { | ||
122 | #if defined(BF533_FAMILY) || defined(BF538_FAMILY) | 70 | #if defined(BF533_FAMILY) || defined(BF538_FAMILY) |
123 | static struct gpio_port_t *gpio_bankb[] = { | ||
124 | (struct gpio_port_t *) FIO_FLAG_D, | 71 | (struct gpio_port_t *) FIO_FLAG_D, |
125 | }; | 72 | #elif defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
126 | #endif | ||
127 | |||
128 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) | ||
129 | static struct gpio_port_t *gpio_bankb[] = { | ||
130 | (struct gpio_port_t *) PORTFIO, | 73 | (struct gpio_port_t *) PORTFIO, |
131 | (struct gpio_port_t *) PORTGIO, | 74 | (struct gpio_port_t *) PORTGIO, |
132 | (struct gpio_port_t *) PORTHIO, | 75 | (struct gpio_port_t *) PORTHIO, |
76 | #elif defined(BF561_FAMILY) | ||
77 | (struct gpio_port_t *) FIO0_FLAG_D, | ||
78 | (struct gpio_port_t *) FIO1_FLAG_D, | ||
79 | (struct gpio_port_t *) FIO2_FLAG_D, | ||
80 | #elif defined(BF548_FAMILY) | ||
81 | (struct gpio_port_t *)PORTA_FER, | ||
82 | (struct gpio_port_t *)PORTB_FER, | ||
83 | (struct gpio_port_t *)PORTC_FER, | ||
84 | (struct gpio_port_t *)PORTD_FER, | ||
85 | (struct gpio_port_t *)PORTE_FER, | ||
86 | (struct gpio_port_t *)PORTF_FER, | ||
87 | (struct gpio_port_t *)PORTG_FER, | ||
88 | (struct gpio_port_t *)PORTH_FER, | ||
89 | (struct gpio_port_t *)PORTI_FER, | ||
90 | (struct gpio_port_t *)PORTJ_FER, | ||
91 | #else | ||
92 | # error no gpio arrays defined | ||
93 | #endif | ||
133 | }; | 94 | }; |
134 | 95 | ||
135 | static unsigned short *port_fer[] = { | 96 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
97 | static unsigned short * const port_fer[] = { | ||
136 | (unsigned short *) PORTF_FER, | 98 | (unsigned short *) PORTF_FER, |
137 | (unsigned short *) PORTG_FER, | 99 | (unsigned short *) PORTG_FER, |
138 | (unsigned short *) PORTH_FER, | 100 | (unsigned short *) PORTH_FER, |
139 | }; | 101 | }; |
140 | #endif | ||
141 | 102 | ||
142 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) | 103 | # if !defined(BF537_FAMILY) |
143 | static unsigned short *port_mux[] = { | 104 | static unsigned short * const port_mux[] = { |
144 | (unsigned short *) PORTF_MUX, | 105 | (unsigned short *) PORTF_MUX, |
145 | (unsigned short *) PORTG_MUX, | 106 | (unsigned short *) PORTG_MUX, |
146 | (unsigned short *) PORTH_MUX, | 107 | (unsigned short *) PORTH_MUX, |
147 | }; | 108 | }; |
148 | 109 | ||
149 | static const | 110 | static const |
150 | u8 pmux_offset[][16] = | 111 | u8 pmux_offset[][16] = { |
151 | {{ 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 8, 10, 10 }, /* PORTF */ | 112 | # if defined(BF527_FAMILY) |
152 | { 0, 0, 0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 10, 12, 12 }, /* PORTG */ | 113 | { 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 4, 6, 8, 8, 10, 10 }, /* PORTF */ |
153 | { 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 4, 4 }, /* PORTH */ | 114 | { 0, 0, 0, 0, 0, 2, 2, 4, 4, 6, 8, 10, 10, 10, 12, 12 }, /* PORTG */ |
154 | }; | 115 | { 0, 0, 0, 0, 0, 0, 0, 0, 2, 4, 4, 4, 4, 4, 4, 4 }, /* PORTH */ |
155 | #endif | 116 | # elif defined(BF518_FAMILY) |
156 | 117 | { 0, 2, 2, 2, 2, 2, 2, 4, 6, 6, 6, 8, 8, 8, 8, 10 }, /* PORTF */ | |
157 | #ifdef BF561_FAMILY | 118 | { 0, 0, 0, 2, 4, 6, 6, 6, 8, 10, 10, 12, 14, 14, 14, 14 }, /* PORTG */ |
158 | static struct gpio_port_t *gpio_bankb[] = { | 119 | { 0, 0, 0, 0, 2, 2, 4, 6, 10, 10, 10, 10, 10, 10, 10, 10 }, /* PORTH */ |
159 | (struct gpio_port_t *) FIO0_FLAG_D, | 120 | # endif |
160 | (struct gpio_port_t *) FIO1_FLAG_D, | ||
161 | (struct gpio_port_t *) FIO2_FLAG_D, | ||
162 | }; | 121 | }; |
163 | #endif | 122 | # endif |
164 | 123 | ||
165 | #ifdef BF548_FAMILY | ||
166 | static struct gpio_port_t *gpio_array[] = { | ||
167 | (struct gpio_port_t *)PORTA_FER, | ||
168 | (struct gpio_port_t *)PORTB_FER, | ||
169 | (struct gpio_port_t *)PORTC_FER, | ||
170 | (struct gpio_port_t *)PORTD_FER, | ||
171 | (struct gpio_port_t *)PORTE_FER, | ||
172 | (struct gpio_port_t *)PORTF_FER, | ||
173 | (struct gpio_port_t *)PORTG_FER, | ||
174 | (struct gpio_port_t *)PORTH_FER, | ||
175 | (struct gpio_port_t *)PORTI_FER, | ||
176 | (struct gpio_port_t *)PORTJ_FER, | ||
177 | }; | ||
178 | #endif | 124 | #endif |
179 | 125 | ||
180 | static unsigned short reserved_gpio_map[GPIO_BANK_NUM]; | 126 | static unsigned short reserved_gpio_map[GPIO_BANK_NUM]; |
@@ -188,35 +134,9 @@ static struct str_ident { | |||
188 | } str_ident[MAX_RESOURCES]; | 134 | } str_ident[MAX_RESOURCES]; |
189 | 135 | ||
190 | #if defined(CONFIG_PM) | 136 | #if defined(CONFIG_PM) |
191 | #if defined(CONFIG_BF54x) | ||
192 | static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; | ||
193 | #else | ||
194 | static unsigned short wakeup_map[GPIO_BANK_NUM]; | ||
195 | static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS]; | ||
196 | static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; | 137 | static struct gpio_port_s gpio_bank_saved[GPIO_BANK_NUM]; |
197 | |||
198 | #ifdef BF533_FAMILY | ||
199 | static unsigned int sic_iwr_irqs[] = {IRQ_PROG_INTB}; | ||
200 | #endif | ||
201 | |||
202 | #ifdef BF537_FAMILY | ||
203 | static unsigned int sic_iwr_irqs[] = {IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX}; | ||
204 | #endif | ||
205 | |||
206 | #ifdef BF538_FAMILY | ||
207 | static unsigned int sic_iwr_irqs[] = {IRQ_PORTF_INTB}; | ||
208 | #endif | 138 | #endif |
209 | 139 | ||
210 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) | ||
211 | static unsigned int sic_iwr_irqs[] = {IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB}; | ||
212 | #endif | ||
213 | |||
214 | #ifdef BF561_FAMILY | ||
215 | static unsigned int sic_iwr_irqs[] = {IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB}; | ||
216 | #endif | ||
217 | #endif | ||
218 | #endif /* CONFIG_PM */ | ||
219 | |||
220 | inline int check_gpio(unsigned gpio) | 140 | inline int check_gpio(unsigned gpio) |
221 | { | 141 | { |
222 | #if defined(BF548_FAMILY) | 142 | #if defined(BF548_FAMILY) |
@@ -330,9 +250,10 @@ static struct { | |||
330 | {.res = P_SPI0_SSEL3, .offset = 0}, | 250 | {.res = P_SPI0_SSEL3, .offset = 0}, |
331 | }; | 251 | }; |
332 | 252 | ||
333 | static void portmux_setup(unsigned short per, unsigned short function) | 253 | static void portmux_setup(unsigned short per) |
334 | { | 254 | { |
335 | u16 y, offset, muxreg; | 255 | u16 y, offset, muxreg; |
256 | u16 function = P_FUNCT2MUX(per); | ||
336 | 257 | ||
337 | for (y = 0; y < ARRAY_SIZE(port_mux_lut); y++) { | 258 | for (y = 0; y < ARRAY_SIZE(port_mux_lut); y++) { |
338 | if (port_mux_lut[y].res == per) { | 259 | if (port_mux_lut[y].res == per) { |
@@ -353,30 +274,33 @@ static void portmux_setup(unsigned short per, unsigned short function) | |||
353 | } | 274 | } |
354 | } | 275 | } |
355 | #elif defined(BF548_FAMILY) | 276 | #elif defined(BF548_FAMILY) |
356 | inline void portmux_setup(unsigned short portno, unsigned short function) | 277 | inline void portmux_setup(unsigned short per) |
357 | { | 278 | { |
358 | u32 pmux; | 279 | u32 pmux; |
280 | u16 ident = P_IDENT(per); | ||
281 | u16 function = P_FUNCT2MUX(per); | ||
359 | 282 | ||
360 | pmux = gpio_array[gpio_bank(portno)]->port_mux; | 283 | pmux = gpio_array[gpio_bank(ident)]->port_mux; |
361 | 284 | ||
362 | pmux &= ~(0x3 << (2 * gpio_sub_n(portno))); | 285 | pmux &= ~(0x3 << (2 * gpio_sub_n(ident))); |
363 | pmux |= (function & 0x3) << (2 * gpio_sub_n(portno)); | 286 | pmux |= (function & 0x3) << (2 * gpio_sub_n(ident)); |
364 | 287 | ||
365 | gpio_array[gpio_bank(portno)]->port_mux = pmux; | 288 | gpio_array[gpio_bank(ident)]->port_mux = pmux; |
366 | } | 289 | } |
367 | 290 | ||
368 | inline u16 get_portmux(unsigned short portno) | 291 | inline u16 get_portmux(unsigned short per) |
369 | { | 292 | { |
370 | u32 pmux; | 293 | u32 pmux; |
294 | u16 ident = P_IDENT(per); | ||
371 | 295 | ||
372 | pmux = gpio_array[gpio_bank(portno)]->port_mux; | 296 | pmux = gpio_array[gpio_bank(ident)]->port_mux; |
373 | 297 | ||
374 | return (pmux >> (2 * gpio_sub_n(portno)) & 0x3); | 298 | return (pmux >> (2 * gpio_sub_n(ident)) & 0x3); |
375 | } | 299 | } |
376 | #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) | 300 | #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) |
377 | inline void portmux_setup(unsigned short portno, unsigned short function) | 301 | inline void portmux_setup(unsigned short per) |
378 | { | 302 | { |
379 | u16 pmux, ident = P_IDENT(portno); | 303 | u16 pmux, ident = P_IDENT(per), function = P_FUNCT2MUX(per); |
380 | u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)]; | 304 | u8 offset = pmux_offset[gpio_bank(ident)][gpio_sub_n(ident)]; |
381 | 305 | ||
382 | pmux = *port_mux[gpio_bank(ident)]; | 306 | pmux = *port_mux[gpio_bank(ident)]; |
@@ -424,90 +348,71 @@ void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ | |||
424 | unsigned long flags; \ | 348 | unsigned long flags; \ |
425 | local_irq_save_hw(flags); \ | 349 | local_irq_save_hw(flags); \ |
426 | if (arg) \ | 350 | if (arg) \ |
427 | gpio_bankb[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ | 351 | gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ |
428 | else \ | 352 | else \ |
429 | gpio_bankb[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ | 353 | gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ |
430 | AWA_DUMMY_READ(name); \ | 354 | AWA_DUMMY_READ(name); \ |
431 | local_irq_restore_hw(flags); \ | 355 | local_irq_restore_hw(flags); \ |
432 | } \ | 356 | } \ |
433 | EXPORT_SYMBOL(set_gpio_ ## name); | 357 | EXPORT_SYMBOL(set_gpio_ ## name); |
434 | 358 | ||
435 | SET_GPIO(dir) | 359 | SET_GPIO(dir) /* set_gpio_dir() */ |
436 | SET_GPIO(inen) | 360 | SET_GPIO(inen) /* set_gpio_inen() */ |
437 | SET_GPIO(polar) | 361 | SET_GPIO(polar) /* set_gpio_polar() */ |
438 | SET_GPIO(edge) | 362 | SET_GPIO(edge) /* set_gpio_edge() */ |
439 | SET_GPIO(both) | 363 | SET_GPIO(both) /* set_gpio_both() */ |
440 | 364 | ||
441 | 365 | ||
442 | #if ANOMALY_05000311 || ANOMALY_05000323 | ||
443 | #define SET_GPIO_SC(name) \ | 366 | #define SET_GPIO_SC(name) \ |
444 | void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ | 367 | void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ |
445 | { \ | 368 | { \ |
446 | unsigned long flags; \ | 369 | unsigned long flags; \ |
447 | local_irq_save_hw(flags); \ | 370 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
448 | if (arg) \ | 371 | local_irq_save_hw(flags); \ |
449 | gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ | ||
450 | else \ | ||
451 | gpio_bankb[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ | ||
452 | AWA_DUMMY_READ(name); \ | ||
453 | local_irq_restore_hw(flags); \ | ||
454 | } \ | ||
455 | EXPORT_SYMBOL(set_gpio_ ## name); | ||
456 | #else | ||
457 | #define SET_GPIO_SC(name) \ | ||
458 | void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ | ||
459 | { \ | ||
460 | if (arg) \ | 372 | if (arg) \ |
461 | gpio_bankb[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ | 373 | gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ |
462 | else \ | 374 | else \ |
463 | gpio_bankb[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ | 375 | gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ |
376 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ | ||
377 | AWA_DUMMY_READ(name); \ | ||
378 | local_irq_restore_hw(flags); \ | ||
379 | } \ | ||
464 | } \ | 380 | } \ |
465 | EXPORT_SYMBOL(set_gpio_ ## name); | 381 | EXPORT_SYMBOL(set_gpio_ ## name); |
466 | #endif | ||
467 | 382 | ||
468 | SET_GPIO_SC(maska) | 383 | SET_GPIO_SC(maska) |
469 | SET_GPIO_SC(maskb) | 384 | SET_GPIO_SC(maskb) |
470 | SET_GPIO_SC(data) | 385 | SET_GPIO_SC(data) |
471 | 386 | ||
472 | #if ANOMALY_05000311 || ANOMALY_05000323 | ||
473 | void set_gpio_toggle(unsigned gpio) | 387 | void set_gpio_toggle(unsigned gpio) |
474 | { | 388 | { |
475 | unsigned long flags; | 389 | unsigned long flags; |
476 | local_irq_save_hw(flags); | 390 | if (ANOMALY_05000311 || ANOMALY_05000323) |
477 | gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); | 391 | local_irq_save_hw(flags); |
478 | AWA_DUMMY_READ(toggle); | 392 | gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio); |
479 | local_irq_restore_hw(flags); | 393 | if (ANOMALY_05000311 || ANOMALY_05000323) { |
480 | } | 394 | AWA_DUMMY_READ(toggle); |
481 | #else | 395 | local_irq_restore_hw(flags); |
482 | void set_gpio_toggle(unsigned gpio) | 396 | } |
483 | { | ||
484 | gpio_bankb[gpio_bank(gpio)]->toggle = gpio_bit(gpio); | ||
485 | } | 397 | } |
486 | #endif | ||
487 | EXPORT_SYMBOL(set_gpio_toggle); | 398 | EXPORT_SYMBOL(set_gpio_toggle); |
488 | 399 | ||
489 | 400 | ||
490 | /*Set current PORT date (16-bit word)*/ | 401 | /*Set current PORT date (16-bit word)*/ |
491 | 402 | ||
492 | #if ANOMALY_05000311 || ANOMALY_05000323 | ||
493 | #define SET_GPIO_P(name) \ | 403 | #define SET_GPIO_P(name) \ |
494 | void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \ | 404 | void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \ |
495 | { \ | 405 | { \ |
496 | unsigned long flags; \ | 406 | unsigned long flags; \ |
497 | local_irq_save_hw(flags); \ | 407 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
498 | gpio_bankb[gpio_bank(gpio)]->name = arg; \ | 408 | local_irq_save_hw(flags); \ |
499 | AWA_DUMMY_READ(name); \ | 409 | gpio_array[gpio_bank(gpio)]->name = arg; \ |
500 | local_irq_restore_hw(flags); \ | 410 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
411 | AWA_DUMMY_READ(name); \ | ||
412 | local_irq_restore_hw(flags); \ | ||
413 | } \ | ||
501 | } \ | 414 | } \ |
502 | EXPORT_SYMBOL(set_gpiop_ ## name); | 415 | EXPORT_SYMBOL(set_gpiop_ ## name); |
503 | #else | ||
504 | #define SET_GPIO_P(name) \ | ||
505 | void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \ | ||
506 | { \ | ||
507 | gpio_bankb[gpio_bank(gpio)]->name = arg; \ | ||
508 | } \ | ||
509 | EXPORT_SYMBOL(set_gpiop_ ## name); | ||
510 | #endif | ||
511 | 416 | ||
512 | SET_GPIO_P(data) | 417 | SET_GPIO_P(data) |
513 | SET_GPIO_P(dir) | 418 | SET_GPIO_P(dir) |
@@ -519,27 +424,21 @@ SET_GPIO_P(maska) | |||
519 | SET_GPIO_P(maskb) | 424 | SET_GPIO_P(maskb) |
520 | 425 | ||
521 | /* Get a specific bit */ | 426 | /* Get a specific bit */ |
522 | #if ANOMALY_05000311 || ANOMALY_05000323 | ||
523 | #define GET_GPIO(name) \ | 427 | #define GET_GPIO(name) \ |
524 | unsigned short get_gpio_ ## name(unsigned gpio) \ | 428 | unsigned short get_gpio_ ## name(unsigned gpio) \ |
525 | { \ | 429 | { \ |
526 | unsigned long flags; \ | 430 | unsigned long flags; \ |
527 | unsigned short ret; \ | 431 | unsigned short ret; \ |
528 | local_irq_save_hw(flags); \ | 432 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
529 | ret = 0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ | 433 | local_irq_save_hw(flags); \ |
530 | AWA_DUMMY_READ(name); \ | 434 | ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ |
531 | local_irq_restore_hw(flags); \ | 435 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
436 | AWA_DUMMY_READ(name); \ | ||
437 | local_irq_restore_hw(flags); \ | ||
438 | } \ | ||
532 | return ret; \ | 439 | return ret; \ |
533 | } \ | 440 | } \ |
534 | EXPORT_SYMBOL(get_gpio_ ## name); | 441 | EXPORT_SYMBOL(get_gpio_ ## name); |
535 | #else | ||
536 | #define GET_GPIO(name) \ | ||
537 | unsigned short get_gpio_ ## name(unsigned gpio) \ | ||
538 | { \ | ||
539 | return (0x01 & (gpio_bankb[gpio_bank(gpio)]->name >> gpio_sub_n(gpio))); \ | ||
540 | } \ | ||
541 | EXPORT_SYMBOL(get_gpio_ ## name); | ||
542 | #endif | ||
543 | 442 | ||
544 | GET_GPIO(data) | 443 | GET_GPIO(data) |
545 | GET_GPIO(dir) | 444 | GET_GPIO(dir) |
@@ -552,27 +451,21 @@ GET_GPIO(maskb) | |||
552 | 451 | ||
553 | /*Get current PORT date (16-bit word)*/ | 452 | /*Get current PORT date (16-bit word)*/ |
554 | 453 | ||
555 | #if ANOMALY_05000311 || ANOMALY_05000323 | ||
556 | #define GET_GPIO_P(name) \ | 454 | #define GET_GPIO_P(name) \ |
557 | unsigned short get_gpiop_ ## name(unsigned gpio) \ | 455 | unsigned short get_gpiop_ ## name(unsigned gpio) \ |
558 | { \ | 456 | { \ |
559 | unsigned long flags; \ | 457 | unsigned long flags; \ |
560 | unsigned short ret; \ | 458 | unsigned short ret; \ |
561 | local_irq_save_hw(flags); \ | 459 | if (ANOMALY_05000311 || ANOMALY_05000323) \ |
562 | ret = (gpio_bankb[gpio_bank(gpio)]->name); \ | 460 | local_irq_save_hw(flags); \ |
563 | AWA_DUMMY_READ(name); \ | 461 | ret = (gpio_array[gpio_bank(gpio)]->name); \ |
564 | local_irq_restore_hw(flags); \ | 462 | if (ANOMALY_05000311 || ANOMALY_05000323) { \ |
463 | AWA_DUMMY_READ(name); \ | ||
464 | local_irq_restore_hw(flags); \ | ||
465 | } \ | ||
565 | return ret; \ | 466 | return ret; \ |
566 | } \ | 467 | } \ |
567 | EXPORT_SYMBOL(get_gpiop_ ## name); | 468 | EXPORT_SYMBOL(get_gpiop_ ## name); |
568 | #else | ||
569 | #define GET_GPIO_P(name) \ | ||
570 | unsigned short get_gpiop_ ## name(unsigned gpio) \ | ||
571 | { \ | ||
572 | return (gpio_bankb[gpio_bank(gpio)]->name);\ | ||
573 | } \ | ||
574 | EXPORT_SYMBOL(get_gpiop_ ## name); | ||
575 | #endif | ||
576 | 469 | ||
577 | GET_GPIO_P(data) | 470 | GET_GPIO_P(data) |
578 | GET_GPIO_P(dir) | 471 | GET_GPIO_P(dir) |
@@ -585,6 +478,26 @@ GET_GPIO_P(maskb) | |||
585 | 478 | ||
586 | 479 | ||
587 | #ifdef CONFIG_PM | 480 | #ifdef CONFIG_PM |
481 | |||
482 | static unsigned short wakeup_map[GPIO_BANK_NUM]; | ||
483 | static unsigned char wakeup_flags_map[MAX_BLACKFIN_GPIOS]; | ||
484 | |||
485 | static const unsigned int sic_iwr_irqs[] = { | ||
486 | #if defined(BF533_FAMILY) | ||
487 | IRQ_PROG_INTB | ||
488 | #elif defined(BF537_FAMILY) | ||
489 | IRQ_PROG_INTB, IRQ_PORTG_INTB, IRQ_MAC_TX | ||
490 | #elif defined(BF538_FAMILY) | ||
491 | IRQ_PORTF_INTB | ||
492 | #elif defined(BF527_FAMILY) || defined(BF518_FAMILY) | ||
493 | IRQ_PORTF_INTB, IRQ_PORTG_INTB, IRQ_PORTH_INTB | ||
494 | #elif defined(BF561_FAMILY) | ||
495 | IRQ_PROG0_INTB, IRQ_PROG1_INTB, IRQ_PROG2_INTB | ||
496 | #else | ||
497 | # error no SIC_IWR defined | ||
498 | #endif | ||
499 | }; | ||
500 | |||
588 | /*********************************************************** | 501 | /*********************************************************** |
589 | * | 502 | * |
590 | * FUNCTIONS: Blackfin PM Setup API | 503 | * FUNCTIONS: Blackfin PM Setup API |
@@ -669,18 +582,18 @@ u32 bfin_pm_standby_setup(void) | |||
669 | mask = wakeup_map[gpio_bank(i)]; | 582 | mask = wakeup_map[gpio_bank(i)]; |
670 | bank = gpio_bank(i); | 583 | bank = gpio_bank(i); |
671 | 584 | ||
672 | gpio_bank_saved[bank].maskb = gpio_bankb[bank]->maskb; | 585 | gpio_bank_saved[bank].maskb = gpio_array[bank]->maskb; |
673 | gpio_bankb[bank]->maskb = 0; | 586 | gpio_array[bank]->maskb = 0; |
674 | 587 | ||
675 | if (mask) { | 588 | if (mask) { |
676 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) | 589 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
677 | gpio_bank_saved[bank].fer = *port_fer[bank]; | 590 | gpio_bank_saved[bank].fer = *port_fer[bank]; |
678 | #endif | 591 | #endif |
679 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; | 592 | gpio_bank_saved[bank].inen = gpio_array[bank]->inen; |
680 | gpio_bank_saved[bank].polar = gpio_bankb[bank]->polar; | 593 | gpio_bank_saved[bank].polar = gpio_array[bank]->polar; |
681 | gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; | 594 | gpio_bank_saved[bank].dir = gpio_array[bank]->dir; |
682 | gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; | 595 | gpio_bank_saved[bank].edge = gpio_array[bank]->edge; |
683 | gpio_bank_saved[bank].both = gpio_bankb[bank]->both; | 596 | gpio_bank_saved[bank].both = gpio_array[bank]->both; |
684 | gpio_bank_saved[bank].reserved = | 597 | gpio_bank_saved[bank].reserved = |
685 | reserved_gpio_map[bank]; | 598 | reserved_gpio_map[bank]; |
686 | 599 | ||
@@ -700,7 +613,7 @@ u32 bfin_pm_standby_setup(void) | |||
700 | } | 613 | } |
701 | 614 | ||
702 | bfin_internal_set_wake(sic_iwr_irqs[bank], 1); | 615 | bfin_internal_set_wake(sic_iwr_irqs[bank], 1); |
703 | gpio_bankb[bank]->maskb_set = wakeup_map[gpio_bank(i)]; | 616 | gpio_array[bank]->maskb_set = wakeup_map[gpio_bank(i)]; |
704 | } | 617 | } |
705 | } | 618 | } |
706 | 619 | ||
@@ -721,18 +634,18 @@ void bfin_pm_standby_restore(void) | |||
721 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) | 634 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
722 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 635 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
723 | #endif | 636 | #endif |
724 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; | 637 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
725 | gpio_bankb[bank]->dir = gpio_bank_saved[bank].dir; | 638 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; |
726 | gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; | 639 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; |
727 | gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; | 640 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; |
728 | gpio_bankb[bank]->both = gpio_bank_saved[bank].both; | 641 | gpio_array[bank]->both = gpio_bank_saved[bank].both; |
729 | 642 | ||
730 | reserved_gpio_map[bank] = | 643 | reserved_gpio_map[bank] = |
731 | gpio_bank_saved[bank].reserved; | 644 | gpio_bank_saved[bank].reserved; |
732 | bfin_internal_set_wake(sic_iwr_irqs[bank], 0); | 645 | bfin_internal_set_wake(sic_iwr_irqs[bank], 0); |
733 | } | 646 | } |
734 | 647 | ||
735 | gpio_bankb[bank]->maskb = gpio_bank_saved[bank].maskb; | 648 | gpio_array[bank]->maskb = gpio_bank_saved[bank].maskb; |
736 | } | 649 | } |
737 | AWA_DUMMY_READ(maskb); | 650 | AWA_DUMMY_READ(maskb); |
738 | } | 651 | } |
@@ -745,21 +658,21 @@ void bfin_gpio_pm_hibernate_suspend(void) | |||
745 | bank = gpio_bank(i); | 658 | bank = gpio_bank(i); |
746 | 659 | ||
747 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) | 660 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
748 | gpio_bank_saved[bank].fer = *port_fer[bank]; | 661 | gpio_bank_saved[bank].fer = *port_fer[bank]; |
749 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) | 662 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
750 | gpio_bank_saved[bank].mux = *port_mux[bank]; | 663 | gpio_bank_saved[bank].mux = *port_mux[bank]; |
751 | #else | 664 | #else |
752 | if (bank == 0) | 665 | if (bank == 0) |
753 | gpio_bank_saved[bank].mux = bfin_read_PORT_MUX(); | 666 | gpio_bank_saved[bank].mux = bfin_read_PORT_MUX(); |
754 | #endif | 667 | #endif |
755 | #endif | 668 | #endif |
756 | gpio_bank_saved[bank].data = gpio_bankb[bank]->data; | 669 | gpio_bank_saved[bank].data = gpio_array[bank]->data; |
757 | gpio_bank_saved[bank].inen = gpio_bankb[bank]->inen; | 670 | gpio_bank_saved[bank].inen = gpio_array[bank]->inen; |
758 | gpio_bank_saved[bank].polar = gpio_bankb[bank]->polar; | 671 | gpio_bank_saved[bank].polar = gpio_array[bank]->polar; |
759 | gpio_bank_saved[bank].dir = gpio_bankb[bank]->dir; | 672 | gpio_bank_saved[bank].dir = gpio_array[bank]->dir; |
760 | gpio_bank_saved[bank].edge = gpio_bankb[bank]->edge; | 673 | gpio_bank_saved[bank].edge = gpio_array[bank]->edge; |
761 | gpio_bank_saved[bank].both = gpio_bankb[bank]->both; | 674 | gpio_bank_saved[bank].both = gpio_array[bank]->both; |
762 | gpio_bank_saved[bank].maska = gpio_bankb[bank]->maska; | 675 | gpio_bank_saved[bank].maska = gpio_array[bank]->maska; |
763 | } | 676 | } |
764 | 677 | ||
765 | AWA_DUMMY_READ(maska); | 678 | AWA_DUMMY_READ(maska); |
@@ -770,27 +683,27 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
770 | int i, bank; | 683 | int i, bank; |
771 | 684 | ||
772 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 685 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
773 | bank = gpio_bank(i); | 686 | bank = gpio_bank(i); |
774 | 687 | ||
775 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) | 688 | #if defined(BF527_FAMILY) || defined(BF537_FAMILY) || defined(BF518_FAMILY) |
776 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) | 689 | #if defined(BF527_FAMILY) || defined(BF518_FAMILY) |
777 | *port_mux[bank] = gpio_bank_saved[bank].mux; | 690 | *port_mux[bank] = gpio_bank_saved[bank].mux; |
778 | #else | 691 | #else |
779 | if (bank == 0) | 692 | if (bank == 0) |
780 | bfin_write_PORT_MUX(gpio_bank_saved[bank].mux); | 693 | bfin_write_PORT_MUX(gpio_bank_saved[bank].mux); |
781 | #endif | 694 | #endif |
782 | *port_fer[bank] = gpio_bank_saved[bank].fer; | 695 | *port_fer[bank] = gpio_bank_saved[bank].fer; |
783 | #endif | 696 | #endif |
784 | gpio_bankb[bank]->inen = gpio_bank_saved[bank].inen; | 697 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
785 | gpio_bankb[bank]->dir = gpio_bank_saved[bank].dir; | 698 | gpio_array[bank]->dir = gpio_bank_saved[bank].dir; |
786 | gpio_bankb[bank]->polar = gpio_bank_saved[bank].polar; | 699 | gpio_array[bank]->polar = gpio_bank_saved[bank].polar; |
787 | gpio_bankb[bank]->edge = gpio_bank_saved[bank].edge; | 700 | gpio_array[bank]->edge = gpio_bank_saved[bank].edge; |
788 | gpio_bankb[bank]->both = gpio_bank_saved[bank].both; | 701 | gpio_array[bank]->both = gpio_bank_saved[bank].both; |
789 | 702 | ||
790 | gpio_bankb[bank]->data_set = gpio_bank_saved[bank].data | 703 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data |
791 | | gpio_bank_saved[bank].dir; | 704 | | gpio_bank_saved[bank].dir; |
792 | 705 | ||
793 | gpio_bankb[bank]->maska = gpio_bank_saved[bank].maska; | 706 | gpio_array[bank]->maska = gpio_bank_saved[bank].maska; |
794 | } | 707 | } |
795 | AWA_DUMMY_READ(maska); | 708 | AWA_DUMMY_READ(maska); |
796 | } | 709 | } |
@@ -817,12 +730,12 @@ void bfin_gpio_pm_hibernate_suspend(void) | |||
817 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 730 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
818 | bank = gpio_bank(i); | 731 | bank = gpio_bank(i); |
819 | 732 | ||
820 | gpio_bank_saved[bank].fer = gpio_array[bank]->port_fer; | 733 | gpio_bank_saved[bank].fer = gpio_array[bank]->port_fer; |
821 | gpio_bank_saved[bank].mux = gpio_array[bank]->port_mux; | 734 | gpio_bank_saved[bank].mux = gpio_array[bank]->port_mux; |
822 | gpio_bank_saved[bank].data = gpio_array[bank]->port_data; | 735 | gpio_bank_saved[bank].data = gpio_array[bank]->data; |
823 | gpio_bank_saved[bank].data = gpio_array[bank]->port_data; | 736 | gpio_bank_saved[bank].data = gpio_array[bank]->data; |
824 | gpio_bank_saved[bank].inen = gpio_array[bank]->port_inen; | 737 | gpio_bank_saved[bank].inen = gpio_array[bank]->inen; |
825 | gpio_bank_saved[bank].dir = gpio_array[bank]->port_dir_set; | 738 | gpio_bank_saved[bank].dir = gpio_array[bank]->dir_set; |
826 | } | 739 | } |
827 | } | 740 | } |
828 | 741 | ||
@@ -831,21 +744,21 @@ void bfin_gpio_pm_hibernate_restore(void) | |||
831 | int i, bank; | 744 | int i, bank; |
832 | 745 | ||
833 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { | 746 | for (i = 0; i < MAX_BLACKFIN_GPIOS; i += GPIO_BANKSIZE) { |
834 | bank = gpio_bank(i); | 747 | bank = gpio_bank(i); |
835 | 748 | ||
836 | gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; | 749 | gpio_array[bank]->port_mux = gpio_bank_saved[bank].mux; |
837 | gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; | 750 | gpio_array[bank]->port_fer = gpio_bank_saved[bank].fer; |
838 | gpio_array[bank]->port_inen = gpio_bank_saved[bank].inen; | 751 | gpio_array[bank]->inen = gpio_bank_saved[bank].inen; |
839 | gpio_array[bank]->port_dir_set = gpio_bank_saved[bank].dir; | 752 | gpio_array[bank]->dir_set = gpio_bank_saved[bank].dir; |
840 | gpio_array[bank]->port_set = gpio_bank_saved[bank].data | 753 | gpio_array[bank]->data_set = gpio_bank_saved[bank].data |
841 | | gpio_bank_saved[bank].dir; | 754 | | gpio_bank_saved[bank].dir; |
842 | } | 755 | } |
843 | } | 756 | } |
844 | #endif | 757 | #endif |
845 | 758 | ||
846 | unsigned short get_gpio_dir(unsigned gpio) | 759 | unsigned short get_gpio_dir(unsigned gpio) |
847 | { | 760 | { |
848 | return (0x01 & (gpio_array[gpio_bank(gpio)]->port_dir_clear >> gpio_sub_n(gpio))); | 761 | return (0x01 & (gpio_array[gpio_bank(gpio)]->dir_clear >> gpio_sub_n(gpio))); |
849 | } | 762 | } |
850 | EXPORT_SYMBOL(get_gpio_dir); | 763 | EXPORT_SYMBOL(get_gpio_dir); |
851 | 764 | ||
@@ -905,9 +818,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
905 | */ | 818 | */ |
906 | 819 | ||
907 | #ifdef BF548_FAMILY | 820 | #ifdef BF548_FAMILY |
908 | u16 funct = get_portmux(ident); | 821 | if (!((per & P_MAYSHARE) && get_portmux(per) == P_FUNCT2MUX(per))) { |
909 | |||
910 | if (!((per & P_MAYSHARE) && (funct == P_FUNCT2MUX(per)))) { | ||
911 | #else | 822 | #else |
912 | if (!(per & P_MAYSHARE)) { | 823 | if (!(per & P_MAYSHARE)) { |
913 | #endif | 824 | #endif |
@@ -931,11 +842,7 @@ int peripheral_request(unsigned short per, const char *label) | |||
931 | anyway: | 842 | anyway: |
932 | reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident); | 843 | reserved_peri_map[gpio_bank(ident)] |= gpio_bit(ident); |
933 | 844 | ||
934 | #ifdef BF548_FAMILY | 845 | portmux_setup(per); |
935 | portmux_setup(ident, P_FUNCT2MUX(per)); | ||
936 | #else | ||
937 | portmux_setup(per, P_FUNCT2MUX(per)); | ||
938 | #endif | ||
939 | port_setup(ident, PERIPHERAL_USAGE); | 846 | port_setup(ident, PERIPHERAL_USAGE); |
940 | 847 | ||
941 | local_irq_restore_hw(flags); | 848 | local_irq_restore_hw(flags); |
@@ -977,9 +884,6 @@ void peripheral_free(unsigned short per) | |||
977 | if (!(per & P_DEFINED)) | 884 | if (!(per & P_DEFINED)) |
978 | return; | 885 | return; |
979 | 886 | ||
980 | if (check_gpio(ident) < 0) | ||
981 | return; | ||
982 | |||
983 | local_irq_save_hw(flags); | 887 | local_irq_save_hw(flags); |
984 | 888 | ||
985 | if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { | 889 | if (unlikely(!(reserved_peri_map[gpio_bank(ident)] & gpio_bit(ident)))) { |
@@ -1056,9 +960,15 @@ int bfin_gpio_request(unsigned gpio, const char *label) | |||
1056 | local_irq_restore_hw(flags); | 960 | local_irq_restore_hw(flags); |
1057 | return -EBUSY; | 961 | return -EBUSY; |
1058 | } | 962 | } |
1059 | if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) | 963 | if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) { |
1060 | printk(KERN_NOTICE "bfin-gpio: GPIO %d is already reserved as gpio-irq!" | 964 | printk(KERN_NOTICE "bfin-gpio: GPIO %d is already reserved as gpio-irq!" |
1061 | " (Documentation/blackfin/bfin-gpio-notes.txt)\n", gpio); | 965 | " (Documentation/blackfin/bfin-gpio-notes.txt)\n", gpio); |
966 | } | ||
967 | #ifndef BF548_FAMILY | ||
968 | else { /* Reset POLAR setting when acquiring a gpio for the first time */ | ||
969 | set_gpio_polar(gpio, 0); | ||
970 | } | ||
971 | #endif | ||
1062 | 972 | ||
1063 | reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio); | 973 | reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio); |
1064 | set_label(gpio, label); | 974 | set_label(gpio, label); |
@@ -1078,6 +988,8 @@ void bfin_gpio_free(unsigned gpio) | |||
1078 | if (check_gpio(gpio) < 0) | 988 | if (check_gpio(gpio) < 0) |
1079 | return; | 989 | return; |
1080 | 990 | ||
991 | might_sleep(); | ||
992 | |||
1081 | local_irq_save_hw(flags); | 993 | local_irq_save_hw(flags); |
1082 | 994 | ||
1083 | if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { | 995 | if (unlikely(!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio)))) { |
@@ -1158,8 +1070,16 @@ void bfin_gpio_irq_free(unsigned gpio) | |||
1158 | local_irq_restore_hw(flags); | 1070 | local_irq_restore_hw(flags); |
1159 | } | 1071 | } |
1160 | 1072 | ||
1161 | 1073 | static inline void __bfin_gpio_direction_input(unsigned gpio) | |
1074 | { | ||
1162 | #ifdef BF548_FAMILY | 1075 | #ifdef BF548_FAMILY |
1076 | gpio_array[gpio_bank(gpio)]->dir_clear = gpio_bit(gpio); | ||
1077 | #else | ||
1078 | gpio_array[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio); | ||
1079 | #endif | ||
1080 | gpio_array[gpio_bank(gpio)]->inen |= gpio_bit(gpio); | ||
1081 | } | ||
1082 | |||
1163 | int bfin_gpio_direction_input(unsigned gpio) | 1083 | int bfin_gpio_direction_input(unsigned gpio) |
1164 | { | 1084 | { |
1165 | unsigned long flags; | 1085 | unsigned long flags; |
@@ -1170,125 +1090,85 @@ int bfin_gpio_direction_input(unsigned gpio) | |||
1170 | } | 1090 | } |
1171 | 1091 | ||
1172 | local_irq_save_hw(flags); | 1092 | local_irq_save_hw(flags); |
1173 | gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio); | 1093 | __bfin_gpio_direction_input(gpio); |
1174 | gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio); | 1094 | AWA_DUMMY_READ(inen); |
1175 | local_irq_restore_hw(flags); | 1095 | local_irq_restore_hw(flags); |
1176 | 1096 | ||
1177 | return 0; | 1097 | return 0; |
1178 | } | 1098 | } |
1179 | EXPORT_SYMBOL(bfin_gpio_direction_input); | 1099 | EXPORT_SYMBOL(bfin_gpio_direction_input); |
1180 | 1100 | ||
1181 | int bfin_gpio_direction_output(unsigned gpio, int value) | 1101 | void bfin_gpio_irq_prepare(unsigned gpio) |
1182 | { | 1102 | { |
1103 | #ifdef BF548_FAMILY | ||
1183 | unsigned long flags; | 1104 | unsigned long flags; |
1105 | #endif | ||
1184 | 1106 | ||
1185 | if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { | 1107 | port_setup(gpio, GPIO_USAGE); |
1186 | gpio_error(gpio); | ||
1187 | return -EINVAL; | ||
1188 | } | ||
1189 | 1108 | ||
1109 | #ifdef BF548_FAMILY | ||
1190 | local_irq_save_hw(flags); | 1110 | local_irq_save_hw(flags); |
1191 | gpio_array[gpio_bank(gpio)]->port_inen &= ~gpio_bit(gpio); | 1111 | __bfin_gpio_direction_input(gpio); |
1192 | gpio_set_value(gpio, value); | ||
1193 | gpio_array[gpio_bank(gpio)]->port_dir_set = gpio_bit(gpio); | ||
1194 | local_irq_restore_hw(flags); | 1112 | local_irq_restore_hw(flags); |
1195 | 1113 | #endif | |
1196 | return 0; | ||
1197 | } | 1114 | } |
1198 | EXPORT_SYMBOL(bfin_gpio_direction_output); | ||
1199 | 1115 | ||
1200 | void bfin_gpio_set_value(unsigned gpio, int arg) | 1116 | void bfin_gpio_set_value(unsigned gpio, int arg) |
1201 | { | 1117 | { |
1202 | if (arg) | 1118 | if (arg) |
1203 | gpio_array[gpio_bank(gpio)]->port_set = gpio_bit(gpio); | 1119 | gpio_array[gpio_bank(gpio)]->data_set = gpio_bit(gpio); |
1204 | else | 1120 | else |
1205 | gpio_array[gpio_bank(gpio)]->port_clear = gpio_bit(gpio); | 1121 | gpio_array[gpio_bank(gpio)]->data_clear = gpio_bit(gpio); |
1206 | } | 1122 | } |
1207 | EXPORT_SYMBOL(bfin_gpio_set_value); | 1123 | EXPORT_SYMBOL(bfin_gpio_set_value); |
1208 | 1124 | ||
1209 | int bfin_gpio_get_value(unsigned gpio) | 1125 | int bfin_gpio_direction_output(unsigned gpio, int value) |
1210 | { | ||
1211 | return (1 & (gpio_array[gpio_bank(gpio)]->port_data >> gpio_sub_n(gpio))); | ||
1212 | } | ||
1213 | EXPORT_SYMBOL(bfin_gpio_get_value); | ||
1214 | |||
1215 | void bfin_gpio_irq_prepare(unsigned gpio) | ||
1216 | { | 1126 | { |
1217 | unsigned long flags; | 1127 | unsigned long flags; |
1218 | 1128 | ||
1219 | port_setup(gpio, GPIO_USAGE); | 1129 | if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { |
1130 | gpio_error(gpio); | ||
1131 | return -EINVAL; | ||
1132 | } | ||
1220 | 1133 | ||
1221 | local_irq_save_hw(flags); | 1134 | local_irq_save_hw(flags); |
1222 | gpio_array[gpio_bank(gpio)]->port_dir_clear = gpio_bit(gpio); | ||
1223 | gpio_array[gpio_bank(gpio)]->port_inen |= gpio_bit(gpio); | ||
1224 | local_irq_restore_hw(flags); | ||
1225 | } | ||
1226 | 1135 | ||
1136 | gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); | ||
1137 | gpio_set_value(gpio, value); | ||
1138 | #ifdef BF548_FAMILY | ||
1139 | gpio_array[gpio_bank(gpio)]->dir_set = gpio_bit(gpio); | ||
1227 | #else | 1140 | #else |
1141 | gpio_array[gpio_bank(gpio)]->dir |= gpio_bit(gpio); | ||
1142 | #endif | ||
1143 | |||
1144 | AWA_DUMMY_READ(dir); | ||
1145 | local_irq_restore_hw(flags); | ||
1146 | |||
1147 | return 0; | ||
1148 | } | ||
1149 | EXPORT_SYMBOL(bfin_gpio_direction_output); | ||
1228 | 1150 | ||
1229 | int bfin_gpio_get_value(unsigned gpio) | 1151 | int bfin_gpio_get_value(unsigned gpio) |
1230 | { | 1152 | { |
1153 | #ifdef BF548_FAMILY | ||
1154 | return (1 & (gpio_array[gpio_bank(gpio)]->data >> gpio_sub_n(gpio))); | ||
1155 | #else | ||
1231 | unsigned long flags; | 1156 | unsigned long flags; |
1232 | int ret; | ||
1233 | 1157 | ||
1234 | if (unlikely(get_gpio_edge(gpio))) { | 1158 | if (unlikely(get_gpio_edge(gpio))) { |
1159 | int ret; | ||
1235 | local_irq_save_hw(flags); | 1160 | local_irq_save_hw(flags); |
1236 | set_gpio_edge(gpio, 0); | 1161 | set_gpio_edge(gpio, 0); |
1237 | ret = get_gpio_data(gpio); | 1162 | ret = get_gpio_data(gpio); |
1238 | set_gpio_edge(gpio, 1); | 1163 | set_gpio_edge(gpio, 1); |
1239 | local_irq_restore_hw(flags); | 1164 | local_irq_restore_hw(flags); |
1240 | |||
1241 | return ret; | 1165 | return ret; |
1242 | } else | 1166 | } else |
1243 | return get_gpio_data(gpio); | 1167 | return get_gpio_data(gpio); |
1168 | #endif | ||
1244 | } | 1169 | } |
1245 | EXPORT_SYMBOL(bfin_gpio_get_value); | 1170 | EXPORT_SYMBOL(bfin_gpio_get_value); |
1246 | 1171 | ||
1247 | |||
1248 | int bfin_gpio_direction_input(unsigned gpio) | ||
1249 | { | ||
1250 | unsigned long flags; | ||
1251 | |||
1252 | if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { | ||
1253 | gpio_error(gpio); | ||
1254 | return -EINVAL; | ||
1255 | } | ||
1256 | |||
1257 | local_irq_save_hw(flags); | ||
1258 | gpio_bankb[gpio_bank(gpio)]->dir &= ~gpio_bit(gpio); | ||
1259 | gpio_bankb[gpio_bank(gpio)]->inen |= gpio_bit(gpio); | ||
1260 | AWA_DUMMY_READ(inen); | ||
1261 | local_irq_restore_hw(flags); | ||
1262 | |||
1263 | return 0; | ||
1264 | } | ||
1265 | EXPORT_SYMBOL(bfin_gpio_direction_input); | ||
1266 | |||
1267 | int bfin_gpio_direction_output(unsigned gpio, int value) | ||
1268 | { | ||
1269 | unsigned long flags; | ||
1270 | |||
1271 | if (!(reserved_gpio_map[gpio_bank(gpio)] & gpio_bit(gpio))) { | ||
1272 | gpio_error(gpio); | ||
1273 | return -EINVAL; | ||
1274 | } | ||
1275 | |||
1276 | local_irq_save_hw(flags); | ||
1277 | gpio_bankb[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); | ||
1278 | |||
1279 | if (value) | ||
1280 | gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio); | ||
1281 | else | ||
1282 | gpio_bankb[gpio_bank(gpio)]->data_clear = gpio_bit(gpio); | ||
1283 | |||
1284 | gpio_bankb[gpio_bank(gpio)]->dir |= gpio_bit(gpio); | ||
1285 | AWA_DUMMY_READ(dir); | ||
1286 | local_irq_restore_hw(flags); | ||
1287 | |||
1288 | return 0; | ||
1289 | } | ||
1290 | EXPORT_SYMBOL(bfin_gpio_direction_output); | ||
1291 | |||
1292 | /* If we are booting from SPI and our board lacks a strong enough pull up, | 1172 | /* If we are booting from SPI and our board lacks a strong enough pull up, |
1293 | * the core can reset and execute the bootrom faster than the resistor can | 1173 | * the core can reset and execute the bootrom faster than the resistor can |
1294 | * pull the signal logically high. To work around this (common) error in | 1174 | * pull the signal logically high. To work around this (common) error in |
@@ -1299,23 +1179,15 @@ EXPORT_SYMBOL(bfin_gpio_direction_output); | |||
1299 | * lives here as we need to force all the GPIO states w/out going through | 1179 | * lives here as we need to force all the GPIO states w/out going through |
1300 | * BUG() checks and such. | 1180 | * BUG() checks and such. |
1301 | */ | 1181 | */ |
1302 | void bfin_gpio_reset_spi0_ssel1(void) | 1182 | void bfin_reset_boot_spi_cs(unsigned short pin) |
1303 | { | 1183 | { |
1304 | u16 gpio = P_IDENT(P_SPI0_SSEL1); | 1184 | unsigned short gpio = P_IDENT(pin); |
1305 | |||
1306 | port_setup(gpio, GPIO_USAGE); | 1185 | port_setup(gpio, GPIO_USAGE); |
1307 | gpio_bankb[gpio_bank(gpio)]->data_set = gpio_bit(gpio); | 1186 | gpio_array[gpio_bank(gpio)]->data_set = gpio_bit(gpio); |
1308 | AWA_DUMMY_READ(data_set); | 1187 | AWA_DUMMY_READ(data_set); |
1309 | udelay(1); | 1188 | udelay(1); |
1310 | } | 1189 | } |
1311 | 1190 | ||
1312 | void bfin_gpio_irq_prepare(unsigned gpio) | ||
1313 | { | ||
1314 | port_setup(gpio, GPIO_USAGE); | ||
1315 | } | ||
1316 | |||
1317 | #endif /*BF548_FAMILY */ | ||
1318 | |||
1319 | #if defined(CONFIG_PROC_FS) | 1191 | #if defined(CONFIG_PROC_FS) |
1320 | static int gpio_proc_read(char *buf, char **start, off_t offset, | 1192 | static int gpio_proc_read(char *buf, char **start, off_t offset, |
1321 | int len, int *unused_i, void *unused_v) | 1193 | int len, int *unused_i, void *unused_v) |
@@ -1369,11 +1241,7 @@ int bfin_gpiolib_get_value(struct gpio_chip *chip, unsigned gpio) | |||
1369 | 1241 | ||
1370 | void bfin_gpiolib_set_value(struct gpio_chip *chip, unsigned gpio, int value) | 1242 | void bfin_gpiolib_set_value(struct gpio_chip *chip, unsigned gpio, int value) |
1371 | { | 1243 | { |
1372 | #ifdef BF548_FAMILY | ||
1373 | return bfin_gpio_set_value(gpio, value); | 1244 | return bfin_gpio_set_value(gpio, value); |
1374 | #else | ||
1375 | return set_gpio_data(gpio, value); | ||
1376 | #endif | ||
1377 | } | 1245 | } |
1378 | 1246 | ||
1379 | int bfin_gpiolib_gpio_request(struct gpio_chip *chip, unsigned gpio) | 1247 | int bfin_gpiolib_gpio_request(struct gpio_chip *chip, unsigned gpio) |
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbinit.c b/arch/blackfin/kernel/cplb-mpu/cplbinit.c index bdb958486e76..3e329a6ce041 100644 --- a/arch/blackfin/kernel/cplb-mpu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-mpu/cplbinit.c | |||
@@ -63,10 +63,8 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
63 | dcplb_tbl[cpu][i_d].addr = 0; | 63 | dcplb_tbl[cpu][i_d].addr = 0; |
64 | dcplb_tbl[cpu][i_d++].data = SDRAM_OOPS | PAGE_SIZE_1KB; | 64 | dcplb_tbl[cpu][i_d++].data = SDRAM_OOPS | PAGE_SIZE_1KB; |
65 | 65 | ||
66 | #if 0 | ||
67 | icplb_tbl[cpu][i_i].addr = 0; | 66 | icplb_tbl[cpu][i_i].addr = 0; |
68 | icplb_tbl[cpu][i_i++].data = i_cache | CPLB_USER_RD | PAGE_SIZE_4KB; | 67 | icplb_tbl[cpu][i_i++].data = i_cache | CPLB_USER_RD | PAGE_SIZE_1KB; |
69 | #endif | ||
70 | 68 | ||
71 | /* Cover kernel memory with 4M pages. */ | 69 | /* Cover kernel memory with 4M pages. */ |
72 | addr = 0; | 70 | addr = 0; |
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c index 376249ab2694..8cbb47c7b663 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbmgr.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbmgr.c | |||
@@ -163,12 +163,14 @@ MGR_ATTR static int icplb_miss(int cpu) | |||
163 | nr_icplb_supv_miss[cpu]++; | 163 | nr_icplb_supv_miss[cpu]++; |
164 | 164 | ||
165 | base = 0; | 165 | base = 0; |
166 | for (idx = 0; idx < icplb_nr_bounds; idx++) { | 166 | idx = 0; |
167 | do { | ||
167 | eaddr = icplb_bounds[idx].eaddr; | 168 | eaddr = icplb_bounds[idx].eaddr; |
168 | if (addr < eaddr) | 169 | if (addr < eaddr) |
169 | break; | 170 | break; |
170 | base = eaddr; | 171 | base = eaddr; |
171 | } | 172 | } while (++idx < icplb_nr_bounds); |
173 | |||
172 | if (unlikely(idx == icplb_nr_bounds)) | 174 | if (unlikely(idx == icplb_nr_bounds)) |
173 | return CPLB_NO_ADDR_MATCH; | 175 | return CPLB_NO_ADDR_MATCH; |
174 | 176 | ||
@@ -208,12 +210,14 @@ MGR_ATTR static int dcplb_miss(int cpu) | |||
208 | nr_dcplb_supv_miss[cpu]++; | 210 | nr_dcplb_supv_miss[cpu]++; |
209 | 211 | ||
210 | base = 0; | 212 | base = 0; |
211 | for (idx = 0; idx < dcplb_nr_bounds; idx++) { | 213 | idx = 0; |
214 | do { | ||
212 | eaddr = dcplb_bounds[idx].eaddr; | 215 | eaddr = dcplb_bounds[idx].eaddr; |
213 | if (addr < eaddr) | 216 | if (addr < eaddr) |
214 | break; | 217 | break; |
215 | base = eaddr; | 218 | base = eaddr; |
216 | } | 219 | } while (++idx < dcplb_nr_bounds); |
220 | |||
217 | if (unlikely(idx == dcplb_nr_bounds)) | 221 | if (unlikely(idx == dcplb_nr_bounds)) |
218 | return CPLB_NO_ADDR_MATCH; | 222 | return CPLB_NO_ADDR_MATCH; |
219 | 223 | ||
diff --git a/arch/blackfin/kernel/irqchip.c b/arch/blackfin/kernel/irqchip.c index ab8209cbbad0..75724eee6494 100644 --- a/arch/blackfin/kernel/irqchip.c +++ b/arch/blackfin/kernel/irqchip.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/interrupt.h> | 35 | #include <linux/interrupt.h> |
36 | #include <linux/irq.h> | 36 | #include <linux/irq.h> |
37 | #include <asm/trace.h> | 37 | #include <asm/trace.h> |
38 | #include <asm/pda.h> | ||
38 | 39 | ||
39 | static atomic_t irq_err_count; | 40 | static atomic_t irq_err_count; |
40 | static spinlock_t irq_controller_lock; | 41 | static spinlock_t irq_controller_lock; |
@@ -91,8 +92,13 @@ int show_interrupts(struct seq_file *p, void *v) | |||
91 | seq_putc(p, '\n'); | 92 | seq_putc(p, '\n'); |
92 | skip: | 93 | skip: |
93 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 94 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
94 | } else if (i == NR_IRQS) | 95 | } else if (i == NR_IRQS) { |
96 | seq_printf(p, "NMI: "); | ||
97 | for_each_online_cpu(j) | ||
98 | seq_printf(p, "%10u ", cpu_pda[j].__nmi_count); | ||
99 | seq_printf(p, " CORE Non Maskable Interrupt\n"); | ||
95 | seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); | 100 | seq_printf(p, "Err: %10u\n", atomic_read(&irq_err_count)); |
101 | } | ||
96 | return 0; | 102 | return 0; |
97 | } | 103 | } |
98 | 104 | ||
diff --git a/arch/blackfin/kernel/reboot.c b/arch/blackfin/kernel/reboot.c index eeee8cb43360..53d08dee8531 100644 --- a/arch/blackfin/kernel/reboot.c +++ b/arch/blackfin/kernel/reboot.c | |||
@@ -20,8 +20,8 @@ | |||
20 | * reset while the Core B bit (on dual core parts) is cleared by | 20 | * reset while the Core B bit (on dual core parts) is cleared by |
21 | * the core reset. | 21 | * the core reset. |
22 | */ | 22 | */ |
23 | __attribute__((l1_text)) | 23 | __attribute__ ((__l1_text__, __noreturn__)) |
24 | static void _bfin_reset(void) | 24 | static void bfin_reset(void) |
25 | { | 25 | { |
26 | /* Wait for completion of "system" events such as cache line | 26 | /* Wait for completion of "system" events such as cache line |
27 | * line fills so that we avoid infinite stalls later on as | 27 | * line fills so that we avoid infinite stalls later on as |
@@ -30,7 +30,11 @@ static void _bfin_reset(void) | |||
30 | */ | 30 | */ |
31 | __builtin_bfin_ssync(); | 31 | __builtin_bfin_ssync(); |
32 | 32 | ||
33 | while (1) { | 33 | /* The bootrom checks to see how it was reset and will |
34 | * automatically perform a software reset for us when | ||
35 | * it starts executing after the core reset. | ||
36 | */ | ||
37 | if (ANOMALY_05000353 || ANOMALY_05000386) { | ||
34 | /* Initiate System software reset. */ | 38 | /* Initiate System software reset. */ |
35 | bfin_write_SWRST(0x7); | 39 | bfin_write_SWRST(0x7); |
36 | 40 | ||
@@ -50,6 +54,11 @@ static void _bfin_reset(void) | |||
50 | /* Clear System software reset */ | 54 | /* Clear System software reset */ |
51 | bfin_write_SWRST(0); | 55 | bfin_write_SWRST(0); |
52 | 56 | ||
57 | /* The BF526 ROM will crash during reset */ | ||
58 | #if defined(__ADSPBF522__) || defined(__ADSPBF524__) || defined(__ADSPBF526__) | ||
59 | bfin_read_SWRST(); | ||
60 | #endif | ||
61 | |||
53 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC | 62 | /* Wait for the SWRST write to complete. Cannot rely on SSYNC |
54 | * though as the System state is all reset now. | 63 | * though as the System state is all reset now. |
55 | */ | 64 | */ |
@@ -60,22 +69,11 @@ static void _bfin_reset(void) | |||
60 | : "a" (15 * 1) | 69 | : "a" (15 * 1) |
61 | : "LC1", "LB1", "LT1" | 70 | : "LC1", "LB1", "LT1" |
62 | ); | 71 | ); |
72 | } | ||
63 | 73 | ||
74 | while (1) | ||
64 | /* Issue core reset */ | 75 | /* Issue core reset */ |
65 | asm("raise 1"); | 76 | asm("raise 1"); |
66 | } | ||
67 | } | ||
68 | |||
69 | static void bfin_reset(void) | ||
70 | { | ||
71 | if (ANOMALY_05000353 || ANOMALY_05000386) | ||
72 | _bfin_reset(); | ||
73 | else | ||
74 | /* the bootrom checks to see how it was reset and will | ||
75 | * automatically perform a software reset for us when | ||
76 | * it starts executing boot | ||
77 | */ | ||
78 | asm("raise 1;"); | ||
79 | } | 77 | } |
80 | 78 | ||
81 | __attribute__((weak)) | 79 | __attribute__((weak)) |
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index b2a811347b65..e5c116230800 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -60,7 +60,7 @@ void __initdata *init_retx, *init_saved_retx, *init_saved_seqstat, | |||
60 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ | 60 | #define BFIN_MEMMAP_MAX 128 /* number of entries in bfin_memmap */ |
61 | #define BFIN_MEMMAP_RAM 1 | 61 | #define BFIN_MEMMAP_RAM 1 |
62 | #define BFIN_MEMMAP_RESERVED 2 | 62 | #define BFIN_MEMMAP_RESERVED 2 |
63 | struct bfin_memmap { | 63 | static struct bfin_memmap { |
64 | int nr_map; | 64 | int nr_map; |
65 | struct bfin_memmap_entry { | 65 | struct bfin_memmap_entry { |
66 | unsigned long long addr; /* start of memory segment */ | 66 | unsigned long long addr; /* start of memory segment */ |
@@ -824,7 +824,15 @@ void __init setup_arch(char **cmdline_p) | |||
824 | flash_probe(); | 824 | flash_probe(); |
825 | #endif | 825 | #endif |
826 | 826 | ||
827 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); | ||
828 | |||
829 | /* Newer parts mirror SWRST bits in SYSCR */ | ||
830 | #if defined(CONFIG_BF53x) || defined(CONFIG_BF561) || \ | ||
831 | defined(CONFIG_BF538) || defined(CONFIG_BF539) | ||
827 | _bfin_swrst = bfin_read_SWRST(); | 832 | _bfin_swrst = bfin_read_SWRST(); |
833 | #else | ||
834 | _bfin_swrst = bfin_read_SYSCR(); | ||
835 | #endif | ||
828 | 836 | ||
829 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT | 837 | #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT |
830 | bfin_write_SWRST(_bfin_swrst & ~DOUBLE_FAULT); | 838 | bfin_write_SWRST(_bfin_swrst & ~DOUBLE_FAULT); |
@@ -853,7 +861,7 @@ void __init setup_arch(char **cmdline_p) | |||
853 | else if (_bfin_swrst & RESET_SOFTWARE) | 861 | else if (_bfin_swrst & RESET_SOFTWARE) |
854 | printk(KERN_NOTICE "Reset caused by Software reset\n"); | 862 | printk(KERN_NOTICE "Reset caused by Software reset\n"); |
855 | 863 | ||
856 | printk(KERN_INFO "Blackfin support (C) 2004-2008 Analog Devices, Inc.\n"); | 864 | printk(KERN_INFO "Blackfin support (C) 2004-2009 Analog Devices, Inc.\n"); |
857 | if (bfin_compiled_revid() == 0xffff) | 865 | if (bfin_compiled_revid() == 0xffff) |
858 | printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU); | 866 | printk(KERN_INFO "Compiled for ADSP-%s Rev any\n", CPU); |
859 | else if (bfin_compiled_revid() == -1) | 867 | else if (bfin_compiled_revid() == -1) |
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index 5b0667da8d05..ffe7fb53eccb 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -673,6 +673,14 @@ static void decode_instruction(unsigned short *address) | |||
673 | verbose_printk("RTI"); | 673 | verbose_printk("RTI"); |
674 | else if (opcode == 0x0012) | 674 | else if (opcode == 0x0012) |
675 | verbose_printk("RTX"); | 675 | verbose_printk("RTX"); |
676 | else if (opcode == 0x0013) | ||
677 | verbose_printk("RTN"); | ||
678 | else if (opcode == 0x0014) | ||
679 | verbose_printk("RTE"); | ||
680 | else if (opcode == 0x0025) | ||
681 | verbose_printk("EMUEXCPT"); | ||
682 | else if (opcode == 0x0040 && opcode <= 0x0047) | ||
683 | verbose_printk("STI R%i", opcode & 7); | ||
676 | else if (opcode >= 0x0050 && opcode <= 0x0057) | 684 | else if (opcode >= 0x0050 && opcode <= 0x0057) |
677 | verbose_printk("JUMP (P%i)", opcode & 7); | 685 | verbose_printk("JUMP (P%i)", opcode & 7); |
678 | else if (opcode >= 0x0060 && opcode <= 0x0067) | 686 | else if (opcode >= 0x0060 && opcode <= 0x0067) |
@@ -681,6 +689,10 @@ static void decode_instruction(unsigned short *address) | |||
681 | verbose_printk("CALL (PC+P%i)", opcode & 7); | 689 | verbose_printk("CALL (PC+P%i)", opcode & 7); |
682 | else if (opcode >= 0x0080 && opcode <= 0x0087) | 690 | else if (opcode >= 0x0080 && opcode <= 0x0087) |
683 | verbose_printk("JUMP (PC+P%i)", opcode & 7); | 691 | verbose_printk("JUMP (PC+P%i)", opcode & 7); |
692 | else if (opcode >= 0x0090 && opcode <= 0x009F) | ||
693 | verbose_printk("RAISE 0x%x", opcode & 0xF); | ||
694 | else if (opcode >= 0x00A0 && opcode <= 0x00AF) | ||
695 | verbose_printk("EXCPT 0x%x", opcode & 0xF); | ||
684 | else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) | 696 | else if ((opcode >= 0x1000 && opcode <= 0x13FF) || (opcode >= 0x1800 && opcode <= 0x1BFF)) |
685 | verbose_printk("IF !CC JUMP"); | 697 | verbose_printk("IF !CC JUMP"); |
686 | else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) | 698 | else if ((opcode >= 0x1400 && opcode <= 0x17ff) || (opcode >= 0x1c00 && opcode <= 0x1fff)) |
@@ -820,11 +832,8 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
820 | decode_address(buf, (unsigned int)stack); | 832 | decode_address(buf, (unsigned int)stack); |
821 | printk(KERN_NOTICE " SP: [0x%p] %s\n", stack, buf); | 833 | printk(KERN_NOTICE " SP: [0x%p] %s\n", stack, buf); |
822 | 834 | ||
823 | addr = (unsigned int *)((unsigned int)stack & ~0x3F); | ||
824 | |||
825 | /* First thing is to look for a frame pointer */ | 835 | /* First thing is to look for a frame pointer */ |
826 | for (addr = (unsigned int *)((unsigned int)stack & ~0xF), i = 0; | 836 | for (addr = (unsigned int *)((unsigned int)stack & ~0xF); addr < endstack; addr++) { |
827 | addr < endstack; addr++, i++) { | ||
828 | if (*addr & 0x1) | 837 | if (*addr & 0x1) |
829 | continue; | 838 | continue; |
830 | ins_addr = (unsigned short *)*addr; | 839 | ins_addr = (unsigned short *)*addr; |
@@ -834,7 +843,8 @@ void show_stack(struct task_struct *task, unsigned long *stack) | |||
834 | 843 | ||
835 | if (fp) { | 844 | if (fp) { |
836 | /* Let's check to see if it is a frame pointer */ | 845 | /* Let's check to see if it is a frame pointer */ |
837 | while (fp >= (addr - 1) && fp < endstack && fp) | 846 | while (fp >= (addr - 1) && fp < endstack |
847 | && fp && ((unsigned int) fp & 0x3) == 0) | ||
838 | fp = (unsigned int *)*fp; | 848 | fp = (unsigned int *)*fp; |
839 | if (fp == 0 || fp == endstack) { | 849 | if (fp == 0 || fp == endstack) { |
840 | fp = addr - 1; | 850 | fp = addr - 1; |
@@ -1052,8 +1062,9 @@ void show_regs(struct pt_regs *fp) | |||
1052 | char buf [150]; | 1062 | char buf [150]; |
1053 | struct irqaction *action; | 1063 | struct irqaction *action; |
1054 | unsigned int i; | 1064 | unsigned int i; |
1055 | unsigned long flags; | 1065 | unsigned long flags = 0; |
1056 | unsigned int cpu = smp_processor_id(); | 1066 | unsigned int cpu = smp_processor_id(); |
1067 | unsigned char in_atomic = (bfin_read_IPEND() & 0x10) || in_atomic(); | ||
1057 | 1068 | ||
1058 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); | 1069 | verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted()); |
1059 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 1070 | verbose_printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
@@ -1073,17 +1084,22 @@ void show_regs(struct pt_regs *fp) | |||
1073 | } | 1084 | } |
1074 | verbose_printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", | 1085 | verbose_printk(KERN_NOTICE " EXCAUSE : 0x%lx\n", |
1075 | fp->seqstat & SEQSTAT_EXCAUSE); | 1086 | fp->seqstat & SEQSTAT_EXCAUSE); |
1076 | for (i = 6; i <= 15 ; i++) { | 1087 | for (i = 2; i <= 15 ; i++) { |
1077 | if (fp->ipend & (1 << i)) { | 1088 | if (fp->ipend & (1 << i)) { |
1078 | decode_address(buf, bfin_read32(EVT0 + 4*i)); | 1089 | if (i != 4) { |
1079 | verbose_printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); | 1090 | decode_address(buf, bfin_read32(EVT0 + 4*i)); |
1091 | verbose_printk(KERN_NOTICE " physical IVG%i asserted : %s\n", i, buf); | ||
1092 | } else | ||
1093 | verbose_printk(KERN_NOTICE " interrupts disabled\n"); | ||
1080 | } | 1094 | } |
1081 | } | 1095 | } |
1082 | 1096 | ||
1083 | /* if no interrupts are going off, don't print this out */ | 1097 | /* if no interrupts are going off, don't print this out */ |
1084 | if (fp->ipend & ~0x3F) { | 1098 | if (fp->ipend & ~0x3F) { |
1085 | for (i = 0; i < (NR_IRQS - 1); i++) { | 1099 | for (i = 0; i < (NR_IRQS - 1); i++) { |
1086 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 1100 | if (!in_atomic) |
1101 | spin_lock_irqsave(&irq_desc[i].lock, flags); | ||
1102 | |||
1087 | action = irq_desc[i].action; | 1103 | action = irq_desc[i].action; |
1088 | if (!action) | 1104 | if (!action) |
1089 | goto unlock; | 1105 | goto unlock; |
@@ -1096,7 +1112,8 @@ void show_regs(struct pt_regs *fp) | |||
1096 | } | 1112 | } |
1097 | verbose_printk("\n"); | 1113 | verbose_printk("\n"); |
1098 | unlock: | 1114 | unlock: |
1099 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 1115 | if (!in_atomic) |
1116 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | ||
1100 | } | 1117 | } |
1101 | } | 1118 | } |
1102 | 1119 | ||
diff --git a/arch/blackfin/mach-bf518/boards/ezbrd.c b/arch/blackfin/mach-bf518/boards/ezbrd.c index 15f1351c8645..0e175342112e 100644 --- a/arch/blackfin/mach-bf518/boards/ezbrd.c +++ b/arch/blackfin/mach-bf518/boards/ezbrd.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/dpmc.h> | 46 | #include <asm/dpmc.h> |
47 | #include <asm/bfin_sdh.h> | 47 | #include <asm/bfin_sdh.h> |
48 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
49 | #include <net/dsa.h> | ||
49 | 50 | ||
50 | /* | 51 | /* |
51 | * Name the Board for the /proc/cpuinfo | 52 | * Name the Board for the /proc/cpuinfo |
@@ -104,8 +105,31 @@ static struct platform_device rtc_device = { | |||
104 | #endif | 105 | #endif |
105 | 106 | ||
106 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 107 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
108 | static struct platform_device bfin_mii_bus = { | ||
109 | .name = "bfin_mii_bus", | ||
110 | }; | ||
111 | |||
107 | static struct platform_device bfin_mac_device = { | 112 | static struct platform_device bfin_mac_device = { |
108 | .name = "bfin_mac", | 113 | .name = "bfin_mac", |
114 | .dev.platform_data = &bfin_mii_bus, | ||
115 | }; | ||
116 | #endif | ||
117 | |||
118 | #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
119 | static struct dsa_platform_data ksz8893m_switch_data = { | ||
120 | .mii_bus = &bfin_mii_bus.dev, | ||
121 | .netdev = &bfin_mac_device.dev, | ||
122 | .port_names[0] = NULL, | ||
123 | .port_names[1] = "eth%d", | ||
124 | .port_names[2] = "eth%d", | ||
125 | .port_names[3] = "cpu", | ||
126 | }; | ||
127 | |||
128 | static struct platform_device ksz8893m_switch_device = { | ||
129 | .name = "dsa", | ||
130 | .id = 0, | ||
131 | .num_resources = 0, | ||
132 | .dev.platform_data = &ksz8893m_switch_data, | ||
109 | }; | 133 | }; |
110 | #endif | 134 | #endif |
111 | 135 | ||
@@ -147,6 +171,15 @@ static struct bfin5xx_spi_chip spi_adc_chip_info = { | |||
147 | }; | 171 | }; |
148 | #endif | 172 | #endif |
149 | 173 | ||
174 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ | ||
175 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
176 | /* SPI SWITCH CHIP */ | ||
177 | static struct bfin5xx_spi_chip spi_switch_info = { | ||
178 | .enable_dma = 0, | ||
179 | .bits_per_word = 8, | ||
180 | }; | ||
181 | #endif | ||
182 | |||
150 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | 183 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) |
151 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { | 184 | static struct bfin5xx_spi_chip spi_mmc_chip_info = { |
152 | .enable_dma = 1, | 185 | .enable_dma = 1, |
@@ -226,6 +259,19 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
226 | }, | 259 | }, |
227 | #endif | 260 | #endif |
228 | 261 | ||
262 | #if defined(CONFIG_NET_DSA_KSZ8893M) \ | ||
263 | || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
264 | { | ||
265 | .modalias = "ksz8893m", | ||
266 | .max_speed_hz = 5000000, | ||
267 | .bus_num = 0, | ||
268 | .chip_select = 1, | ||
269 | .platform_data = NULL, | ||
270 | .controller_data = &spi_switch_info, | ||
271 | .mode = SPI_MODE_3, | ||
272 | }, | ||
273 | #endif | ||
274 | |||
229 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) | 275 | #if defined(CONFIG_SPI_MMC) || defined(CONFIG_SPI_MMC_MODULE) |
230 | { | 276 | { |
231 | .modalias = "spi_mmc_dummy", | 277 | .modalias = "spi_mmc_dummy", |
@@ -473,7 +519,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
473 | }; | 519 | }; |
474 | #endif | 520 | #endif |
475 | 521 | ||
476 | #ifdef CONFIG_I2C_BOARDINFO | ||
477 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 522 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
478 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 523 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
479 | { | 524 | { |
@@ -487,7 +532,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
487 | }, | 532 | }, |
488 | #endif | 533 | #endif |
489 | }; | 534 | }; |
490 | #endif | ||
491 | 535 | ||
492 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 536 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
493 | static struct platform_device bfin_sport0_uart_device = { | 537 | static struct platform_device bfin_sport0_uart_device = { |
@@ -584,9 +628,14 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
584 | #endif | 628 | #endif |
585 | 629 | ||
586 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 630 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
631 | &bfin_mii_bus, | ||
587 | &bfin_mac_device, | 632 | &bfin_mac_device, |
588 | #endif | 633 | #endif |
589 | 634 | ||
635 | #if defined(CONFIG_NET_DSA_KSZ8893M) || defined(CONFIG_NET_DSA_KSZ8893M_MODULE) | ||
636 | &ksz8893m_switch_device, | ||
637 | #endif | ||
638 | |||
590 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 639 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
591 | &bfin_spi0_device, | 640 | &bfin_spi0_device, |
592 | &bfin_spi1_device, | 641 | &bfin_spi1_device, |
@@ -632,12 +681,8 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
632 | static int __init ezbrd_init(void) | 681 | static int __init ezbrd_init(void) |
633 | { | 682 | { |
634 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 683 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
635 | |||
636 | #ifdef CONFIG_I2C_BOARDINFO | ||
637 | i2c_register_board_info(0, bfin_i2c_board_info, | 684 | i2c_register_board_info(0, bfin_i2c_board_info, |
638 | ARRAY_SIZE(bfin_i2c_board_info)); | 685 | ARRAY_SIZE(bfin_i2c_board_info)); |
639 | #endif | ||
640 | |||
641 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 686 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
642 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 687 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
643 | return 0; | 688 | return 0; |
@@ -649,7 +694,7 @@ void native_machine_restart(char *cmd) | |||
649 | { | 694 | { |
650 | /* workaround reboot hang when booting from SPI */ | 695 | /* workaround reboot hang when booting from SPI */ |
651 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 696 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
652 | bfin_gpio_reset_spi0_ssel1(); | 697 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
653 | } | 698 | } |
654 | 699 | ||
655 | void bfin_get_ether_addr(char *addr) | 700 | void bfin_get_ether_addr(char *addr) |
diff --git a/arch/blackfin/mach-bf518/include/mach/portmux.h b/arch/blackfin/mach-bf518/include/mach/portmux.h index ac16d54734d4..f618b487b2b0 100644 --- a/arch/blackfin/mach-bf518/include/mach/portmux.h +++ b/arch/blackfin/mach-bf518/include/mach/portmux.h | |||
@@ -103,6 +103,8 @@ | |||
103 | #define P_SPI1_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(2)) | 103 | #define P_SPI1_SSEL4 (P_DEFINED | P_IDENT(GPIO_PF8) | P_FUNCT(2)) |
104 | #define P_SPI1_SSEL5 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(2)) | 104 | #define P_SPI1_SSEL5 (P_DEFINED | P_IDENT(GPIO_PG11) | P_FUNCT(2)) |
105 | 105 | ||
106 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2 | ||
107 | |||
106 | /* SPORT Port Mux */ | 108 | /* SPORT Port Mux */ |
107 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0)) | 109 | #define P_SPORT0_DRPRI (P_DEFINED | P_IDENT(GPIO_PG3) | P_FUNCT(0)) |
108 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0)) | 110 | #define P_SPORT0_RSCLK (P_DEFINED | P_IDENT(GPIO_PG4) | P_FUNCT(0)) |
diff --git a/arch/blackfin/mach-bf527/boards/cm_bf527.c b/arch/blackfin/mach-bf527/boards/cm_bf527.c index a2c3578f4b6c..856c097b5317 100644 --- a/arch/blackfin/mach-bf527/boards/cm_bf527.c +++ b/arch/blackfin/mach-bf527/boards/cm_bf527.c | |||
@@ -403,8 +403,13 @@ static struct platform_device isp1362_hcd_device = { | |||
403 | #endif | 403 | #endif |
404 | 404 | ||
405 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 405 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
406 | static struct platform_device bfin_mii_bus = { | ||
407 | .name = "bfin_mii_bus", | ||
408 | }; | ||
409 | |||
406 | static struct platform_device bfin_mac_device = { | 410 | static struct platform_device bfin_mac_device = { |
407 | .name = "bfin_mac", | 411 | .name = "bfin_mac", |
412 | .dev.platform_data = &bfin_mii_bus, | ||
408 | }; | 413 | }; |
409 | #endif | 414 | #endif |
410 | 415 | ||
@@ -793,7 +798,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
793 | }; | 798 | }; |
794 | #endif | 799 | #endif |
795 | 800 | ||
796 | #ifdef CONFIG_I2C_BOARDINFO | ||
797 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 801 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
798 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 802 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
799 | { | 803 | { |
@@ -809,7 +813,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
809 | }, | 813 | }, |
810 | #endif | 814 | #endif |
811 | }; | 815 | }; |
812 | #endif | ||
813 | 816 | ||
814 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 817 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
815 | static struct platform_device bfin_sport0_uart_device = { | 818 | static struct platform_device bfin_sport0_uart_device = { |
@@ -920,6 +923,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
920 | #endif | 923 | #endif |
921 | 924 | ||
922 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 925 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
926 | &bfin_mii_bus, | ||
923 | &bfin_mac_device, | 927 | &bfin_mac_device, |
924 | #endif | 928 | #endif |
925 | 929 | ||
@@ -968,27 +972,23 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
968 | &bfin_gpios_device, | 972 | &bfin_gpios_device, |
969 | }; | 973 | }; |
970 | 974 | ||
971 | static int __init stamp_init(void) | 975 | static int __init cm_init(void) |
972 | { | 976 | { |
973 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 977 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
974 | |||
975 | #ifdef CONFIG_I2C_BOARDINFO | ||
976 | i2c_register_board_info(0, bfin_i2c_board_info, | 978 | i2c_register_board_info(0, bfin_i2c_board_info, |
977 | ARRAY_SIZE(bfin_i2c_board_info)); | 979 | ARRAY_SIZE(bfin_i2c_board_info)); |
978 | #endif | ||
979 | |||
980 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 980 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
981 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 981 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
982 | return 0; | 982 | return 0; |
983 | } | 983 | } |
984 | 984 | ||
985 | arch_initcall(stamp_init); | 985 | arch_initcall(cm_init); |
986 | 986 | ||
987 | void native_machine_restart(char *cmd) | 987 | void native_machine_restart(char *cmd) |
988 | { | 988 | { |
989 | /* workaround reboot hang when booting from SPI */ | 989 | /* workaround reboot hang when booting from SPI */ |
990 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 990 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
991 | bfin_gpio_reset_spi0_ssel1(); | 991 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
992 | } | 992 | } |
993 | 993 | ||
994 | void bfin_get_ether_addr(char *addr) | 994 | void bfin_get_ether_addr(char *addr) |
diff --git a/arch/blackfin/mach-bf527/boards/ezbrd.c b/arch/blackfin/mach-bf527/boards/ezbrd.c index 0314bd3355eb..83606fcdde27 100644 --- a/arch/blackfin/mach-bf527/boards/ezbrd.c +++ b/arch/blackfin/mach-bf527/boards/ezbrd.c | |||
@@ -208,8 +208,13 @@ static struct platform_device rtc_device = { | |||
208 | 208 | ||
209 | 209 | ||
210 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 210 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
211 | static struct platform_device bfin_mii_bus = { | ||
212 | .name = "bfin_mii_bus", | ||
213 | }; | ||
214 | |||
211 | static struct platform_device bfin_mac_device = { | 215 | static struct platform_device bfin_mac_device = { |
212 | .name = "bfin_mac", | 216 | .name = "bfin_mac", |
217 | .dev.platform_data = &bfin_mii_bus, | ||
213 | }; | 218 | }; |
214 | #endif | 219 | #endif |
215 | 220 | ||
@@ -590,7 +595,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
590 | }; | 595 | }; |
591 | #endif | 596 | #endif |
592 | 597 | ||
593 | #ifdef CONFIG_I2C_BOARDINFO | ||
594 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 598 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
595 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 599 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
596 | { | 600 | { |
@@ -604,7 +608,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
604 | }, | 608 | }, |
605 | #endif | 609 | #endif |
606 | }; | 610 | }; |
607 | #endif | ||
608 | 611 | ||
609 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 612 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
610 | static struct platform_device bfin_sport0_uart_device = { | 613 | static struct platform_device bfin_sport0_uart_device = { |
@@ -720,6 +723,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
720 | #endif | 723 | #endif |
721 | 724 | ||
722 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 725 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
726 | &bfin_mii_bus, | ||
723 | &bfin_mac_device, | 727 | &bfin_mac_device, |
724 | #endif | 728 | #endif |
725 | 729 | ||
@@ -764,27 +768,23 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
764 | &bfin_gpios_device, | 768 | &bfin_gpios_device, |
765 | }; | 769 | }; |
766 | 770 | ||
767 | static int __init stamp_init(void) | 771 | static int __init ezbrd_init(void) |
768 | { | 772 | { |
769 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 773 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
770 | |||
771 | #ifdef CONFIG_I2C_BOARDINFO | ||
772 | i2c_register_board_info(0, bfin_i2c_board_info, | 774 | i2c_register_board_info(0, bfin_i2c_board_info, |
773 | ARRAY_SIZE(bfin_i2c_board_info)); | 775 | ARRAY_SIZE(bfin_i2c_board_info)); |
774 | #endif | ||
775 | |||
776 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 776 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
777 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 777 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
778 | return 0; | 778 | return 0; |
779 | } | 779 | } |
780 | 780 | ||
781 | arch_initcall(stamp_init); | 781 | arch_initcall(ezbrd_init); |
782 | 782 | ||
783 | void native_machine_restart(char *cmd) | 783 | void native_machine_restart(char *cmd) |
784 | { | 784 | { |
785 | /* workaround reboot hang when booting from SPI */ | 785 | /* workaround reboot hang when booting from SPI */ |
786 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 786 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
787 | bfin_gpio_reset_spi0_ssel1(); | 787 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
788 | } | 788 | } |
789 | 789 | ||
790 | void bfin_get_ether_addr(char *addr) | 790 | void bfin_get_ether_addr(char *addr) |
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index 9454fb7b18c3..d0864111ef59 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -425,8 +425,13 @@ static struct platform_device isp1362_hcd_device = { | |||
425 | #endif | 425 | #endif |
426 | 426 | ||
427 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 427 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
428 | static struct platform_device bfin_mii_bus = { | ||
429 | .name = "bfin_mii_bus", | ||
430 | }; | ||
431 | |||
428 | static struct platform_device bfin_mac_device = { | 432 | static struct platform_device bfin_mac_device = { |
429 | .name = "bfin_mac", | 433 | .name = "bfin_mac", |
434 | .dev.platform_data = &bfin_mii_bus, | ||
430 | }; | 435 | }; |
431 | #endif | 436 | #endif |
432 | 437 | ||
@@ -830,7 +835,6 @@ static struct platform_device i2c_bfin_twi_device = { | |||
830 | }; | 835 | }; |
831 | #endif | 836 | #endif |
832 | 837 | ||
833 | #ifdef CONFIG_I2C_BOARDINFO | ||
834 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 838 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
835 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) | 839 | #if defined(CONFIG_TWI_LCD) || defined(CONFIG_TWI_LCD_MODULE) |
836 | { | 840 | { |
@@ -844,7 +848,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
844 | }, | 848 | }, |
845 | #endif | 849 | #endif |
846 | }; | 850 | }; |
847 | #endif | ||
848 | 851 | ||
849 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 852 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
850 | static struct platform_device bfin_sport0_uart_device = { | 853 | static struct platform_device bfin_sport0_uart_device = { |
@@ -988,6 +991,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
988 | #endif | 991 | #endif |
989 | 992 | ||
990 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 993 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
994 | &bfin_mii_bus, | ||
991 | &bfin_mac_device, | 995 | &bfin_mac_device, |
992 | #endif | 996 | #endif |
993 | 997 | ||
@@ -1048,27 +1052,23 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1048 | &bfin_gpios_device, | 1052 | &bfin_gpios_device, |
1049 | }; | 1053 | }; |
1050 | 1054 | ||
1051 | static int __init stamp_init(void) | 1055 | static int __init ezkit_init(void) |
1052 | { | 1056 | { |
1053 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 1057 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
1054 | |||
1055 | #ifdef CONFIG_I2C_BOARDINFO | ||
1056 | i2c_register_board_info(0, bfin_i2c_board_info, | 1058 | i2c_register_board_info(0, bfin_i2c_board_info, |
1057 | ARRAY_SIZE(bfin_i2c_board_info)); | 1059 | ARRAY_SIZE(bfin_i2c_board_info)); |
1058 | #endif | ||
1059 | |||
1060 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 1060 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
1061 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 1061 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
1062 | return 0; | 1062 | return 0; |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | arch_initcall(stamp_init); | 1065 | arch_initcall(ezkit_init); |
1066 | 1066 | ||
1067 | void native_machine_restart(char *cmd) | 1067 | void native_machine_restart(char *cmd) |
1068 | { | 1068 | { |
1069 | /* workaround reboot hang when booting from SPI */ | 1069 | /* workaround reboot hang when booting from SPI */ |
1070 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 1070 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
1071 | bfin_gpio_reset_spi0_ssel1(); | 1071 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | void bfin_get_ether_addr(char *addr) | 1074 | void bfin_get_ether_addr(char *addr) |
diff --git a/arch/blackfin/mach-bf527/include/mach/portmux.h b/arch/blackfin/mach-bf527/include/mach/portmux.h index 7f6da2c386bb..72b1652be4da 100644 --- a/arch/blackfin/mach-bf527/include/mach/portmux.h +++ b/arch/blackfin/mach-bf527/include/mach/portmux.h | |||
@@ -73,6 +73,8 @@ | |||
73 | 73 | ||
74 | #define P_HWAIT (P_DONTCARE) | 74 | #define P_HWAIT (P_DONTCARE) |
75 | 75 | ||
76 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1 | ||
77 | |||
76 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | 78 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) |
77 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) | 79 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(2)) |
78 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) | 80 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PG2) | P_FUNCT(2)) |
diff --git a/arch/blackfin/mach-bf533/boards/blackstamp.c b/arch/blackfin/mach-bf533/boards/blackstamp.c index 6ee607c259ac..015c18f85e7f 100644 --- a/arch/blackfin/mach-bf533/boards/blackstamp.c +++ b/arch/blackfin/mach-bf533/boards/blackstamp.c | |||
@@ -309,10 +309,8 @@ static struct platform_device i2c_gpio_device = { | |||
309 | }; | 309 | }; |
310 | #endif | 310 | #endif |
311 | 311 | ||
312 | #ifdef CONFIG_I2C_BOARDINFO | ||
313 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 312 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
314 | }; | 313 | }; |
315 | #endif | ||
316 | 314 | ||
317 | static const unsigned int cclk_vlev_datasheet[] = | 315 | static const unsigned int cclk_vlev_datasheet[] = |
318 | { | 316 | { |
@@ -390,10 +388,8 @@ static int __init blackstamp_init(void) | |||
390 | 388 | ||
391 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 389 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
392 | 390 | ||
393 | #ifdef CONFIG_I2C_BOARDINFO | ||
394 | i2c_register_board_info(0, bfin_i2c_board_info, | 391 | i2c_register_board_info(0, bfin_i2c_board_info, |
395 | ARRAY_SIZE(bfin_i2c_board_info)); | 392 | ARRAY_SIZE(bfin_i2c_board_info)); |
396 | #endif | ||
397 | 393 | ||
398 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 394 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
399 | if (ret < 0) | 395 | if (ret < 0) |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 07f9ad1e189c..db96f33f72e2 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -441,7 +441,6 @@ static struct platform_device i2c_gpio_device = { | |||
441 | }; | 441 | }; |
442 | #endif | 442 | #endif |
443 | 443 | ||
444 | #ifdef CONFIG_I2C_BOARDINFO | ||
445 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 444 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
446 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 445 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
447 | { | 446 | { |
@@ -461,7 +460,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
461 | }, | 460 | }, |
462 | #endif | 461 | #endif |
463 | }; | 462 | }; |
464 | #endif | ||
465 | 463 | ||
466 | static const unsigned int cclk_vlev_datasheet[] = | 464 | static const unsigned int cclk_vlev_datasheet[] = |
467 | { | 465 | { |
@@ -550,10 +548,8 @@ static int __init stamp_init(void) | |||
550 | 548 | ||
551 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 549 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
552 | 550 | ||
553 | #ifdef CONFIG_I2C_BOARDINFO | ||
554 | i2c_register_board_info(0, bfin_i2c_board_info, | 551 | i2c_register_board_info(0, bfin_i2c_board_info, |
555 | ARRAY_SIZE(bfin_i2c_board_info)); | 552 | ARRAY_SIZE(bfin_i2c_board_info)); |
556 | #endif | ||
557 | 553 | ||
558 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 554 | ret = platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
559 | if (ret < 0) | 555 | if (ret < 0) |
diff --git a/arch/blackfin/mach-bf533/include/mach/portmux.h b/arch/blackfin/mach-bf533/include/mach/portmux.h index 685a2651dcda..2f59ce0b0cb5 100644 --- a/arch/blackfin/mach-bf533/include/mach/portmux.h +++ b/arch/blackfin/mach-bf533/include/mach/portmux.h | |||
@@ -54,14 +54,11 @@ | |||
54 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) | 54 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) |
55 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) | 55 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) |
56 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) | 56 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) |
57 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2 | ||
57 | 58 | ||
58 | #define P_TMR2 (P_DONTCARE) | 59 | #define P_TMR2 (P_DONTCARE) |
59 | #define P_TMR1 (P_DONTCARE) | 60 | #define P_TMR1 (P_DONTCARE) |
60 | #define P_TMR0 (P_DONTCARE) | 61 | #define P_TMR0 (P_DONTCARE) |
61 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1)) | 62 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF1)) |
62 | 63 | ||
63 | |||
64 | |||
65 | |||
66 | |||
67 | #endif /* _MACH_PORTMUX_H_ */ | 64 | #endif /* _MACH_PORTMUX_H_ */ |
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 6ac8e4d5bd38..9cd8fb2a30d3 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -479,8 +479,13 @@ static struct platform_device bfin_sport1_uart_device = { | |||
479 | #endif | 479 | #endif |
480 | 480 | ||
481 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 481 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
482 | static struct platform_device bfin_mii_bus = { | ||
483 | .name = "bfin_mii_bus", | ||
484 | }; | ||
485 | |||
482 | static struct platform_device bfin_mac_device = { | 486 | static struct platform_device bfin_mac_device = { |
483 | .name = "bfin_mac", | 487 | .name = "bfin_mac", |
488 | .dev.platform_data = &bfin_mii_bus, | ||
484 | }; | 489 | }; |
485 | #endif | 490 | #endif |
486 | 491 | ||
@@ -591,6 +596,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
591 | #endif | 596 | #endif |
592 | 597 | ||
593 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 598 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
599 | &bfin_mii_bus, | ||
594 | &bfin_mac_device, | 600 | &bfin_mac_device, |
595 | #endif | 601 | #endif |
596 | 602 | ||
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index dd6e6bfb98ea..da710fdc4569 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
@@ -262,8 +262,13 @@ static struct platform_device isp1362_hcd_device = { | |||
262 | #endif | 262 | #endif |
263 | 263 | ||
264 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 264 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
265 | static struct platform_device bfin_mii_bus = { | ||
266 | .name = "bfin_mii_bus", | ||
267 | }; | ||
268 | |||
265 | static struct platform_device bfin_mac_device = { | 269 | static struct platform_device bfin_mac_device = { |
266 | .name = "bfin_mac", | 270 | .name = "bfin_mac", |
271 | .dev.platform_data = &bfin_mii_bus, | ||
267 | }; | 272 | }; |
268 | #endif | 273 | #endif |
269 | 274 | ||
@@ -662,6 +667,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
662 | #endif | 667 | #endif |
663 | 668 | ||
664 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 669 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
670 | &bfin_mii_bus, | ||
665 | &bfin_mac_device, | 671 | &bfin_mac_device, |
666 | #endif | 672 | #endif |
667 | 673 | ||
@@ -708,7 +714,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
708 | #endif | 714 | #endif |
709 | }; | 715 | }; |
710 | 716 | ||
711 | static int __init stamp_init(void) | 717 | static int __init generic_init(void) |
712 | { | 718 | { |
713 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 719 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
714 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 720 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
@@ -720,13 +726,13 @@ static int __init stamp_init(void) | |||
720 | return 0; | 726 | return 0; |
721 | } | 727 | } |
722 | 728 | ||
723 | arch_initcall(stamp_init); | 729 | arch_initcall(generic_init); |
724 | 730 | ||
725 | void native_machine_restart(char *cmd) | 731 | void native_machine_restart(char *cmd) |
726 | { | 732 | { |
727 | /* workaround reboot hang when booting from SPI */ | 733 | /* workaround reboot hang when booting from SPI */ |
728 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 734 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
729 | bfin_gpio_reset_spi0_ssel1(); | 735 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
730 | } | 736 | } |
731 | 737 | ||
732 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 738 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
diff --git a/arch/blackfin/mach-bf537/boards/minotaur.c b/arch/blackfin/mach-bf537/boards/minotaur.c index bb795341cb17..db7d3a385e4b 100644 --- a/arch/blackfin/mach-bf537/boards/minotaur.c +++ b/arch/blackfin/mach-bf537/boards/minotaur.c | |||
@@ -61,8 +61,13 @@ static struct platform_device rtc_device = { | |||
61 | #endif | 61 | #endif |
62 | 62 | ||
63 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 63 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
64 | static struct platform_device bfin_mii_bus = { | ||
65 | .name = "bfin_mii_bus", | ||
66 | }; | ||
67 | |||
64 | static struct platform_device bfin_mac_device = { | 68 | static struct platform_device bfin_mac_device = { |
65 | .name = "bfin_mac", | 69 | .name = "bfin_mac", |
70 | .dev.platform_data = &bfin_mii_bus, | ||
66 | }; | 71 | }; |
67 | #endif | 72 | #endif |
68 | 73 | ||
@@ -324,6 +329,7 @@ static struct platform_device *minotaur_devices[] __initdata = { | |||
324 | #endif | 329 | #endif |
325 | 330 | ||
326 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 331 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
332 | &bfin_mii_bus, | ||
327 | &bfin_mac_device, | 333 | &bfin_mac_device, |
328 | #endif | 334 | #endif |
329 | 335 | ||
@@ -377,5 +383,5 @@ void native_machine_restart(char *cmd) | |||
377 | { | 383 | { |
378 | /* workaround reboot hang when booting from SPI */ | 384 | /* workaround reboot hang when booting from SPI */ |
379 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 385 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
380 | bfin_gpio_reset_spi0_ssel1(); | 386 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
381 | } | 387 | } |
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 89de94f4545d..590eb3a139b7 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -198,8 +198,13 @@ static struct platform_device isp1362_hcd_device = { | |||
198 | #endif | 198 | #endif |
199 | 199 | ||
200 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 200 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
201 | static struct platform_device bfin_mii_bus = { | ||
202 | .name = "bfin_mii_bus", | ||
203 | }; | ||
204 | |||
201 | static struct platform_device bfin_mac_device = { | 205 | static struct platform_device bfin_mac_device = { |
202 | .name = "bfin_mac", | 206 | .name = "bfin_mac", |
207 | .dev.platform_data = &bfin_mii_bus, | ||
203 | }; | 208 | }; |
204 | #endif | 209 | #endif |
205 | 210 | ||
@@ -529,6 +534,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
529 | #endif | 534 | #endif |
530 | 535 | ||
531 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 536 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
537 | &bfin_mii_bus, | ||
532 | &bfin_mac_device, | 538 | &bfin_mac_device, |
533 | #endif | 539 | #endif |
534 | 540 | ||
@@ -558,7 +564,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
558 | #endif | 564 | #endif |
559 | }; | 565 | }; |
560 | 566 | ||
561 | static int __init stamp_init(void) | 567 | static int __init pnav_init(void) |
562 | { | 568 | { |
563 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 569 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
564 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 570 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
@@ -569,7 +575,7 @@ static int __init stamp_init(void) | |||
569 | return 0; | 575 | return 0; |
570 | } | 576 | } |
571 | 577 | ||
572 | arch_initcall(stamp_init); | 578 | arch_initcall(pnav_init); |
573 | 579 | ||
574 | void bfin_get_ether_addr(char *addr) | 580 | void bfin_get_ether_addr(char *addr) |
575 | { | 581 | { |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index d812e2514a2f..cd04c5e44878 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -321,8 +321,13 @@ static struct platform_device isp1362_hcd_device = { | |||
321 | #endif | 321 | #endif |
322 | 322 | ||
323 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 323 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
324 | static struct platform_device bfin_mii_bus = { | ||
325 | .name = "bfin_mii_bus", | ||
326 | }; | ||
327 | |||
324 | static struct platform_device bfin_mac_device = { | 328 | static struct platform_device bfin_mac_device = { |
325 | .name = "bfin_mac", | 329 | .name = "bfin_mac", |
330 | .dev.platform_data = &bfin_mii_bus, | ||
326 | }; | 331 | }; |
327 | #endif | 332 | #endif |
328 | 333 | ||
@@ -1068,7 +1073,6 @@ static struct adp5588_kpad_platform_data adp5588_kpad_data = { | |||
1068 | }; | 1073 | }; |
1069 | #endif | 1074 | #endif |
1070 | 1075 | ||
1071 | #ifdef CONFIG_I2C_BOARDINFO | ||
1072 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | 1076 | static struct i2c_board_info __initdata bfin_i2c_board_info[] = { |
1073 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) | 1077 | #if defined(CONFIG_JOYSTICK_AD7142) || defined(CONFIG_JOYSTICK_AD7142_MODULE) |
1074 | { | 1078 | { |
@@ -1102,7 +1106,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info[] = { | |||
1102 | }, | 1106 | }, |
1103 | #endif | 1107 | #endif |
1104 | }; | 1108 | }; |
1105 | #endif | ||
1106 | 1109 | ||
1107 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) | 1110 | #if defined(CONFIG_SERIAL_BFIN_SPORT) || defined(CONFIG_SERIAL_BFIN_SPORT_MODULE) |
1108 | static struct platform_device bfin_sport0_uart_device = { | 1111 | static struct platform_device bfin_sport0_uart_device = { |
@@ -1217,6 +1220,7 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1217 | #endif | 1220 | #endif |
1218 | 1221 | ||
1219 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 1222 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
1223 | &bfin_mii_bus, | ||
1220 | &bfin_mac_device, | 1224 | &bfin_mac_device, |
1221 | #endif | 1225 | #endif |
1222 | 1226 | ||
@@ -1284,12 +1288,8 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
1284 | static int __init stamp_init(void) | 1288 | static int __init stamp_init(void) |
1285 | { | 1289 | { |
1286 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 1290 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
1287 | |||
1288 | #ifdef CONFIG_I2C_BOARDINFO | ||
1289 | i2c_register_board_info(0, bfin_i2c_board_info, | 1291 | i2c_register_board_info(0, bfin_i2c_board_info, |
1290 | ARRAY_SIZE(bfin_i2c_board_info)); | 1292 | ARRAY_SIZE(bfin_i2c_board_info)); |
1291 | #endif | ||
1292 | |||
1293 | bfin_plat_nand_init(); | 1293 | bfin_plat_nand_init(); |
1294 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); | 1294 | platform_add_devices(stamp_devices, ARRAY_SIZE(stamp_devices)); |
1295 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); | 1295 | spi_register_board_info(bfin_spi_board_info, ARRAY_SIZE(bfin_spi_board_info)); |
@@ -1307,7 +1307,7 @@ void native_machine_restart(char *cmd) | |||
1307 | { | 1307 | { |
1308 | /* workaround reboot hang when booting from SPI */ | 1308 | /* workaround reboot hang when booting from SPI */ |
1309 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 1309 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
1310 | bfin_gpio_reset_spi0_ssel1(); | 1310 | bfin_reset_boot_spi_cs(P_DEFAULT_BOOT_SPI_CS); |
1311 | } | 1311 | } |
1312 | 1312 | ||
1313 | /* | 1313 | /* |
diff --git a/arch/blackfin/mach-bf537/boards/tcm_bf537.c b/arch/blackfin/mach-bf537/boards/tcm_bf537.c index 2f4b066153c5..3f4f203a06ec 100644 --- a/arch/blackfin/mach-bf537/boards/tcm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/tcm_bf537.c | |||
@@ -481,8 +481,13 @@ static struct platform_device bfin_sport1_uart_device = { | |||
481 | #endif | 481 | #endif |
482 | 482 | ||
483 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 483 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
484 | static struct platform_device bfin_mii_bus = { | ||
485 | .name = "bfin_mii_bus", | ||
486 | }; | ||
487 | |||
484 | static struct platform_device bfin_mac_device = { | 488 | static struct platform_device bfin_mac_device = { |
485 | .name = "bfin_mac", | 489 | .name = "bfin_mac", |
490 | .dev.platform_data = &bfin_mii_bus, | ||
486 | }; | 491 | }; |
487 | #endif | 492 | #endif |
488 | 493 | ||
@@ -593,6 +598,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
593 | #endif | 598 | #endif |
594 | 599 | ||
595 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 600 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
601 | &bfin_mii_bus, | ||
596 | &bfin_mac_device, | 602 | &bfin_mac_device, |
597 | #endif | 603 | #endif |
598 | 604 | ||
@@ -615,7 +621,7 @@ static struct platform_device *cm_bf537_devices[] __initdata = { | |||
615 | &bfin_gpios_device, | 621 | &bfin_gpios_device, |
616 | }; | 622 | }; |
617 | 623 | ||
618 | static int __init cm_bf537_init(void) | 624 | static int __init tcm_bf537_init(void) |
619 | { | 625 | { |
620 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 626 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
621 | platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); | 627 | platform_add_devices(cm_bf537_devices, ARRAY_SIZE(cm_bf537_devices)); |
@@ -629,7 +635,7 @@ static int __init cm_bf537_init(void) | |||
629 | return 0; | 635 | return 0; |
630 | } | 636 | } |
631 | 637 | ||
632 | arch_initcall(cm_bf537_init); | 638 | arch_initcall(tcm_bf537_init); |
633 | 639 | ||
634 | void bfin_get_ether_addr(char *addr) | 640 | void bfin_get_ether_addr(char *addr) |
635 | { | 641 | { |
diff --git a/arch/blackfin/mach-bf537/include/mach/portmux.h b/arch/blackfin/mach-bf537/include/mach/portmux.h index 78fee6e0f237..87285e75e903 100644 --- a/arch/blackfin/mach-bf537/include/mach/portmux.h +++ b/arch/blackfin/mach-bf537/include/mach/portmux.h | |||
@@ -31,6 +31,7 @@ | |||
31 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1)) | 31 | #define P_PPI0_FS1 (P_DEFINED | P_IDENT(GPIO_PF9) | P_FUNCT(1)) |
32 | #define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) | 32 | #define P_TACLK0 (P_DEFINED | P_IDENT(GPIO_PF14) | P_FUNCT(1)) |
33 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) | 33 | #define P_TMRCLK (P_DEFINED | P_IDENT(GPIO_PF15) | P_FUNCT(1)) |
34 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1 | ||
34 | 35 | ||
35 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0)) | 36 | #define P_PPI0_D0 (P_DEFINED | P_IDENT(GPIO_PG0) | P_FUNCT(0)) |
36 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) | 37 | #define P_PPI0_D1 (P_DEFINED | P_IDENT(GPIO_PG1) | P_FUNCT(0)) |
diff --git a/arch/blackfin/mach-bf538/include/mach/portmux.h b/arch/blackfin/mach-bf538/include/mach/portmux.h index 1e031b588b47..c8db264e3e4d 100644 --- a/arch/blackfin/mach-bf538/include/mach/portmux.h +++ b/arch/blackfin/mach-bf538/include/mach/portmux.h | |||
@@ -102,5 +102,6 @@ | |||
102 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) | 102 | #define P_SPI0_SSEL2 (P_DEFINED | P_IDENT(GPIO_PF2)) |
103 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) | 103 | #define P_SPI0_SSEL1 (P_DEFINED | P_IDENT(GPIO_PF1)) |
104 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) | 104 | #define P_SPI0_SS (P_DEFINED | P_IDENT(GPIO_PF0)) |
105 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2 | ||
105 | 106 | ||
106 | #endif /* _MACH_PORTMUX_H_ */ | 107 | #endif /* _MACH_PORTMUX_H_ */ |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 309c16014cae..096e661700a7 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -781,7 +781,6 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
781 | #endif | 781 | #endif |
782 | #endif | 782 | #endif |
783 | 783 | ||
784 | #ifdef CONFIG_I2C_BOARDINFO | ||
785 | static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { | 784 | static struct i2c_board_info __initdata bfin_i2c_board_info0[] = { |
786 | }; | 785 | }; |
787 | 786 | ||
@@ -800,7 +799,6 @@ static struct i2c_board_info __initdata bfin_i2c_board_info1[] = { | |||
800 | #endif | 799 | #endif |
801 | }; | 800 | }; |
802 | #endif | 801 | #endif |
803 | #endif | ||
804 | 802 | ||
805 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) | 803 | #if defined(CONFIG_KEYBOARD_GPIO) || defined(CONFIG_KEYBOARD_GPIO_MODULE) |
806 | #include <linux/gpio_keys.h> | 804 | #include <linux/gpio_keys.h> |
@@ -956,14 +954,12 @@ static int __init ezkit_init(void) | |||
956 | { | 954 | { |
957 | printk(KERN_INFO "%s(): registering device resources\n", __func__); | 955 | printk(KERN_INFO "%s(): registering device resources\n", __func__); |
958 | 956 | ||
959 | #ifdef CONFIG_I2C_BOARDINFO | ||
960 | i2c_register_board_info(0, bfin_i2c_board_info0, | 957 | i2c_register_board_info(0, bfin_i2c_board_info0, |
961 | ARRAY_SIZE(bfin_i2c_board_info0)); | 958 | ARRAY_SIZE(bfin_i2c_board_info0)); |
962 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | 959 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ |
963 | i2c_register_board_info(1, bfin_i2c_board_info1, | 960 | i2c_register_board_info(1, bfin_i2c_board_info1, |
964 | ARRAY_SIZE(bfin_i2c_board_info1)); | 961 | ARRAY_SIZE(bfin_i2c_board_info1)); |
965 | #endif | 962 | #endif |
966 | #endif | ||
967 | 963 | ||
968 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); | 964 | platform_add_devices(ezkit_devices, ARRAY_SIZE(ezkit_devices)); |
969 | 965 | ||
diff --git a/arch/blackfin/mach-bf548/include/mach/anomaly.h b/arch/blackfin/mach-bf548/include/mach/anomaly.h index 3b5430999f4f..23d03c52f4b4 100644 --- a/arch/blackfin/mach-bf548/include/mach/anomaly.h +++ b/arch/blackfin/mach-bf548/include/mach/anomaly.h | |||
@@ -175,6 +175,7 @@ | |||
175 | #define ANOMALY_05000311 (0) | 175 | #define ANOMALY_05000311 (0) |
176 | #define ANOMALY_05000323 (0) | 176 | #define ANOMALY_05000323 (0) |
177 | #define ANOMALY_05000363 (0) | 177 | #define ANOMALY_05000363 (0) |
178 | #define ANOMALY_05000380 (0) | ||
178 | #define ANOMALY_05000412 (0) | 179 | #define ANOMALY_05000412 (0) |
179 | #define ANOMALY_05000432 (0) | 180 | #define ANOMALY_05000432 (0) |
180 | #define ANOMALY_05000435 (0) | 181 | #define ANOMALY_05000435 (0) |
diff --git a/arch/blackfin/mach-bf548/include/mach/bf548.h b/arch/blackfin/mach-bf548/include/mach/bf548.h index f0e569984810..cd31f72bdd82 100644 --- a/arch/blackfin/mach-bf548/include/mach/bf548.h +++ b/arch/blackfin/mach-bf548/include/mach/bf548.h | |||
@@ -104,6 +104,18 @@ | |||
104 | 104 | ||
105 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN) | 105 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN) |
106 | 106 | ||
107 | #if defined(CONFIG_BF542M) | ||
108 | # define CONFIG_BF542 | ||
109 | #elif defined(CONFIG_BF544M) | ||
110 | # define CONFIG_BF544 | ||
111 | #elif defined(CONFIG_BF547M) | ||
112 | # define CONFIG_BF547 | ||
113 | #elif defined(CONFIG_BF548M) | ||
114 | # define CONFIG_BF548 | ||
115 | #elif defined(CONFIG_BF549M) | ||
116 | # define CONFIG_BF549 | ||
117 | #endif | ||
118 | |||
107 | #if defined(CONFIG_BF542) | 119 | #if defined(CONFIG_BF542) |
108 | # define CPU "BF542" | 120 | # define CPU "BF542" |
109 | # define CPUID 0x27de | 121 | # define CPUID 0x27de |
diff --git a/arch/blackfin/mach-bf548/include/mach/gpio.h b/arch/blackfin/mach-bf548/include/mach/gpio.h index bba82dc75f16..3a2051709787 100644 --- a/arch/blackfin/mach-bf548/include/mach/gpio.h +++ b/arch/blackfin/mach-bf548/include/mach/gpio.h | |||
@@ -195,17 +195,17 @@ | |||
195 | struct gpio_port_t { | 195 | struct gpio_port_t { |
196 | unsigned short port_fer; | 196 | unsigned short port_fer; |
197 | unsigned short dummy1; | 197 | unsigned short dummy1; |
198 | unsigned short port_data; | 198 | unsigned short data; |
199 | unsigned short dummy2; | 199 | unsigned short dummy2; |
200 | unsigned short port_set; | 200 | unsigned short data_set; |
201 | unsigned short dummy3; | 201 | unsigned short dummy3; |
202 | unsigned short port_clear; | 202 | unsigned short data_clear; |
203 | unsigned short dummy4; | 203 | unsigned short dummy4; |
204 | unsigned short port_dir_set; | 204 | unsigned short dir_set; |
205 | unsigned short dummy5; | 205 | unsigned short dummy5; |
206 | unsigned short port_dir_clear; | 206 | unsigned short dir_clear; |
207 | unsigned short dummy6; | 207 | unsigned short dummy6; |
208 | unsigned short port_inen; | 208 | unsigned short inen; |
209 | unsigned short dummy7; | 209 | unsigned short dummy7; |
210 | unsigned int port_mux; | 210 | unsigned int port_mux; |
211 | }; | 211 | }; |
diff --git a/arch/blackfin/mach-bf548/include/mach/portmux.h b/arch/blackfin/mach-bf548/include/mach/portmux.h index 8177a567dcdb..ffb1d0a44b4d 100644 --- a/arch/blackfin/mach-bf548/include/mach/portmux.h +++ b/arch/blackfin/mach-bf548/include/mach/portmux.h | |||
@@ -125,6 +125,7 @@ | |||
125 | #define P_KEY_COL2 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(3)) | 125 | #define P_KEY_COL2 (P_DEFINED | P_IDENT(GPIO_PD14) | P_FUNCT(3)) |
126 | #define P_KEY_COL3 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(3)) | 126 | #define P_KEY_COL3 (P_DEFINED | P_IDENT(GPIO_PD15) | P_FUNCT(3)) |
127 | 127 | ||
128 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL1 | ||
128 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(0)) | 129 | #define P_SPI0_SCK (P_DEFINED | P_IDENT(GPIO_PE0) | P_FUNCT(0)) |
129 | #define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(0)) | 130 | #define P_SPI0_MISO (P_DEFINED | P_IDENT(GPIO_PE1) | P_FUNCT(0)) |
130 | #define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(0)) | 131 | #define P_SPI0_MOSI (P_DEFINED | P_IDENT(GPIO_PE2) | P_FUNCT(0)) |
diff --git a/arch/blackfin/mach-bf561/include/mach/defBF561.h b/arch/blackfin/mach-bf561/include/mach/defBF561.h index d7c509759659..cf922295f4ce 100644 --- a/arch/blackfin/mach-bf561/include/mach/defBF561.h +++ b/arch/blackfin/mach-bf561/include/mach/defBF561.h | |||
@@ -1106,6 +1106,8 @@ | |||
1106 | #define DLEN_8 0x0 /* PPI Data Length mask for DLEN=8 */ | 1106 | #define DLEN_8 0x0 /* PPI Data Length mask for DLEN=8 */ |
1107 | #define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */ | 1107 | #define DLEN(x) (((x-9) & 0x07) << 11) /* PPI Data Length (only works for x=10-->x=16) */ |
1108 | #define POL 0x0000C000 /* PPI Signal Polarities */ | 1108 | #define POL 0x0000C000 /* PPI Signal Polarities */ |
1109 | #define POLC 0x4000 /* PPI Clock Polarity */ | ||
1110 | #define POLS 0x8000 /* PPI Frame Sync Polarity */ | ||
1109 | 1111 | ||
1110 | /* PPI_STATUS Masks */ | 1112 | /* PPI_STATUS Masks */ |
1111 | #define FLD 0x00000400 /* Field Indicator */ | 1113 | #define FLD 0x00000400 /* Field Indicator */ |
diff --git a/arch/blackfin/mach-bf561/include/mach/portmux.h b/arch/blackfin/mach-bf561/include/mach/portmux.h index a6ee8206efb6..2e5ad6347dea 100644 --- a/arch/blackfin/mach-bf561/include/mach/portmux.h +++ b/arch/blackfin/mach-bf561/include/mach/portmux.h | |||
@@ -85,5 +85,6 @@ | |||
85 | #define P_SPI0_MOSI (P_DONTCARE) | 85 | #define P_SPI0_MOSI (P_DONTCARE) |
86 | #define P_SPI0_MISO (P_DONTCARE) | 86 | #define P_SPI0_MISO (P_DONTCARE) |
87 | #define P_SPI0_SCK (P_DONTCARE) | 87 | #define P_SPI0_SCK (P_DONTCARE) |
88 | #define P_DEFAULT_BOOT_SPI_CS P_SPI0_SSEL2 | ||
88 | 89 | ||
89 | #endif /* _MACH_PORTMUX_H_ */ | 90 | #endif /* _MACH_PORTMUX_H_ */ |
diff --git a/arch/blackfin/mach-common/clocks-init.c b/arch/blackfin/mach-common/clocks-init.c index 5d182abefc7b..9dddb6f8cc85 100644 --- a/arch/blackfin/mach-common/clocks-init.c +++ b/arch/blackfin/mach-common/clocks-init.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <asm/clocks.h> | 14 | #include <asm/clocks.h> |
15 | #include <asm/mem_init.h> | 15 | #include <asm/mem_init.h> |
16 | 16 | ||
17 | #define SDGCTL_WIDTH (1 << 31) /* SDRAM external data path width */ | ||
17 | #define PLL_CTL_VAL \ | 18 | #define PLL_CTL_VAL \ |
18 | (((CONFIG_VCO_MULT & 63) << 9) | CLKIN_HALF | \ | 19 | (((CONFIG_VCO_MULT & 63) << 9) | CLKIN_HALF | \ |
19 | (PLL_BYPASS << 8) | (ANOMALY_05000265 ? 0x8000 : 0)) | 20 | (PLL_BYPASS << 8) | (ANOMALY_05000265 ? 0x8000 : 0)) |
@@ -76,7 +77,7 @@ void init_clocks(void) | |||
76 | bfin_write_PLL_DIV(CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV); | 77 | bfin_write_PLL_DIV(CONFIG_CCLK_ACT_DIV | CONFIG_SCLK_DIV); |
77 | #ifdef EBIU_SDGCTL | 78 | #ifdef EBIU_SDGCTL |
78 | bfin_write_EBIU_SDRRC(mem_SDRRC); | 79 | bfin_write_EBIU_SDRRC(mem_SDRRC); |
79 | bfin_write_EBIU_SDGCTL(mem_SDGCTL); | 80 | bfin_write_EBIU_SDGCTL((bfin_read_EBIU_SDGCTL() & SDGCTL_WIDTH) | mem_SDGCTL); |
80 | #else | 81 | #else |
81 | bfin_write_EBIU_RSTCTL(bfin_read_EBIU_RSTCTL() & ~(SRREQ)); | 82 | bfin_write_EBIU_RSTCTL(bfin_read_EBIU_RSTCTL() & ~(SRREQ)); |
82 | do_sync(); | 83 | do_sync(); |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index fae774651374..88de053bbe8e 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -151,13 +151,6 @@ ENTRY(_ex_syscall) | |||
151 | jump.s _bfin_return_from_exception; | 151 | jump.s _bfin_return_from_exception; |
152 | ENDPROC(_ex_syscall) | 152 | ENDPROC(_ex_syscall) |
153 | 153 | ||
154 | ENTRY(_ex_soft_bp) | ||
155 | r7 = retx; | ||
156 | r7 += -2; | ||
157 | retx = r7; | ||
158 | jump.s _ex_trap_c; | ||
159 | ENDPROC(_ex_soft_bp) | ||
160 | |||
161 | ENTRY(_ex_single_step) | 154 | ENTRY(_ex_single_step) |
162 | /* If we just returned from an interrupt, the single step event is | 155 | /* If we just returned from an interrupt, the single step event is |
163 | for the RTI instruction. */ | 156 | for the RTI instruction. */ |
@@ -1087,7 +1080,7 @@ ENTRY(_ex_table) | |||
1087 | * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined | 1080 | * EXCPT instruction can provide 4 bits of EXCAUSE, allowing 16 to be user defined |
1088 | */ | 1081 | */ |
1089 | .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */ | 1082 | .long _ex_syscall /* 0x00 - User Defined - Linux Syscall */ |
1090 | .long _ex_soft_bp /* 0x01 - User Defined - Software breakpoint */ | 1083 | .long _ex_trap_c /* 0x01 - User Defined - Software breakpoint */ |
1091 | #ifdef CONFIG_KGDB | 1084 | #ifdef CONFIG_KGDB |
1092 | .long _ex_trap_c /* 0x02 - User Defined - KGDB initial connection | 1085 | .long _ex_trap_c /* 0x02 - User Defined - KGDB initial connection |
1093 | and break signal trap */ | 1086 | and break signal trap */ |
diff --git a/arch/blackfin/mach-common/head.S b/arch/blackfin/mach-common/head.S index e1e42c029e15..698d4c05947e 100644 --- a/arch/blackfin/mach-common/head.S +++ b/arch/blackfin/mach-common/head.S | |||
@@ -17,6 +17,19 @@ | |||
17 | 17 | ||
18 | __INIT | 18 | __INIT |
19 | 19 | ||
20 | ENTRY(__init_clear_bss) | ||
21 | r2 = r2 - r1; | ||
22 | cc = r2 == 0; | ||
23 | if cc jump .L_bss_done; | ||
24 | r2 >>= 2; | ||
25 | p1 = r1; | ||
26 | p2 = r2; | ||
27 | lsetup (1f, 1f) lc0 = p2; | ||
28 | 1: [p1++] = r0; | ||
29 | .L_bss_done: | ||
30 | rts; | ||
31 | ENDPROC(__init_clear_bss) | ||
32 | |||
20 | #define INITIAL_STACK (L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) | 33 | #define INITIAL_STACK (L1_SCRATCH_START + L1_SCRATCH_LENGTH - 12) |
21 | 34 | ||
22 | ENTRY(__start) | 35 | ENTRY(__start) |
@@ -144,6 +157,35 @@ ENTRY(__start) | |||
144 | call _init_early_exception_vectors; | 157 | call _init_early_exception_vectors; |
145 | #endif | 158 | #endif |
146 | 159 | ||
160 | r0 = 0 (x); | ||
161 | /* Zero out all of the fun bss regions */ | ||
162 | #if L1_DATA_A_LENGTH > 0 | ||
163 | r1.l = __sbss_l1; | ||
164 | r1.h = __sbss_l1; | ||
165 | r2.l = __ebss_l1; | ||
166 | r2.h = __ebss_l1; | ||
167 | call __init_clear_bss | ||
168 | #endif | ||
169 | #if L1_DATA_B_LENGTH > 0 | ||
170 | r1.l = __sbss_b_l1; | ||
171 | r1.h = __sbss_b_l1; | ||
172 | r2.l = __ebss_b_l1; | ||
173 | r2.h = __ebss_b_l1; | ||
174 | call __init_clear_bss | ||
175 | #endif | ||
176 | #if L2_LENGTH > 0 | ||
177 | r1.l = __sbss_l2; | ||
178 | r1.h = __sbss_l2; | ||
179 | r2.l = __ebss_l2; | ||
180 | r2.h = __ebss_l2; | ||
181 | call __init_clear_bss | ||
182 | #endif | ||
183 | r1.l = ___bss_start; | ||
184 | r1.h = ___bss_start; | ||
185 | r2.l = ___bss_stop; | ||
186 | r2.h = ___bss_stop; | ||
187 | call __init_clear_bss | ||
188 | |||
147 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ | 189 | /* Put The Code for PLL Programming and SDRAM Programming in L1 ISRAM */ |
148 | call _bfin_relocate_l1_mem; | 190 | call _bfin_relocate_l1_mem; |
149 | #ifdef CONFIG_BFIN_KERNEL_CLOCK | 191 | #ifdef CONFIG_BFIN_KERNEL_CLOCK |
@@ -185,19 +227,6 @@ ENDPROC(__start) | |||
185 | # define WDOG_CTL WDOGA_CTL | 227 | # define WDOG_CTL WDOGA_CTL |
186 | #endif | 228 | #endif |
187 | 229 | ||
188 | ENTRY(__init_clear_bss) | ||
189 | r2 = r2 - r1; | ||
190 | cc = r2 == 0; | ||
191 | if cc jump .L_bss_done; | ||
192 | r2 >>= 2; | ||
193 | p1 = r1; | ||
194 | p2 = r2; | ||
195 | lsetup (1f, 1f) lc0 = p2; | ||
196 | 1: [p1++] = r0; | ||
197 | .L_bss_done: | ||
198 | rts; | ||
199 | ENDPROC(__init_clear_bss) | ||
200 | |||
201 | ENTRY(_real_start) | 230 | ENTRY(_real_start) |
202 | /* Enable nested interrupts */ | 231 | /* Enable nested interrupts */ |
203 | [--sp] = reti; | 232 | [--sp] = reti; |
@@ -209,35 +238,6 @@ ENTRY(_real_start) | |||
209 | w[p0] = r0; | 238 | w[p0] = r0; |
210 | ssync; | 239 | ssync; |
211 | 240 | ||
212 | r0 = 0 (x); | ||
213 | /* Zero out all of the fun bss regions */ | ||
214 | #if L1_DATA_A_LENGTH > 0 | ||
215 | r1.l = __sbss_l1; | ||
216 | r1.h = __sbss_l1; | ||
217 | r2.l = __ebss_l1; | ||
218 | r2.h = __ebss_l1; | ||
219 | call __init_clear_bss | ||
220 | #endif | ||
221 | #if L1_DATA_B_LENGTH > 0 | ||
222 | r1.l = __sbss_b_l1; | ||
223 | r1.h = __sbss_b_l1; | ||
224 | r2.l = __ebss_b_l1; | ||
225 | r2.h = __ebss_b_l1; | ||
226 | call __init_clear_bss | ||
227 | #endif | ||
228 | #if L2_LENGTH > 0 | ||
229 | r1.l = __sbss_l2; | ||
230 | r1.h = __sbss_l2; | ||
231 | r2.l = __ebss_l2; | ||
232 | r2.h = __ebss_l2; | ||
233 | call __init_clear_bss | ||
234 | #endif | ||
235 | r1.l = ___bss_start; | ||
236 | r1.h = ___bss_start; | ||
237 | r2.l = ___bss_stop; | ||
238 | r2.h = ___bss_stop; | ||
239 | call __init_clear_bss | ||
240 | |||
241 | /* Pass the u-boot arguments to the global value command line */ | 241 | /* Pass the u-boot arguments to the global value command line */ |
242 | R0 = R7; | 242 | R0 = R7; |
243 | call _cmdline_init; | 243 | call _cmdline_init; |
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index 473df0f7fa78..43c4eb9acb65 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
@@ -195,7 +195,7 @@ ENDPROC(_evt_ivhw) | |||
195 | /* Interrupt routine for evt2 (NMI). | 195 | /* Interrupt routine for evt2 (NMI). |
196 | * We don't actually use this, so just return. | 196 | * We don't actually use this, so just return. |
197 | * For inner circle type details, please see: | 197 | * For inner circle type details, please see: |
198 | * http://docs.blackfin.uclinux.org/doku.php?id=linux:nmi | 198 | * http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:nmi |
199 | */ | 199 | */ |
200 | ENTRY(_evt_nmi) | 200 | ENTRY(_evt_nmi) |
201 | .weak _evt_nmi | 201 | .weak _evt_nmi |
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index 1bba6030dce9..202494568c6c 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -1101,10 +1101,9 @@ int __init init_arch_irq(void) | |||
1101 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | | 1101 | IMASK_IVG14 | IMASK_IVG13 | IMASK_IVG12 | IMASK_IVG11 | |
1102 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; | 1102 | IMASK_IVG10 | IMASK_IVG9 | IMASK_IVG8 | IMASK_IVG7 | IMASK_IVGHW; |
1103 | 1103 | ||
1104 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) \ | 1104 | #ifdef SIC_IWR0 |
1105 | || defined(BF538_FAMILY) || defined(CONFIG_BF51x) | ||
1106 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); | 1105 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); |
1107 | #if defined(CONFIG_BF52x) || defined(CONFIG_BF51x) | 1106 | # ifdef SIC_IWR1 |
1108 | /* BF52x/BF51x system reset does not properly reset SIC_IWR1 which | 1107 | /* BF52x/BF51x system reset does not properly reset SIC_IWR1 which |
1109 | * will screw up the bootrom as it relies on MDMA0/1 waking it | 1108 | * will screw up the bootrom as it relies on MDMA0/1 waking it |
1110 | * up from IDLE instructions. See this report for more info: | 1109 | * up from IDLE instructions. See this report for more info: |
@@ -1114,10 +1113,8 @@ int __init init_arch_irq(void) | |||
1114 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); | 1113 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); |
1115 | else | 1114 | else |
1116 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | 1115 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); |
1117 | #else | 1116 | # endif |
1118 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | 1117 | # ifdef SIC_IWR2 |
1119 | #endif | ||
1120 | # ifdef CONFIG_BF54x | ||
1121 | bfin_write_SIC_IWR2(IWR_DISABLE_ALL); | 1118 | bfin_write_SIC_IWR2(IWR_DISABLE_ALL); |
1122 | # endif | 1119 | # endif |
1123 | #else | 1120 | #else |
diff --git a/arch/blackfin/mach-common/pm.c b/arch/blackfin/mach-common/pm.c index d3d70fd67c16..f48a6aebb49b 100644 --- a/arch/blackfin/mach-common/pm.c +++ b/arch/blackfin/mach-common/pm.c | |||
@@ -82,10 +82,9 @@ void bfin_pm_suspend_standby_enter(void) | |||
82 | 82 | ||
83 | bfin_pm_standby_restore(); | 83 | bfin_pm_standby_restore(); |
84 | 84 | ||
85 | #if defined(CONFIG_BF54x) || defined(CONFIG_BF52x) || defined(CONFIG_BF561) || \ | 85 | #ifdef SIC_IWR0 |
86 | defined(CONFIG_BF538) || defined(CONFIG_BF539) || defined(CONFIG_BF51x) | ||
87 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); | 86 | bfin_write_SIC_IWR0(IWR_DISABLE_ALL); |
88 | #if defined(CONFIG_BF52x) || defined(CONFIG_BF51x) | 87 | # ifdef SIC_IWR1 |
89 | /* BF52x system reset does not properly reset SIC_IWR1 which | 88 | /* BF52x system reset does not properly reset SIC_IWR1 which |
90 | * will screw up the bootrom as it relies on MDMA0/1 waking it | 89 | * will screw up the bootrom as it relies on MDMA0/1 waking it |
91 | * up from IDLE instructions. See this report for more info: | 90 | * up from IDLE instructions. See this report for more info: |
@@ -95,10 +94,8 @@ void bfin_pm_suspend_standby_enter(void) | |||
95 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); | 94 | bfin_write_SIC_IWR1(IWR_ENABLE(10) | IWR_ENABLE(11)); |
96 | else | 95 | else |
97 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | 96 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); |
98 | #else | 97 | # endif |
99 | bfin_write_SIC_IWR1(IWR_DISABLE_ALL); | 98 | # ifdef SIC_IWR2 |
100 | #endif | ||
101 | # ifdef CONFIG_BF54x | ||
102 | bfin_write_SIC_IWR2(IWR_DISABLE_ALL); | 99 | bfin_write_SIC_IWR2(IWR_DISABLE_ALL); |
103 | # endif | 100 | # endif |
104 | #else | 101 | #else |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 52c80c2a57f2..600eef3f3ac7 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -351,7 +351,7 @@ config SGI_IP27 | |||
351 | select ARC64 | 351 | select ARC64 |
352 | select BOOT_ELF64 | 352 | select BOOT_ELF64 |
353 | select DEFAULT_SGI_PARTITION | 353 | select DEFAULT_SGI_PARTITION |
354 | select DMA_IP27 | 354 | select DMA_COHERENT |
355 | select SYS_HAS_EARLY_PRINTK | 355 | select SYS_HAS_EARLY_PRINTK |
356 | select HW_HAS_PCI | 356 | select HW_HAS_PCI |
357 | select NR_CPUS_DEFAULT_64 | 357 | select NR_CPUS_DEFAULT_64 |
@@ -761,9 +761,6 @@ config CFE | |||
761 | config DMA_COHERENT | 761 | config DMA_COHERENT |
762 | bool | 762 | bool |
763 | 763 | ||
764 | config DMA_IP27 | ||
765 | bool | ||
766 | |||
767 | config DMA_NONCOHERENT | 764 | config DMA_NONCOHERENT |
768 | bool | 765 | bool |
769 | select DMA_NEED_PCI_MAP_STATE | 766 | select DMA_NEED_PCI_MAP_STATE |
@@ -1368,7 +1365,7 @@ config CPU_SUPPORTS_64BIT_KERNEL | |||
1368 | # | 1365 | # |
1369 | config HARDWARE_WATCHPOINTS | 1366 | config HARDWARE_WATCHPOINTS |
1370 | bool | 1367 | bool |
1371 | default y if CPU_MIPS32 || CPU_MIPS64 | 1368 | default y if CPU_MIPSR1 || CPU_MIPSR2 |
1372 | 1369 | ||
1373 | menu "Kernel type" | 1370 | menu "Kernel type" |
1374 | 1371 | ||
diff --git a/arch/mips/alchemy/common/time.c b/arch/mips/alchemy/common/time.c index 32880146cbc1..6fd441d16af5 100644 --- a/arch/mips/alchemy/common/time.c +++ b/arch/mips/alchemy/common/time.c | |||
@@ -89,7 +89,7 @@ static struct clock_event_device au1x_rtcmatch2_clockdev = { | |||
89 | .irq = AU1000_RTC_MATCH2_INT, | 89 | .irq = AU1000_RTC_MATCH2_INT, |
90 | .set_next_event = au1x_rtcmatch2_set_next_event, | 90 | .set_next_event = au1x_rtcmatch2_set_next_event, |
91 | .set_mode = au1x_rtcmatch2_set_mode, | 91 | .set_mode = au1x_rtcmatch2_set_mode, |
92 | .cpumask = CPU_MASK_ALL, | 92 | .cpumask = CPU_MASK_ALL_PTR, |
93 | }; | 93 | }; |
94 | 94 | ||
95 | static struct irqaction au1x_rtcmatch2_irqaction = { | 95 | static struct irqaction au1x_rtcmatch2_irqaction = { |
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index e085feddb4a4..5f4e49ba4713 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -15,13 +15,11 @@ | |||
15 | #include <linux/serial.h> | 15 | #include <linux/serial.h> |
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/string.h> /* for memset */ | 17 | #include <linux/string.h> /* for memset */ |
18 | #include <linux/serial.h> | ||
19 | #include <linux/tty.h> | 18 | #include <linux/tty.h> |
20 | #include <linux/time.h> | 19 | #include <linux/time.h> |
21 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
22 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
23 | #include <linux/serial_8250.h> | 22 | #include <linux/serial_8250.h> |
24 | #include <linux/string.h> | ||
25 | 23 | ||
26 | #include <asm/processor.h> | 24 | #include <asm/processor.h> |
27 | #include <asm/reboot.h> | 25 | #include <asm/reboot.h> |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index 34ea319be94c..f2baea3039bb 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -53,7 +53,7 @@ CONFIG_GENERIC_TIME=y | |||
53 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 53 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
54 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 54 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
55 | CONFIG_ARC=y | 55 | CONFIG_ARC=y |
56 | CONFIG_DMA_IP27=y | 56 | CONFIG_DMA_COHERENT=y |
57 | CONFIG_EARLY_PRINTK=y | 57 | CONFIG_EARLY_PRINTK=y |
58 | CONFIG_SYS_HAS_EARLY_PRINTK=y | 58 | CONFIG_SYS_HAS_EARLY_PRINTK=y |
59 | # CONFIG_NO_IOPORT is not set | 59 | # CONFIG_NO_IOPORT is not set |
diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h index c996c3b4d074..1b332e15ab52 100644 --- a/arch/mips/include/asm/atomic.h +++ b/arch/mips/include/asm/atomic.h | |||
@@ -50,7 +50,7 @@ | |||
50 | static __inline__ void atomic_add(int i, atomic_t * v) | 50 | static __inline__ void atomic_add(int i, atomic_t * v) |
51 | { | 51 | { |
52 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 52 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
53 | unsigned long temp; | 53 | int temp; |
54 | 54 | ||
55 | __asm__ __volatile__( | 55 | __asm__ __volatile__( |
56 | " .set mips3 \n" | 56 | " .set mips3 \n" |
@@ -62,7 +62,7 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
62 | : "=&r" (temp), "=m" (v->counter) | 62 | : "=&r" (temp), "=m" (v->counter) |
63 | : "Ir" (i), "m" (v->counter)); | 63 | : "Ir" (i), "m" (v->counter)); |
64 | } else if (cpu_has_llsc) { | 64 | } else if (cpu_has_llsc) { |
65 | unsigned long temp; | 65 | int temp; |
66 | 66 | ||
67 | __asm__ __volatile__( | 67 | __asm__ __volatile__( |
68 | " .set mips3 \n" | 68 | " .set mips3 \n" |
@@ -95,7 +95,7 @@ static __inline__ void atomic_add(int i, atomic_t * v) | |||
95 | static __inline__ void atomic_sub(int i, atomic_t * v) | 95 | static __inline__ void atomic_sub(int i, atomic_t * v) |
96 | { | 96 | { |
97 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 97 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
98 | unsigned long temp; | 98 | int temp; |
99 | 99 | ||
100 | __asm__ __volatile__( | 100 | __asm__ __volatile__( |
101 | " .set mips3 \n" | 101 | " .set mips3 \n" |
@@ -107,7 +107,7 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
107 | : "=&r" (temp), "=m" (v->counter) | 107 | : "=&r" (temp), "=m" (v->counter) |
108 | : "Ir" (i), "m" (v->counter)); | 108 | : "Ir" (i), "m" (v->counter)); |
109 | } else if (cpu_has_llsc) { | 109 | } else if (cpu_has_llsc) { |
110 | unsigned long temp; | 110 | int temp; |
111 | 111 | ||
112 | __asm__ __volatile__( | 112 | __asm__ __volatile__( |
113 | " .set mips3 \n" | 113 | " .set mips3 \n" |
@@ -135,12 +135,12 @@ static __inline__ void atomic_sub(int i, atomic_t * v) | |||
135 | */ | 135 | */ |
136 | static __inline__ int atomic_add_return(int i, atomic_t * v) | 136 | static __inline__ int atomic_add_return(int i, atomic_t * v) |
137 | { | 137 | { |
138 | unsigned long result; | 138 | int result; |
139 | 139 | ||
140 | smp_llsc_mb(); | 140 | smp_llsc_mb(); |
141 | 141 | ||
142 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 142 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
143 | unsigned long temp; | 143 | int temp; |
144 | 144 | ||
145 | __asm__ __volatile__( | 145 | __asm__ __volatile__( |
146 | " .set mips3 \n" | 146 | " .set mips3 \n" |
@@ -154,7 +154,7 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
154 | : "Ir" (i), "m" (v->counter) | 154 | : "Ir" (i), "m" (v->counter) |
155 | : "memory"); | 155 | : "memory"); |
156 | } else if (cpu_has_llsc) { | 156 | } else if (cpu_has_llsc) { |
157 | unsigned long temp; | 157 | int temp; |
158 | 158 | ||
159 | __asm__ __volatile__( | 159 | __asm__ __volatile__( |
160 | " .set mips3 \n" | 160 | " .set mips3 \n" |
@@ -187,12 +187,12 @@ static __inline__ int atomic_add_return(int i, atomic_t * v) | |||
187 | 187 | ||
188 | static __inline__ int atomic_sub_return(int i, atomic_t * v) | 188 | static __inline__ int atomic_sub_return(int i, atomic_t * v) |
189 | { | 189 | { |
190 | unsigned long result; | 190 | int result; |
191 | 191 | ||
192 | smp_llsc_mb(); | 192 | smp_llsc_mb(); |
193 | 193 | ||
194 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 194 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
195 | unsigned long temp; | 195 | int temp; |
196 | 196 | ||
197 | __asm__ __volatile__( | 197 | __asm__ __volatile__( |
198 | " .set mips3 \n" | 198 | " .set mips3 \n" |
@@ -206,7 +206,7 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
206 | : "Ir" (i), "m" (v->counter) | 206 | : "Ir" (i), "m" (v->counter) |
207 | : "memory"); | 207 | : "memory"); |
208 | } else if (cpu_has_llsc) { | 208 | } else if (cpu_has_llsc) { |
209 | unsigned long temp; | 209 | int temp; |
210 | 210 | ||
211 | __asm__ __volatile__( | 211 | __asm__ __volatile__( |
212 | " .set mips3 \n" | 212 | " .set mips3 \n" |
@@ -247,12 +247,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
247 | */ | 247 | */ |
248 | static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | 248 | static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) |
249 | { | 249 | { |
250 | unsigned long result; | 250 | int result; |
251 | 251 | ||
252 | smp_llsc_mb(); | 252 | smp_llsc_mb(); |
253 | 253 | ||
254 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 254 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
255 | unsigned long temp; | 255 | int temp; |
256 | 256 | ||
257 | __asm__ __volatile__( | 257 | __asm__ __volatile__( |
258 | " .set mips3 \n" | 258 | " .set mips3 \n" |
@@ -270,7 +270,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
270 | : "Ir" (i), "m" (v->counter) | 270 | : "Ir" (i), "m" (v->counter) |
271 | : "memory"); | 271 | : "memory"); |
272 | } else if (cpu_has_llsc) { | 272 | } else if (cpu_has_llsc) { |
273 | unsigned long temp; | 273 | int temp; |
274 | 274 | ||
275 | __asm__ __volatile__( | 275 | __asm__ __volatile__( |
276 | " .set mips3 \n" | 276 | " .set mips3 \n" |
@@ -429,7 +429,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) | |||
429 | static __inline__ void atomic64_add(long i, atomic64_t * v) | 429 | static __inline__ void atomic64_add(long i, atomic64_t * v) |
430 | { | 430 | { |
431 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 431 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
432 | unsigned long temp; | 432 | long temp; |
433 | 433 | ||
434 | __asm__ __volatile__( | 434 | __asm__ __volatile__( |
435 | " .set mips3 \n" | 435 | " .set mips3 \n" |
@@ -441,7 +441,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
441 | : "=&r" (temp), "=m" (v->counter) | 441 | : "=&r" (temp), "=m" (v->counter) |
442 | : "Ir" (i), "m" (v->counter)); | 442 | : "Ir" (i), "m" (v->counter)); |
443 | } else if (cpu_has_llsc) { | 443 | } else if (cpu_has_llsc) { |
444 | unsigned long temp; | 444 | long temp; |
445 | 445 | ||
446 | __asm__ __volatile__( | 446 | __asm__ __volatile__( |
447 | " .set mips3 \n" | 447 | " .set mips3 \n" |
@@ -474,7 +474,7 @@ static __inline__ void atomic64_add(long i, atomic64_t * v) | |||
474 | static __inline__ void atomic64_sub(long i, atomic64_t * v) | 474 | static __inline__ void atomic64_sub(long i, atomic64_t * v) |
475 | { | 475 | { |
476 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 476 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
477 | unsigned long temp; | 477 | long temp; |
478 | 478 | ||
479 | __asm__ __volatile__( | 479 | __asm__ __volatile__( |
480 | " .set mips3 \n" | 480 | " .set mips3 \n" |
@@ -486,7 +486,7 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
486 | : "=&r" (temp), "=m" (v->counter) | 486 | : "=&r" (temp), "=m" (v->counter) |
487 | : "Ir" (i), "m" (v->counter)); | 487 | : "Ir" (i), "m" (v->counter)); |
488 | } else if (cpu_has_llsc) { | 488 | } else if (cpu_has_llsc) { |
489 | unsigned long temp; | 489 | long temp; |
490 | 490 | ||
491 | __asm__ __volatile__( | 491 | __asm__ __volatile__( |
492 | " .set mips3 \n" | 492 | " .set mips3 \n" |
@@ -514,12 +514,12 @@ static __inline__ void atomic64_sub(long i, atomic64_t * v) | |||
514 | */ | 514 | */ |
515 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) | 515 | static __inline__ long atomic64_add_return(long i, atomic64_t * v) |
516 | { | 516 | { |
517 | unsigned long result; | 517 | long result; |
518 | 518 | ||
519 | smp_llsc_mb(); | 519 | smp_llsc_mb(); |
520 | 520 | ||
521 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 521 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
522 | unsigned long temp; | 522 | long temp; |
523 | 523 | ||
524 | __asm__ __volatile__( | 524 | __asm__ __volatile__( |
525 | " .set mips3 \n" | 525 | " .set mips3 \n" |
@@ -533,7 +533,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
533 | : "Ir" (i), "m" (v->counter) | 533 | : "Ir" (i), "m" (v->counter) |
534 | : "memory"); | 534 | : "memory"); |
535 | } else if (cpu_has_llsc) { | 535 | } else if (cpu_has_llsc) { |
536 | unsigned long temp; | 536 | long temp; |
537 | 537 | ||
538 | __asm__ __volatile__( | 538 | __asm__ __volatile__( |
539 | " .set mips3 \n" | 539 | " .set mips3 \n" |
@@ -566,12 +566,12 @@ static __inline__ long atomic64_add_return(long i, atomic64_t * v) | |||
566 | 566 | ||
567 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | 567 | static __inline__ long atomic64_sub_return(long i, atomic64_t * v) |
568 | { | 568 | { |
569 | unsigned long result; | 569 | long result; |
570 | 570 | ||
571 | smp_llsc_mb(); | 571 | smp_llsc_mb(); |
572 | 572 | ||
573 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 573 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
574 | unsigned long temp; | 574 | long temp; |
575 | 575 | ||
576 | __asm__ __volatile__( | 576 | __asm__ __volatile__( |
577 | " .set mips3 \n" | 577 | " .set mips3 \n" |
@@ -585,7 +585,7 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
585 | : "Ir" (i), "m" (v->counter) | 585 | : "Ir" (i), "m" (v->counter) |
586 | : "memory"); | 586 | : "memory"); |
587 | } else if (cpu_has_llsc) { | 587 | } else if (cpu_has_llsc) { |
588 | unsigned long temp; | 588 | long temp; |
589 | 589 | ||
590 | __asm__ __volatile__( | 590 | __asm__ __volatile__( |
591 | " .set mips3 \n" | 591 | " .set mips3 \n" |
@@ -626,12 +626,12 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v) | |||
626 | */ | 626 | */ |
627 | static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | 627 | static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) |
628 | { | 628 | { |
629 | unsigned long result; | 629 | long result; |
630 | 630 | ||
631 | smp_llsc_mb(); | 631 | smp_llsc_mb(); |
632 | 632 | ||
633 | if (cpu_has_llsc && R10000_LLSC_WAR) { | 633 | if (cpu_has_llsc && R10000_LLSC_WAR) { |
634 | unsigned long temp; | 634 | long temp; |
635 | 635 | ||
636 | __asm__ __volatile__( | 636 | __asm__ __volatile__( |
637 | " .set mips3 \n" | 637 | " .set mips3 \n" |
@@ -649,7 +649,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
649 | : "Ir" (i), "m" (v->counter) | 649 | : "Ir" (i), "m" (v->counter) |
650 | : "memory"); | 650 | : "memory"); |
651 | } else if (cpu_has_llsc) { | 651 | } else if (cpu_has_llsc) { |
652 | unsigned long temp; | 652 | long temp; |
653 | 653 | ||
654 | __asm__ __volatile__( | 654 | __asm__ __volatile__( |
655 | " .set mips3 \n" | 655 | " .set mips3 \n" |
diff --git a/arch/mips/include/asm/mach-rc32434/gpio.h b/arch/mips/include/asm/mach-rc32434/gpio.h index b5cf6457305a..3cb50d17b62d 100644 --- a/arch/mips/include/asm/mach-rc32434/gpio.h +++ b/arch/mips/include/asm/mach-rc32434/gpio.h | |||
@@ -80,11 +80,8 @@ struct rb532_gpio_reg { | |||
80 | /* Compact Flash GPIO pin */ | 80 | /* Compact Flash GPIO pin */ |
81 | #define CF_GPIO_NUM 13 | 81 | #define CF_GPIO_NUM 13 |
82 | 82 | ||
83 | extern void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned val); | ||
84 | extern unsigned get_434_reg(unsigned reg_offs); | ||
85 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); | ||
86 | extern unsigned char get_latch_u5(void); | ||
87 | extern void rb532_gpio_set_ilevel(int bit, unsigned gpio); | 83 | extern void rb532_gpio_set_ilevel(int bit, unsigned gpio); |
88 | extern void rb532_gpio_set_istat(int bit, unsigned gpio); | 84 | extern void rb532_gpio_set_istat(int bit, unsigned gpio); |
85 | extern void rb532_gpio_set_func(unsigned gpio); | ||
89 | 86 | ||
90 | #endif /* _RC32434_GPIO_H_ */ | 87 | #endif /* _RC32434_GPIO_H_ */ |
diff --git a/arch/mips/include/asm/mach-rc32434/irq.h b/arch/mips/include/asm/mach-rc32434/irq.h index 56738d8ec4e2..023a5b100ed0 100644 --- a/arch/mips/include/asm/mach-rc32434/irq.h +++ b/arch/mips/include/asm/mach-rc32434/irq.h | |||
@@ -30,4 +30,7 @@ | |||
30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) | 30 | #define ETH0_RX_OVR_IRQ (GROUP3_IRQ_BASE + 9) |
31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) | 31 | #define ETH0_TX_UND_IRQ (GROUP3_IRQ_BASE + 10) |
32 | 32 | ||
33 | #define GPIO_MAPPED_IRQ_BASE GROUP4_IRQ_BASE | ||
34 | #define GPIO_MAPPED_IRQ_GROUP 4 | ||
35 | |||
33 | #endif /* __ASM_RC32434_IRQ_H */ | 36 | #endif /* __ASM_RC32434_IRQ_H */ |
diff --git a/arch/mips/include/asm/mach-rc32434/rb.h b/arch/mips/include/asm/mach-rc32434/rb.h index f25a84916703..6dc5f8df1f3e 100644 --- a/arch/mips/include/asm/mach-rc32434/rb.h +++ b/arch/mips/include/asm/mach-rc32434/rb.h | |||
@@ -83,4 +83,7 @@ struct mpmc_device { | |||
83 | void __iomem *base; | 83 | void __iomem *base; |
84 | }; | 84 | }; |
85 | 85 | ||
86 | extern void set_latch_u5(unsigned char or_mask, unsigned char nand_mask); | ||
87 | extern unsigned char get_latch_u5(void); | ||
88 | |||
86 | #endif /* __ASM_RC32434_RB_H */ | 89 | #endif /* __ASM_RC32434_RB_H */ |
diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h index 1f30d16d4669..ce47118e52b7 100644 --- a/arch/mips/include/asm/ptrace.h +++ b/arch/mips/include/asm/ptrace.h | |||
@@ -105,7 +105,7 @@ struct pt_watch_regs { | |||
105 | enum pt_watch_style style; | 105 | enum pt_watch_style style; |
106 | union { | 106 | union { |
107 | struct mips32_watch_regs mips32; | 107 | struct mips32_watch_regs mips32; |
108 | struct mips32_watch_regs mips64; | 108 | struct mips64_watch_regs mips64; |
109 | }; | 109 | }; |
110 | }; | 110 | }; |
111 | 111 | ||
diff --git a/arch/mips/include/asm/termios.h b/arch/mips/include/asm/termios.h index a275661fa7e1..8f77f774a2a0 100644 --- a/arch/mips/include/asm/termios.h +++ b/arch/mips/include/asm/termios.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef _ASM_TERMIOS_H | 9 | #ifndef _ASM_TERMIOS_H |
10 | #define _ASM_TERMIOS_H | 10 | #define _ASM_TERMIOS_H |
11 | 11 | ||
12 | #include <linux/errno.h> | ||
12 | #include <asm/termbits.h> | 13 | #include <asm/termbits.h> |
13 | #include <asm/ioctls.h> | 14 | #include <asm/ioctls.h> |
14 | 15 | ||
@@ -94,38 +95,81 @@ struct termio { | |||
94 | /* | 95 | /* |
95 | * Translate a "termio" structure into a "termios". Ugh. | 96 | * Translate a "termio" structure into a "termios". Ugh. |
96 | */ | 97 | */ |
97 | #define user_termio_to_kernel_termios(termios, termio) \ | 98 | static inline int user_termio_to_kernel_termios(struct ktermios *termios, |
98 | ({ \ | 99 | struct termio __user *termio) |
99 | unsigned short tmp; \ | 100 | { |
100 | get_user(tmp, &(termio)->c_iflag); \ | 101 | unsigned short iflag, oflag, cflag, lflag; |
101 | (termios)->c_iflag = (0xffff0000 & ((termios)->c_iflag)) | tmp; \ | 102 | unsigned int err; |
102 | get_user(tmp, &(termio)->c_oflag); \ | 103 | |
103 | (termios)->c_oflag = (0xffff0000 & ((termios)->c_oflag)) | tmp; \ | 104 | if (!access_ok(VERIFY_READ, termio, sizeof(struct termio))) |
104 | get_user(tmp, &(termio)->c_cflag); \ | 105 | return -EFAULT; |
105 | (termios)->c_cflag = (0xffff0000 & ((termios)->c_cflag)) | tmp; \ | 106 | |
106 | get_user(tmp, &(termio)->c_lflag); \ | 107 | err = __get_user(iflag, &termio->c_iflag); |
107 | (termios)->c_lflag = (0xffff0000 & ((termios)->c_lflag)) | tmp; \ | 108 | termios->c_iflag = (termios->c_iflag & 0xffff0000) | iflag; |
108 | get_user((termios)->c_line, &(termio)->c_line); \ | 109 | err |=__get_user(oflag, &termio->c_oflag); |
109 | copy_from_user((termios)->c_cc, (termio)->c_cc, NCC); \ | 110 | termios->c_oflag = (termios->c_oflag & 0xffff0000) | oflag; |
110 | }) | 111 | err |=__get_user(cflag, &termio->c_cflag); |
112 | termios->c_cflag = (termios->c_cflag & 0xffff0000) | cflag; | ||
113 | err |=__get_user(lflag, &termio->c_lflag); | ||
114 | termios->c_lflag = (termios->c_lflag & 0xffff0000) | lflag; | ||
115 | err |=__get_user(termios->c_line, &termio->c_line); | ||
116 | if (err) | ||
117 | return -EFAULT; | ||
118 | |||
119 | if (__copy_from_user(termios->c_cc, termio->c_cc, NCC)) | ||
120 | return -EFAULT; | ||
121 | |||
122 | return 0; | ||
123 | } | ||
111 | 124 | ||
112 | /* | 125 | /* |
113 | * Translate a "termios" structure into a "termio". Ugh. | 126 | * Translate a "termios" structure into a "termio". Ugh. |
114 | */ | 127 | */ |
115 | #define kernel_termios_to_user_termio(termio, termios) \ | 128 | static inline int kernel_termios_to_user_termio(struct termio __user *termio, |
116 | ({ \ | 129 | struct ktermios *termios) |
117 | put_user((termios)->c_iflag, &(termio)->c_iflag); \ | 130 | { |
118 | put_user((termios)->c_oflag, &(termio)->c_oflag); \ | 131 | int err; |
119 | put_user((termios)->c_cflag, &(termio)->c_cflag); \ | 132 | |
120 | put_user((termios)->c_lflag, &(termio)->c_lflag); \ | 133 | if (!access_ok(VERIFY_WRITE, termio, sizeof(struct termio))) |
121 | put_user((termios)->c_line, &(termio)->c_line); \ | 134 | return -EFAULT; |
122 | copy_to_user((termio)->c_cc, (termios)->c_cc, NCC); \ | 135 | |
123 | }) | 136 | err = __put_user(termios->c_iflag, &termio->c_iflag); |
124 | 137 | err |= __put_user(termios->c_oflag, &termio->c_oflag); | |
125 | #define user_termios_to_kernel_termios(k, u) copy_from_user(k, u, sizeof(struct termios2)) | 138 | err |= __put_user(termios->c_cflag, &termio->c_cflag); |
126 | #define kernel_termios_to_user_termios(u, k) copy_to_user(u, k, sizeof(struct termios2)) | 139 | err |= __put_user(termios->c_lflag, &termio->c_lflag); |
127 | #define user_termios_to_kernel_termios_1(k, u) copy_from_user(k, u, sizeof(struct termios)) | 140 | err |= __put_user(termios->c_line, &termio->c_line); |
128 | #define kernel_termios_to_user_termios_1(u, k) copy_to_user(u, k, sizeof(struct termios)) | 141 | if (err) |
142 | return -EFAULT; | ||
143 | |||
144 | if (__copy_to_user(termio->c_cc, termios->c_cc, NCC)) | ||
145 | return -EFAULT; | ||
146 | |||
147 | return 0; | ||
148 | } | ||
149 | |||
150 | static inline int user_termios_to_kernel_termios(struct ktermios __user *k, | ||
151 | struct termios2 *u) | ||
152 | { | ||
153 | return copy_from_user(k, u, sizeof(struct termios2)) ? -EFAULT : 0; | ||
154 | } | ||
155 | |||
156 | static inline int kernel_termios_to_user_termios(struct termios2 __user *u, | ||
157 | struct ktermios *k) | ||
158 | { | ||
159 | return copy_to_user(u, k, sizeof(struct termios2)) ? -EFAULT : 0; | ||
160 | } | ||
161 | |||
162 | static inline int user_termios_to_kernel_termios_1(struct ktermios *k, | ||
163 | struct termios __user *u) | ||
164 | { | ||
165 | return copy_from_user(k, u, sizeof(struct termios)) ? -EFAULT : 0; | ||
166 | } | ||
167 | |||
168 | static inline int kernel_termios_to_user_termios_1(struct termios __user *u, | ||
169 | struct ktermios *k) | ||
170 | { | ||
171 | return copy_to_user(u, k, sizeof(struct termios)) ? -EFAULT : 0; | ||
172 | } | ||
129 | 173 | ||
130 | #endif /* defined(__KERNEL__) */ | 174 | #endif /* defined(__KERNEL__) */ |
131 | 175 | ||
diff --git a/arch/mips/include/asm/txx9/tx4939.h b/arch/mips/include/asm/txx9/tx4939.h index 88badb423010..964ef7ede268 100644 --- a/arch/mips/include/asm/txx9/tx4939.h +++ b/arch/mips/include/asm/txx9/tx4939.h | |||
@@ -541,5 +541,6 @@ void tx4939_irq_init(void); | |||
541 | int tx4939_irq(void); | 541 | int tx4939_irq(void); |
542 | void tx4939_mtd_init(int ch); | 542 | void tx4939_mtd_init(int ch); |
543 | void tx4939_ata_init(void); | 543 | void tx4939_ata_init(void); |
544 | void tx4939_rtc_init(void); | ||
544 | 545 | ||
545 | #endif /* __ASM_TXX9_TX4939_H */ | 546 | #endif /* __ASM_TXX9_TX4939_H */ |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index fb6f73148df2..8882e5766f27 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -458,7 +458,11 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
458 | BUILD_HANDLER fpe fpe fpe silent /* #15 */ | 458 | BUILD_HANDLER fpe fpe fpe silent /* #15 */ |
459 | BUILD_HANDLER mdmx mdmx sti silent /* #22 */ | 459 | BUILD_HANDLER mdmx mdmx sti silent /* #22 */ |
460 | #ifdef CONFIG_HARDWARE_WATCHPOINTS | 460 | #ifdef CONFIG_HARDWARE_WATCHPOINTS |
461 | BUILD_HANDLER watch watch sti silent /* #23 */ | 461 | /* |
462 | * For watch, interrupts will be enabled after the watch | ||
463 | * registers are read. | ||
464 | */ | ||
465 | BUILD_HANDLER watch watch cli silent /* #23 */ | ||
462 | #else | 466 | #else |
463 | BUILD_HANDLER watch watch sti verbose /* #23 */ | 467 | BUILD_HANDLER watch watch sti verbose /* #23 */ |
464 | #endif | 468 | #endif |
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index 5e77a3a21f98..42461310b185 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -79,7 +79,8 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
79 | 79 | ||
80 | euid = current_euid(); | 80 | euid = current_euid(); |
81 | retval = -EPERM; | 81 | retval = -EPERM; |
82 | if (euid != p->euid && euid != p->uid && !capable(CAP_SYS_NICE)) { | 82 | if (euid != p->cred->euid && euid != p->cred->uid && |
83 | !capable(CAP_SYS_NICE)) { | ||
83 | read_unlock(&tasklist_lock); | 84 | read_unlock(&tasklist_lock); |
84 | goto out_unlock; | 85 | goto out_unlock; |
85 | } | 86 | } |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index f6083c6bfaa4..b2d7041341b8 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -944,6 +944,9 @@ asmlinkage void do_mdmx(struct pt_regs *regs) | |||
944 | force_sig(SIGILL, current); | 944 | force_sig(SIGILL, current); |
945 | } | 945 | } |
946 | 946 | ||
947 | /* | ||
948 | * Called with interrupts disabled. | ||
949 | */ | ||
947 | asmlinkage void do_watch(struct pt_regs *regs) | 950 | asmlinkage void do_watch(struct pt_regs *regs) |
948 | { | 951 | { |
949 | u32 cause; | 952 | u32 cause; |
@@ -963,9 +966,12 @@ asmlinkage void do_watch(struct pt_regs *regs) | |||
963 | */ | 966 | */ |
964 | if (test_tsk_thread_flag(current, TIF_LOAD_WATCH)) { | 967 | if (test_tsk_thread_flag(current, TIF_LOAD_WATCH)) { |
965 | mips_read_watch_registers(); | 968 | mips_read_watch_registers(); |
969 | local_irq_enable(); | ||
966 | force_sig(SIGTRAP, current); | 970 | force_sig(SIGTRAP, current); |
967 | } else | 971 | } else { |
968 | mips_clear_watch_registers(); | 972 | mips_clear_watch_registers(); |
973 | local_irq_enable(); | ||
974 | } | ||
969 | } | 975 | } |
970 | 976 | ||
971 | asmlinkage void do_mcheck(struct pt_regs *regs) | 977 | asmlinkage void do_mcheck(struct pt_regs *regs) |
@@ -1582,7 +1588,11 @@ void __init set_handler(unsigned long offset, void *addr, unsigned long size) | |||
1582 | static char panic_null_cerr[] __cpuinitdata = | 1588 | static char panic_null_cerr[] __cpuinitdata = |
1583 | "Trying to set NULL cache error exception handler"; | 1589 | "Trying to set NULL cache error exception handler"; |
1584 | 1590 | ||
1585 | /* Install uncached CPU exception handler */ | 1591 | /* |
1592 | * Install uncached CPU exception handler. | ||
1593 | * This is suitable only for the cache error exception which is the only | ||
1594 | * exception handler that is being run uncached. | ||
1595 | */ | ||
1586 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, | 1596 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, |
1587 | unsigned long size) | 1597 | unsigned long size) |
1588 | { | 1598 | { |
@@ -1593,7 +1603,7 @@ void __cpuinit set_uncached_handler(unsigned long offset, void *addr, | |||
1593 | unsigned long uncached_ebase = TO_UNCAC(ebase); | 1603 | unsigned long uncached_ebase = TO_UNCAC(ebase); |
1594 | #endif | 1604 | #endif |
1595 | if (cpu_has_mips_r2) | 1605 | if (cpu_has_mips_r2) |
1596 | ebase += (read_c0_ebase() & 0x3ffff000); | 1606 | uncached_ebase += (read_c0_ebase() & 0x3ffff000); |
1597 | 1607 | ||
1598 | if (!addr) | 1608 | if (!addr) |
1599 | panic(panic_null_cerr); | 1609 | panic(panic_null_cerr); |
diff --git a/arch/mips/lib/memcpy-inatomic.S b/arch/mips/lib/memcpy-inatomic.S index 736d0fb56a94..68853a038d3f 100644 --- a/arch/mips/lib/memcpy-inatomic.S +++ b/arch/mips/lib/memcpy-inatomic.S | |||
@@ -21,7 +21,7 @@ | |||
21 | * end of memory on some systems. It's also a seriously bad idea on non | 21 | * end of memory on some systems. It's also a seriously bad idea on non |
22 | * dma-coherent systems. | 22 | * dma-coherent systems. |
23 | */ | 23 | */ |
24 | #if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27) | 24 | #ifdef CONFIG_DMA_NONCOHERENT |
25 | #undef CONFIG_CPU_HAS_PREFETCH | 25 | #undef CONFIG_CPU_HAS_PREFETCH |
26 | #endif | 26 | #endif |
27 | #ifdef CONFIG_MIPS_MALTA | 27 | #ifdef CONFIG_MIPS_MALTA |
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index c06cccf60bec..56a1f85a1ce8 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S | |||
@@ -21,7 +21,7 @@ | |||
21 | * end of memory on some systems. It's also a seriously bad idea on non | 21 | * end of memory on some systems. It's also a seriously bad idea on non |
22 | * dma-coherent systems. | 22 | * dma-coherent systems. |
23 | */ | 23 | */ |
24 | #if !defined(CONFIG_DMA_COHERENT) || !defined(CONFIG_DMA_IP27) | 24 | #ifdef CONFIG_DMA_NONCOHERENT |
25 | #undef CONFIG_CPU_HAS_PREFETCH | 25 | #undef CONFIG_CPU_HAS_PREFETCH |
26 | #endif | 26 | #endif |
27 | #ifdef CONFIG_MIPS_MALTA | 27 | #ifdef CONFIG_MIPS_MALTA |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 6e99665ae860..c43f4b26a690 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -618,15 +618,35 @@ static void r4k_dma_cache_inv(unsigned long addr, unsigned long size) | |||
618 | if (cpu_has_inclusive_pcaches) { | 618 | if (cpu_has_inclusive_pcaches) { |
619 | if (size >= scache_size) | 619 | if (size >= scache_size) |
620 | r4k_blast_scache(); | 620 | r4k_blast_scache(); |
621 | else | 621 | else { |
622 | unsigned long lsize = cpu_scache_line_size(); | ||
623 | unsigned long almask = ~(lsize - 1); | ||
624 | |||
625 | /* | ||
626 | * There is no clearly documented alignment requirement | ||
627 | * for the cache instruction on MIPS processors and | ||
628 | * some processors, among them the RM5200 and RM7000 | ||
629 | * QED processors will throw an address error for cache | ||
630 | * hit ops with insufficient alignment. Solved by | ||
631 | * aligning the address to cache line size. | ||
632 | */ | ||
633 | cache_op(Hit_Writeback_Inv_SD, addr & almask); | ||
634 | cache_op(Hit_Writeback_Inv_SD, | ||
635 | (addr + size - 1) & almask); | ||
622 | blast_inv_scache_range(addr, addr + size); | 636 | blast_inv_scache_range(addr, addr + size); |
637 | } | ||
623 | return; | 638 | return; |
624 | } | 639 | } |
625 | 640 | ||
626 | if (cpu_has_safe_index_cacheops && size >= dcache_size) { | 641 | if (cpu_has_safe_index_cacheops && size >= dcache_size) { |
627 | r4k_blast_dcache(); | 642 | r4k_blast_dcache(); |
628 | } else { | 643 | } else { |
644 | unsigned long lsize = cpu_dcache_line_size(); | ||
645 | unsigned long almask = ~(lsize - 1); | ||
646 | |||
629 | R4600_HIT_CACHEOP_WAR_IMPL; | 647 | R4600_HIT_CACHEOP_WAR_IMPL; |
648 | cache_op(Hit_Writeback_Inv_D, addr & almask); | ||
649 | cache_op(Hit_Writeback_Inv_D, (addr + size - 1) & almask); | ||
630 | blast_inv_dcache_range(addr, addr + size); | 650 | blast_inv_dcache_range(addr, addr + size); |
631 | } | 651 | } |
632 | 652 | ||
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c index fa636fc6b7b9..55767ad9f00e 100644 --- a/arch/mips/mm/fault.c +++ b/arch/mips/mm/fault.c | |||
@@ -97,7 +97,6 @@ good_area: | |||
97 | goto bad_area; | 97 | goto bad_area; |
98 | } | 98 | } |
99 | 99 | ||
100 | survive: | ||
101 | /* | 100 | /* |
102 | * If for any reason at all we couldn't handle the fault, | 101 | * If for any reason at all we couldn't handle the fault, |
103 | * make sure we exit gracefully rather than endlessly redo | 102 | * make sure we exit gracefully rather than endlessly redo |
@@ -167,21 +166,13 @@ no_context: | |||
167 | field, regs->regs[31]); | 166 | field, regs->regs[31]); |
168 | die("Oops", regs); | 167 | die("Oops", regs); |
169 | 168 | ||
170 | /* | ||
171 | * We ran out of memory, or some other thing happened to us that made | ||
172 | * us unable to handle the page fault gracefully. | ||
173 | */ | ||
174 | out_of_memory: | 169 | out_of_memory: |
175 | up_read(&mm->mmap_sem); | 170 | /* |
176 | if (is_global_init(tsk)) { | 171 | * We ran out of memory, call the OOM killer, and return the userspace |
177 | yield(); | 172 | * (which will retry the fault, or kill us if we got oom-killed). |
178 | down_read(&mm->mmap_sem); | 173 | */ |
179 | goto survive; | 174 | pagefault_out_of_memory(); |
180 | } | 175 | return; |
181 | printk("VM: killing process %s\n", tsk->comm); | ||
182 | if (user_mode(regs)) | ||
183 | do_group_exit(SIGKILL); | ||
184 | goto no_context; | ||
185 | 176 | ||
186 | do_sigbus: | 177 | do_sigbus: |
187 | up_read(&mm->mmap_sem); | 178 | up_read(&mm->mmap_sem); |
diff --git a/arch/mips/pci/pci-rc32434.c b/arch/mips/pci/pci-rc32434.c index 1c2821e2f494..71f7d27b0d4c 100644 --- a/arch/mips/pci/pci-rc32434.c +++ b/arch/mips/pci/pci-rc32434.c | |||
@@ -205,6 +205,8 @@ static int __init rc32434_pcibridge_init(void) | |||
205 | 205 | ||
206 | static int __init rc32434_pci_init(void) | 206 | static int __init rc32434_pci_init(void) |
207 | { | 207 | { |
208 | void __iomem *io_map_base; | ||
209 | |||
208 | pr_info("PCI: Initializing PCI\n"); | 210 | pr_info("PCI: Initializing PCI\n"); |
209 | 211 | ||
210 | ioport_resource.start = rc32434_res_pci_io1.start; | 212 | ioport_resource.start = rc32434_res_pci_io1.start; |
@@ -212,6 +214,15 @@ static int __init rc32434_pci_init(void) | |||
212 | 214 | ||
213 | rc32434_pcibridge_init(); | 215 | rc32434_pcibridge_init(); |
214 | 216 | ||
217 | io_map_base = ioremap(rc32434_res_pci_io1.start, | ||
218 | rc32434_res_pci_io1.end - rc32434_res_pci_io1.start + 1); | ||
219 | |||
220 | if (!io_map_base) | ||
221 | return -ENOMEM; | ||
222 | |||
223 | rc32434_controller.io_map_base = | ||
224 | (unsigned long)io_map_base - rc32434_res_pci_io1.start; | ||
225 | |||
215 | register_pci_controller(&rc32434_controller); | 226 | register_pci_controller(&rc32434_controller); |
216 | rc32434_sync(); | 227 | rc32434_sync(); |
217 | 228 | ||
diff --git a/arch/mips/rb532/devices.c b/arch/mips/rb532/devices.c index c1c29181bd46..4a5f05b662ae 100644 --- a/arch/mips/rb532/devices.c +++ b/arch/mips/rb532/devices.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/mtd/partitions.h> | 24 | #include <linux/mtd/partitions.h> |
25 | #include <linux/gpio_keys.h> | 25 | #include <linux/gpio_keys.h> |
26 | #include <linux/input.h> | 26 | #include <linux/input.h> |
27 | #include <linux/serial_8250.h> | ||
27 | 28 | ||
28 | #include <asm/bootinfo.h> | 29 | #include <asm/bootinfo.h> |
29 | 30 | ||
@@ -39,6 +40,29 @@ | |||
39 | #define ETH0_RX_DMA_ADDR (DMA0_BASE_ADDR + 0 * DMA_CHAN_OFFSET) | 40 | #define ETH0_RX_DMA_ADDR (DMA0_BASE_ADDR + 0 * DMA_CHAN_OFFSET) |
40 | #define ETH0_TX_DMA_ADDR (DMA0_BASE_ADDR + 1 * DMA_CHAN_OFFSET) | 41 | #define ETH0_TX_DMA_ADDR (DMA0_BASE_ADDR + 1 * DMA_CHAN_OFFSET) |
41 | 42 | ||
43 | extern unsigned int idt_cpu_freq; | ||
44 | |||
45 | static struct mpmc_device dev3; | ||
46 | |||
47 | void set_latch_u5(unsigned char or_mask, unsigned char nand_mask) | ||
48 | { | ||
49 | unsigned long flags; | ||
50 | |||
51 | spin_lock_irqsave(&dev3.lock, flags); | ||
52 | |||
53 | dev3.state = (dev3.state | or_mask) & ~nand_mask; | ||
54 | writeb(dev3.state, dev3.base); | ||
55 | |||
56 | spin_unlock_irqrestore(&dev3.lock, flags); | ||
57 | } | ||
58 | EXPORT_SYMBOL(set_latch_u5); | ||
59 | |||
60 | unsigned char get_latch_u5(void) | ||
61 | { | ||
62 | return dev3.state; | ||
63 | } | ||
64 | EXPORT_SYMBOL(get_latch_u5); | ||
65 | |||
42 | static struct resource korina_dev0_res[] = { | 66 | static struct resource korina_dev0_res[] = { |
43 | { | 67 | { |
44 | .name = "korina_regs", | 68 | .name = "korina_regs", |
@@ -86,7 +110,7 @@ static struct korina_device korina_dev0_data = { | |||
86 | static struct platform_device korina_dev0 = { | 110 | static struct platform_device korina_dev0 = { |
87 | .id = -1, | 111 | .id = -1, |
88 | .name = "korina", | 112 | .name = "korina", |
89 | .dev.platform_data = &korina_dev0_data, | 113 | .dev.driver_data = &korina_dev0_data, |
90 | .resource = korina_dev0_res, | 114 | .resource = korina_dev0_res, |
91 | .num_resources = ARRAY_SIZE(korina_dev0_res), | 115 | .num_resources = ARRAY_SIZE(korina_dev0_res), |
92 | }; | 116 | }; |
@@ -214,12 +238,32 @@ static struct platform_device rb532_wdt = { | |||
214 | .num_resources = ARRAY_SIZE(rb532_wdt_res), | 238 | .num_resources = ARRAY_SIZE(rb532_wdt_res), |
215 | }; | 239 | }; |
216 | 240 | ||
241 | static struct plat_serial8250_port rb532_uart_res[] = { | ||
242 | { | ||
243 | .membase = (char *)KSEG1ADDR(REGBASE + UART0BASE), | ||
244 | .irq = UART0_IRQ, | ||
245 | .regshift = 2, | ||
246 | .iotype = UPIO_MEM, | ||
247 | .flags = UPF_BOOT_AUTOCONF, | ||
248 | }, | ||
249 | { | ||
250 | .flags = 0, | ||
251 | } | ||
252 | }; | ||
253 | |||
254 | static struct platform_device rb532_uart = { | ||
255 | .name = "serial8250", | ||
256 | .id = PLAT8250_DEV_PLATFORM, | ||
257 | .dev.platform_data = &rb532_uart_res, | ||
258 | }; | ||
259 | |||
217 | static struct platform_device *rb532_devs[] = { | 260 | static struct platform_device *rb532_devs[] = { |
218 | &korina_dev0, | 261 | &korina_dev0, |
219 | &nand_slot0, | 262 | &nand_slot0, |
220 | &cf_slot0, | 263 | &cf_slot0, |
221 | &rb532_led, | 264 | &rb532_led, |
222 | &rb532_button, | 265 | &rb532_button, |
266 | &rb532_uart, | ||
223 | &rb532_wdt | 267 | &rb532_wdt |
224 | }; | 268 | }; |
225 | 269 | ||
@@ -291,9 +335,20 @@ static int __init plat_setup_devices(void) | |||
291 | nand_slot0_res[0].start = readl(IDT434_REG_BASE + DEV2BASE); | 335 | nand_slot0_res[0].start = readl(IDT434_REG_BASE + DEV2BASE); |
292 | nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; | 336 | nand_slot0_res[0].end = nand_slot0_res[0].start + 0x1000; |
293 | 337 | ||
338 | /* Read and map device controller 3 */ | ||
339 | dev3.base = ioremap_nocache(readl(IDT434_REG_BASE + DEV3BASE), 1); | ||
340 | |||
341 | if (!dev3.base) { | ||
342 | printk(KERN_ERR "rb532: cannot remap device controller 3\n"); | ||
343 | return -ENXIO; | ||
344 | } | ||
345 | |||
294 | /* Initialise the NAND device */ | 346 | /* Initialise the NAND device */ |
295 | rb532_nand_setup(); | 347 | rb532_nand_setup(); |
296 | 348 | ||
349 | /* set the uart clock to the current cpu frequency */ | ||
350 | rb532_uart_res[0].uartclk = idt_cpu_freq; | ||
351 | |||
297 | return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); | 352 | return platform_add_devices(rb532_devs, ARRAY_SIZE(rb532_devs)); |
298 | } | 353 | } |
299 | 354 | ||
diff --git a/arch/mips/rb532/gpio.c b/arch/mips/rb532/gpio.c index 0e84c8ab6a39..37de05d595e7 100644 --- a/arch/mips/rb532/gpio.c +++ b/arch/mips/rb532/gpio.c | |||
@@ -41,8 +41,6 @@ struct rb532_gpio_chip { | |||
41 | void __iomem *regbase; | 41 | void __iomem *regbase; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | struct mpmc_device dev3; | ||
45 | |||
46 | static struct resource rb532_gpio_reg0_res[] = { | 44 | static struct resource rb532_gpio_reg0_res[] = { |
47 | { | 45 | { |
48 | .name = "gpio_reg0", | 46 | .name = "gpio_reg0", |
@@ -52,61 +50,6 @@ static struct resource rb532_gpio_reg0_res[] = { | |||
52 | } | 50 | } |
53 | }; | 51 | }; |
54 | 52 | ||
55 | static struct resource rb532_dev3_ctl_res[] = { | ||
56 | { | ||
57 | .name = "dev3_ctl", | ||
58 | .start = REGBASE + DEV3BASE, | ||
59 | .end = REGBASE + DEV3BASE + sizeof(struct dev_reg) - 1, | ||
60 | .flags = IORESOURCE_MEM, | ||
61 | } | ||
62 | }; | ||
63 | |||
64 | void set_434_reg(unsigned reg_offs, unsigned bit, unsigned len, unsigned val) | ||
65 | { | ||
66 | unsigned long flags; | ||
67 | unsigned data; | ||
68 | unsigned i = 0; | ||
69 | |||
70 | spin_lock_irqsave(&dev3.lock, flags); | ||
71 | |||
72 | data = readl(IDT434_REG_BASE + reg_offs); | ||
73 | for (i = 0; i != len; ++i) { | ||
74 | if (val & (1 << i)) | ||
75 | data |= (1 << (i + bit)); | ||
76 | else | ||
77 | data &= ~(1 << (i + bit)); | ||
78 | } | ||
79 | writel(data, (IDT434_REG_BASE + reg_offs)); | ||
80 | |||
81 | spin_unlock_irqrestore(&dev3.lock, flags); | ||
82 | } | ||
83 | EXPORT_SYMBOL(set_434_reg); | ||
84 | |||
85 | unsigned get_434_reg(unsigned reg_offs) | ||
86 | { | ||
87 | return readl(IDT434_REG_BASE + reg_offs); | ||
88 | } | ||
89 | EXPORT_SYMBOL(get_434_reg); | ||
90 | |||
91 | void set_latch_u5(unsigned char or_mask, unsigned char nand_mask) | ||
92 | { | ||
93 | unsigned long flags; | ||
94 | |||
95 | spin_lock_irqsave(&dev3.lock, flags); | ||
96 | |||
97 | dev3.state = (dev3.state | or_mask) & ~nand_mask; | ||
98 | writel(dev3.state, &dev3.base); | ||
99 | |||
100 | spin_unlock_irqrestore(&dev3.lock, flags); | ||
101 | } | ||
102 | EXPORT_SYMBOL(set_latch_u5); | ||
103 | |||
104 | unsigned char get_latch_u5(void) | ||
105 | { | ||
106 | return dev3.state; | ||
107 | } | ||
108 | EXPORT_SYMBOL(get_latch_u5); | ||
109 | |||
110 | /* rb532_set_bit - sanely set a bit | 53 | /* rb532_set_bit - sanely set a bit |
111 | * | 54 | * |
112 | * bitval: new value for the bit | 55 | * bitval: new value for the bit |
@@ -119,13 +62,11 @@ static inline void rb532_set_bit(unsigned bitval, | |||
119 | unsigned long flags; | 62 | unsigned long flags; |
120 | u32 val; | 63 | u32 val; |
121 | 64 | ||
122 | bitval = !!bitval; /* map parameter to {0,1} */ | ||
123 | |||
124 | local_irq_save(flags); | 65 | local_irq_save(flags); |
125 | 66 | ||
126 | val = readl(ioaddr); | 67 | val = readl(ioaddr); |
127 | val &= ~( ~bitval << offset ); /* unset bit if bitval == 0 */ | 68 | val &= ~(!bitval << offset); /* unset bit if bitval == 0 */ |
128 | val |= ( bitval << offset ); /* set bit if bitval == 1 */ | 69 | val |= (!!bitval << offset); /* set bit if bitval == 1 */ |
129 | writel(val, ioaddr); | 70 | writel(val, ioaddr); |
130 | 71 | ||
131 | local_irq_restore(flags); | 72 | local_irq_restore(flags); |
@@ -171,8 +112,8 @@ static int rb532_gpio_direction_input(struct gpio_chip *chip, unsigned offset) | |||
171 | 112 | ||
172 | gpch = container_of(chip, struct rb532_gpio_chip, chip); | 113 | gpch = container_of(chip, struct rb532_gpio_chip, chip); |
173 | 114 | ||
174 | if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) | 115 | /* disable alternate function in case it's set */ |
175 | return 1; /* alternate function, GPIOCFG is ignored */ | 116 | rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); |
176 | 117 | ||
177 | rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); | 118 | rb532_set_bit(0, offset, gpch->regbase + GPIOCFG); |
178 | return 0; | 119 | return 0; |
@@ -188,8 +129,8 @@ static int rb532_gpio_direction_output(struct gpio_chip *chip, | |||
188 | 129 | ||
189 | gpch = container_of(chip, struct rb532_gpio_chip, chip); | 130 | gpch = container_of(chip, struct rb532_gpio_chip, chip); |
190 | 131 | ||
191 | if (rb532_get_bit(offset, gpch->regbase + GPIOFUNC)) | 132 | /* disable alternate function in case it's set */ |
192 | return 1; /* alternate function, GPIOCFG is ignored */ | 133 | rb532_set_bit(0, offset, gpch->regbase + GPIOFUNC); |
193 | 134 | ||
194 | /* set the initial output value */ | 135 | /* set the initial output value */ |
195 | rb532_set_bit(value, offset, gpch->regbase + GPIOD); | 136 | rb532_set_bit(value, offset, gpch->regbase + GPIOD); |
@@ -233,10 +174,11 @@ EXPORT_SYMBOL(rb532_gpio_set_istat); | |||
233 | /* | 174 | /* |
234 | * Configure GPIO alternate function | 175 | * Configure GPIO alternate function |
235 | */ | 176 | */ |
236 | static void rb532_gpio_set_func(int bit, unsigned gpio) | 177 | void rb532_gpio_set_func(unsigned gpio) |
237 | { | 178 | { |
238 | rb532_set_bit(bit, gpio, rb532_gpio_chip->regbase + GPIOFUNC); | 179 | rb532_set_bit(1, gpio, rb532_gpio_chip->regbase + GPIOFUNC); |
239 | } | 180 | } |
181 | EXPORT_SYMBOL(rb532_gpio_set_func); | ||
240 | 182 | ||
241 | int __init rb532_gpio_init(void) | 183 | int __init rb532_gpio_init(void) |
242 | { | 184 | { |
@@ -253,20 +195,6 @@ int __init rb532_gpio_init(void) | |||
253 | /* Register our GPIO chip */ | 195 | /* Register our GPIO chip */ |
254 | gpiochip_add(&rb532_gpio_chip->chip); | 196 | gpiochip_add(&rb532_gpio_chip->chip); |
255 | 197 | ||
256 | r = rb532_dev3_ctl_res; | ||
257 | dev3.base = ioremap_nocache(r->start, r->end - r->start); | ||
258 | |||
259 | if (!dev3.base) { | ||
260 | printk(KERN_ERR "rb532: cannot remap device controller 3\n"); | ||
261 | return -ENXIO; | ||
262 | } | ||
263 | |||
264 | /* configure CF_GPIO_NUM as CFRDY IRQ source */ | ||
265 | rb532_gpio_set_func(0, CF_GPIO_NUM); | ||
266 | rb532_gpio_direction_input(&rb532_gpio_chip->chip, CF_GPIO_NUM); | ||
267 | rb532_gpio_set_ilevel(1, CF_GPIO_NUM); | ||
268 | rb532_gpio_set_istat(0, CF_GPIO_NUM); | ||
269 | |||
270 | return 0; | 198 | return 0; |
271 | } | 199 | } |
272 | arch_initcall(rb532_gpio_init); | 200 | arch_initcall(rb532_gpio_init); |
diff --git a/arch/mips/rb532/irq.c b/arch/mips/rb532/irq.c index 549b46d2fcee..53eeb5e7bc5b 100644 --- a/arch/mips/rb532/irq.c +++ b/arch/mips/rb532/irq.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #include <asm/system.h> | 46 | #include <asm/system.h> |
47 | 47 | ||
48 | #include <asm/mach-rc32434/irq.h> | 48 | #include <asm/mach-rc32434/irq.h> |
49 | #include <asm/mach-rc32434/gpio.h> | ||
49 | 50 | ||
50 | struct intr_group { | 51 | struct intr_group { |
51 | u32 mask; /* mask of valid bits in pending/mask registers */ | 52 | u32 mask; /* mask of valid bits in pending/mask registers */ |
@@ -150,6 +151,9 @@ static void rb532_disable_irq(unsigned int irq_nr) | |||
150 | mask |= intr_bit; | 151 | mask |= intr_bit; |
151 | WRITE_MASK(addr, mask); | 152 | WRITE_MASK(addr, mask); |
152 | 153 | ||
154 | if (group == GPIO_MAPPED_IRQ_GROUP) | ||
155 | rb532_gpio_set_istat(0, irq_nr - GPIO_MAPPED_IRQ_BASE); | ||
156 | |||
153 | /* | 157 | /* |
154 | * if there are no more interrupts enabled in this | 158 | * if there are no more interrupts enabled in this |
155 | * group, disable corresponding IP | 159 | * group, disable corresponding IP |
@@ -165,12 +169,35 @@ static void rb532_mask_and_ack_irq(unsigned int irq_nr) | |||
165 | ack_local_irq(group_to_ip(irq_to_group(irq_nr))); | 169 | ack_local_irq(group_to_ip(irq_to_group(irq_nr))); |
166 | } | 170 | } |
167 | 171 | ||
172 | static int rb532_set_type(unsigned int irq_nr, unsigned type) | ||
173 | { | ||
174 | int gpio = irq_nr - GPIO_MAPPED_IRQ_BASE; | ||
175 | int group = irq_to_group(irq_nr); | ||
176 | |||
177 | if (group != GPIO_MAPPED_IRQ_GROUP) | ||
178 | return (type == IRQ_TYPE_LEVEL_HIGH) ? 0 : -EINVAL; | ||
179 | |||
180 | switch (type) { | ||
181 | case IRQ_TYPE_LEVEL_HIGH: | ||
182 | rb532_gpio_set_ilevel(1, gpio); | ||
183 | break; | ||
184 | case IRQ_TYPE_LEVEL_LOW: | ||
185 | rb532_gpio_set_ilevel(0, gpio); | ||
186 | break; | ||
187 | default: | ||
188 | return -EINVAL; | ||
189 | } | ||
190 | |||
191 | return 0; | ||
192 | } | ||
193 | |||
168 | static struct irq_chip rc32434_irq_type = { | 194 | static struct irq_chip rc32434_irq_type = { |
169 | .name = "RB532", | 195 | .name = "RB532", |
170 | .ack = rb532_disable_irq, | 196 | .ack = rb532_disable_irq, |
171 | .mask = rb532_disable_irq, | 197 | .mask = rb532_disable_irq, |
172 | .mask_ack = rb532_mask_and_ack_irq, | 198 | .mask_ack = rb532_mask_and_ack_irq, |
173 | .unmask = rb532_enable_irq, | 199 | .unmask = rb532_enable_irq, |
200 | .set_type = rb532_set_type, | ||
174 | }; | 201 | }; |
175 | 202 | ||
176 | void __init arch_init_irq(void) | 203 | void __init arch_init_irq(void) |
diff --git a/arch/mips/rb532/serial.c b/arch/mips/rb532/serial.c index 3e0d7ec3a579..00ed19f0bdb5 100644 --- a/arch/mips/rb532/serial.c +++ b/arch/mips/rb532/serial.c | |||
@@ -36,7 +36,7 @@ | |||
36 | extern unsigned int idt_cpu_freq; | 36 | extern unsigned int idt_cpu_freq; |
37 | 37 | ||
38 | static struct uart_port rb532_uart = { | 38 | static struct uart_port rb532_uart = { |
39 | .type = PORT_16550A, | 39 | .flags = UPF_BOOT_AUTOCONF, |
40 | .line = 0, | 40 | .line = 0, |
41 | .irq = UART0_IRQ, | 41 | .irq = UART0_IRQ, |
42 | .iotype = UPIO_MEM, | 42 | .iotype = UPIO_MEM, |
diff --git a/arch/mips/txx9/generic/setup_tx4939.c b/arch/mips/txx9/generic/setup_tx4939.c index 6c0049a5bbc1..55440967b3a8 100644 --- a/arch/mips/txx9/generic/setup_tx4939.c +++ b/arch/mips/txx9/generic/setup_tx4939.c | |||
@@ -435,6 +435,28 @@ void __init tx4939_ata_init(void) | |||
435 | platform_device_register(&ata1_dev); | 435 | platform_device_register(&ata1_dev); |
436 | } | 436 | } |
437 | 437 | ||
438 | void __init tx4939_rtc_init(void) | ||
439 | { | ||
440 | static struct resource res[] = { | ||
441 | { | ||
442 | .start = TX4939_RTC_REG & 0xfffffffffULL, | ||
443 | .end = (TX4939_RTC_REG & 0xfffffffffULL) + 0x100 - 1, | ||
444 | .flags = IORESOURCE_MEM, | ||
445 | }, { | ||
446 | .start = TXX9_IRQ_BASE + TX4939_IR_RTC, | ||
447 | .flags = IORESOURCE_IRQ, | ||
448 | }, | ||
449 | }; | ||
450 | static struct platform_device rtc_dev = { | ||
451 | .name = "tx4939rtc", | ||
452 | .id = -1, | ||
453 | .num_resources = ARRAY_SIZE(res), | ||
454 | .resource = res, | ||
455 | }; | ||
456 | |||
457 | platform_device_register(&rtc_dev); | ||
458 | } | ||
459 | |||
438 | static void __init tx4939_stop_unused_modules(void) | 460 | static void __init tx4939_stop_unused_modules(void) |
439 | { | 461 | { |
440 | __u64 pcfg, rst = 0, ckd = 0; | 462 | __u64 pcfg, rst = 0, ckd = 0; |
diff --git a/arch/mips/txx9/rbtx4939/setup.c b/arch/mips/txx9/rbtx4939/setup.c index 98fbd9391bf8..656603b85b71 100644 --- a/arch/mips/txx9/rbtx4939/setup.c +++ b/arch/mips/txx9/rbtx4939/setup.c | |||
@@ -336,6 +336,7 @@ static void __init rbtx4939_device_init(void) | |||
336 | rbtx4939_led_setup(); | 336 | rbtx4939_led_setup(); |
337 | tx4939_wdt_init(); | 337 | tx4939_wdt_init(); |
338 | tx4939_ata_init(); | 338 | tx4939_ata_init(); |
339 | tx4939_rtc_init(); | ||
339 | } | 340 | } |
340 | 341 | ||
341 | static void __init rbtx4939_setup(void) | 342 | static void __init rbtx4939_setup(void) |
diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig index 99c495ad9c75..1239c6132b4a 100644 --- a/arch/powerpc/configs/52xx/cm5200_defconfig +++ b/arch/powerpc/configs/52xx/cm5200_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:12:40 2008 | 4 | # Mon Jan 26 21:41:58 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -71,14 +71,23 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
71 | # CONFIG_BSD_PROCESS_ACCT is not set | 71 | # CONFIG_BSD_PROCESS_ACCT is not set |
72 | # CONFIG_TASKSTATS is not set | 72 | # CONFIG_TASKSTATS is not set |
73 | # CONFIG_AUDIT is not set | 73 | # CONFIG_AUDIT is not set |
74 | |||
75 | # | ||
76 | # RCU Subsystem | ||
77 | # | ||
78 | CONFIG_CLASSIC_RCU=y | ||
79 | # CONFIG_TREE_RCU is not set | ||
80 | # CONFIG_PREEMPT_RCU is not set | ||
81 | # CONFIG_TREE_RCU_TRACE is not set | ||
82 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
74 | # CONFIG_IKCONFIG is not set | 83 | # CONFIG_IKCONFIG is not set |
75 | CONFIG_LOG_BUF_SHIFT=14 | 84 | CONFIG_LOG_BUF_SHIFT=14 |
76 | # CONFIG_CGROUPS is not set | ||
77 | CONFIG_GROUP_SCHED=y | 85 | CONFIG_GROUP_SCHED=y |
78 | CONFIG_FAIR_GROUP_SCHED=y | 86 | CONFIG_FAIR_GROUP_SCHED=y |
79 | # CONFIG_RT_GROUP_SCHED is not set | 87 | # CONFIG_RT_GROUP_SCHED is not set |
80 | CONFIG_USER_SCHED=y | 88 | CONFIG_USER_SCHED=y |
81 | # CONFIG_CGROUP_SCHED is not set | 89 | # CONFIG_CGROUP_SCHED is not set |
90 | # CONFIG_CGROUPS is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 91 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 92 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 93 | # CONFIG_RELAY is not set |
@@ -110,7 +119,6 @@ CONFIG_SLUB_DEBUG=y | |||
110 | CONFIG_SLUB=y | 119 | CONFIG_SLUB=y |
111 | # CONFIG_SLOB is not set | 120 | # CONFIG_SLOB is not set |
112 | # CONFIG_PROFILING is not set | 121 | # CONFIG_PROFILING is not set |
113 | # CONFIG_MARKERS is not set | ||
114 | CONFIG_HAVE_OPROFILE=y | 122 | CONFIG_HAVE_OPROFILE=y |
115 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 123 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
116 | CONFIG_HAVE_IOREMAP_PROT=y | 124 | CONFIG_HAVE_IOREMAP_PROT=y |
@@ -121,13 +129,11 @@ CONFIG_HAVE_CLK=y | |||
121 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 129 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
122 | CONFIG_SLABINFO=y | 130 | CONFIG_SLABINFO=y |
123 | CONFIG_RT_MUTEXES=y | 131 | CONFIG_RT_MUTEXES=y |
124 | # CONFIG_TINY_SHMEM is not set | ||
125 | CONFIG_BASE_SMALL=0 | 132 | CONFIG_BASE_SMALL=0 |
126 | # CONFIG_MODULES is not set | 133 | # CONFIG_MODULES is not set |
127 | CONFIG_BLOCK=y | 134 | CONFIG_BLOCK=y |
128 | # CONFIG_LBD is not set | 135 | # CONFIG_LBD is not set |
129 | # CONFIG_BLK_DEV_IO_TRACE is not set | 136 | # CONFIG_BLK_DEV_IO_TRACE is not set |
130 | # CONFIG_LSF is not set | ||
131 | # CONFIG_BLK_DEV_BSG is not set | 137 | # CONFIG_BLK_DEV_BSG is not set |
132 | # CONFIG_BLK_DEV_INTEGRITY is not set | 138 | # CONFIG_BLK_DEV_INTEGRITY is not set |
133 | 139 | ||
@@ -143,7 +149,6 @@ CONFIG_DEFAULT_AS=y | |||
143 | # CONFIG_DEFAULT_CFQ is not set | 149 | # CONFIG_DEFAULT_CFQ is not set |
144 | # CONFIG_DEFAULT_NOOP is not set | 150 | # CONFIG_DEFAULT_NOOP is not set |
145 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 151 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
146 | CONFIG_CLASSIC_RCU=y | ||
147 | # CONFIG_FREEZER is not set | 152 | # CONFIG_FREEZER is not set |
148 | 153 | ||
149 | # | 154 | # |
@@ -182,9 +187,8 @@ CONFIG_PPC_MPC5200_SIMPLE=y | |||
182 | # CONFIG_TAU is not set | 187 | # CONFIG_TAU is not set |
183 | # CONFIG_FSL_ULI1575 is not set | 188 | # CONFIG_FSL_ULI1575 is not set |
184 | CONFIG_PPC_BESTCOMM=y | 189 | CONFIG_PPC_BESTCOMM=y |
185 | # CONFIG_PPC_BESTCOMM_ATA is not set | ||
186 | CONFIG_PPC_BESTCOMM_FEC=y | 190 | CONFIG_PPC_BESTCOMM_FEC=y |
187 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | 191 | # CONFIG_SIMPLE_GPIO is not set |
188 | 192 | ||
189 | # | 193 | # |
190 | # Kernel options | 194 | # Kernel options |
@@ -211,6 +215,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
211 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 215 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
212 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 216 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
213 | # CONFIG_KEXEC is not set | 217 | # CONFIG_KEXEC is not set |
218 | # CONFIG_CRASH_DUMP is not set | ||
214 | CONFIG_ARCH_FLATMEM_ENABLE=y | 219 | CONFIG_ARCH_FLATMEM_ENABLE=y |
215 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 220 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
216 | CONFIG_SELECT_MEMORY_MODEL=y | 221 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -222,12 +227,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
222 | CONFIG_PAGEFLAGS_EXTENDED=y | 227 | CONFIG_PAGEFLAGS_EXTENDED=y |
223 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 228 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
224 | CONFIG_MIGRATION=y | 229 | CONFIG_MIGRATION=y |
225 | # CONFIG_RESOURCES_64BIT is not set | ||
226 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 230 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
227 | CONFIG_ZONE_DMA_FLAG=1 | 231 | CONFIG_ZONE_DMA_FLAG=1 |
228 | CONFIG_BOUNCE=y | 232 | CONFIG_BOUNCE=y |
229 | CONFIG_VIRT_TO_BUS=y | 233 | CONFIG_VIRT_TO_BUS=y |
230 | CONFIG_UNEVICTABLE_LRU=y | 234 | CONFIG_UNEVICTABLE_LRU=y |
235 | CONFIG_PPC_4K_PAGES=y | ||
236 | # CONFIG_PPC_16K_PAGES is not set | ||
237 | # CONFIG_PPC_64K_PAGES is not set | ||
231 | CONFIG_FORCE_MAX_ZONEORDER=11 | 238 | CONFIG_FORCE_MAX_ZONEORDER=11 |
232 | CONFIG_PROC_DEVICETREE=y | 239 | CONFIG_PROC_DEVICETREE=y |
233 | # CONFIG_CMDLINE_BOOL is not set | 240 | # CONFIG_CMDLINE_BOOL is not set |
@@ -268,6 +275,7 @@ CONFIG_NET=y | |||
268 | # | 275 | # |
269 | # Networking options | 276 | # Networking options |
270 | # | 277 | # |
278 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
271 | CONFIG_PACKET=y | 279 | CONFIG_PACKET=y |
272 | # CONFIG_PACKET_MMAP is not set | 280 | # CONFIG_PACKET_MMAP is not set |
273 | CONFIG_UNIX=y | 281 | CONFIG_UNIX=y |
@@ -324,6 +332,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
324 | # CONFIG_ECONET is not set | 332 | # CONFIG_ECONET is not set |
325 | # CONFIG_WAN_ROUTER is not set | 333 | # CONFIG_WAN_ROUTER is not set |
326 | # CONFIG_NET_SCHED is not set | 334 | # CONFIG_NET_SCHED is not set |
335 | # CONFIG_DCB is not set | ||
327 | 336 | ||
328 | # | 337 | # |
329 | # Network testing | 338 | # Network testing |
@@ -336,6 +345,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
336 | # CONFIG_AF_RXRPC is not set | 345 | # CONFIG_AF_RXRPC is not set |
337 | # CONFIG_PHONET is not set | 346 | # CONFIG_PHONET is not set |
338 | # CONFIG_WIRELESS is not set | 347 | # CONFIG_WIRELESS is not set |
348 | # CONFIG_WIMAX is not set | ||
339 | # CONFIG_RFKILL is not set | 349 | # CONFIG_RFKILL is not set |
340 | # CONFIG_NET_9P is not set | 350 | # CONFIG_NET_9P is not set |
341 | 351 | ||
@@ -427,6 +437,12 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
427 | # CONFIG_MTD_ONENAND is not set | 437 | # CONFIG_MTD_ONENAND is not set |
428 | 438 | ||
429 | # | 439 | # |
440 | # LPDDR flash memory drivers | ||
441 | # | ||
442 | # CONFIG_MTD_LPDDR is not set | ||
443 | # CONFIG_MTD_QINFO_PROBE is not set | ||
444 | |||
445 | # | ||
430 | # UBI - Unsorted block images | 446 | # UBI - Unsorted block images |
431 | # | 447 | # |
432 | # CONFIG_MTD_UBI is not set | 448 | # CONFIG_MTD_UBI is not set |
@@ -514,6 +530,9 @@ CONFIG_LXT_PHY=y | |||
514 | # CONFIG_BROADCOM_PHY is not set | 530 | # CONFIG_BROADCOM_PHY is not set |
515 | # CONFIG_ICPLUS_PHY is not set | 531 | # CONFIG_ICPLUS_PHY is not set |
516 | # CONFIG_REALTEK_PHY is not set | 532 | # CONFIG_REALTEK_PHY is not set |
533 | # CONFIG_NATIONAL_PHY is not set | ||
534 | # CONFIG_STE10XP is not set | ||
535 | # CONFIG_LSI_ET1011C_PHY is not set | ||
517 | # CONFIG_FIXED_PHY is not set | 536 | # CONFIG_FIXED_PHY is not set |
518 | # CONFIG_MDIO_BITBANG is not set | 537 | # CONFIG_MDIO_BITBANG is not set |
519 | CONFIG_NET_ETHERNET=y | 538 | CONFIG_NET_ETHERNET=y |
@@ -539,6 +558,10 @@ CONFIG_FEC_MPC52xx_MDIO=y | |||
539 | # CONFIG_IWLWIFI_LEDS is not set | 558 | # CONFIG_IWLWIFI_LEDS is not set |
540 | 559 | ||
541 | # | 560 | # |
561 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
562 | # | ||
563 | |||
564 | # | ||
542 | # USB Network Adapters | 565 | # USB Network Adapters |
543 | # | 566 | # |
544 | # CONFIG_USB_CATC is not set | 567 | # CONFIG_USB_CATC is not set |
@@ -588,8 +611,10 @@ CONFIG_SERIAL_MPC52xx=y | |||
588 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | 611 | CONFIG_SERIAL_MPC52xx_CONSOLE=y |
589 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=57600 | 612 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=57600 |
590 | CONFIG_UNIX98_PTYS=y | 613 | CONFIG_UNIX98_PTYS=y |
614 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
591 | CONFIG_LEGACY_PTYS=y | 615 | CONFIG_LEGACY_PTYS=y |
592 | CONFIG_LEGACY_PTY_COUNT=256 | 616 | CONFIG_LEGACY_PTY_COUNT=256 |
617 | # CONFIG_HVC_UDBG is not set | ||
593 | # CONFIG_IPMI_HANDLER is not set | 618 | # CONFIG_IPMI_HANDLER is not set |
594 | # CONFIG_HW_RANDOM is not set | 619 | # CONFIG_HW_RANDOM is not set |
595 | # CONFIG_NVRAM is not set | 620 | # CONFIG_NVRAM is not set |
@@ -629,8 +654,6 @@ CONFIG_I2C_MPC=y | |||
629 | # Miscellaneous I2C Chip support | 654 | # Miscellaneous I2C Chip support |
630 | # | 655 | # |
631 | # CONFIG_DS1682 is not set | 656 | # CONFIG_DS1682 is not set |
632 | # CONFIG_EEPROM_AT24 is not set | ||
633 | # CONFIG_EEPROM_LEGACY is not set | ||
634 | # CONFIG_SENSORS_PCF8574 is not set | 657 | # CONFIG_SENSORS_PCF8574 is not set |
635 | # CONFIG_PCF8575 is not set | 658 | # CONFIG_PCF8575 is not set |
636 | # CONFIG_SENSORS_PCA9539 is not set | 659 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -675,10 +698,12 @@ CONFIG_SSB_POSSIBLE=y | |||
675 | # CONFIG_MFD_CORE is not set | 698 | # CONFIG_MFD_CORE is not set |
676 | # CONFIG_MFD_SM501 is not set | 699 | # CONFIG_MFD_SM501 is not set |
677 | # CONFIG_HTC_PASIC3 is not set | 700 | # CONFIG_HTC_PASIC3 is not set |
701 | # CONFIG_TWL4030_CORE is not set | ||
678 | # CONFIG_MFD_TMIO is not set | 702 | # CONFIG_MFD_TMIO is not set |
679 | # CONFIG_PMIC_DA903X is not set | 703 | # CONFIG_PMIC_DA903X is not set |
680 | # CONFIG_MFD_WM8400 is not set | 704 | # CONFIG_MFD_WM8400 is not set |
681 | # CONFIG_MFD_WM8350_I2C is not set | 705 | # CONFIG_MFD_WM8350_I2C is not set |
706 | # CONFIG_MFD_PCF50633 is not set | ||
682 | # CONFIG_REGULATOR is not set | 707 | # CONFIG_REGULATOR is not set |
683 | 708 | ||
684 | # | 709 | # |
@@ -736,6 +761,7 @@ CONFIG_USB_DEVICEFS=y | |||
736 | # USB Host Controller Drivers | 761 | # USB Host Controller Drivers |
737 | # | 762 | # |
738 | # CONFIG_USB_C67X00_HCD is not set | 763 | # CONFIG_USB_C67X00_HCD is not set |
764 | # CONFIG_USB_OXU210HP_HCD is not set | ||
739 | # CONFIG_USB_ISP116X_HCD is not set | 765 | # CONFIG_USB_ISP116X_HCD is not set |
740 | # CONFIG_USB_ISP1760_HCD is not set | 766 | # CONFIG_USB_ISP1760_HCD is not set |
741 | CONFIG_USB_OHCI_HCD=y | 767 | CONFIG_USB_OHCI_HCD=y |
@@ -760,18 +786,17 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | |||
760 | # CONFIG_USB_TMC is not set | 786 | # CONFIG_USB_TMC is not set |
761 | 787 | ||
762 | # | 788 | # |
763 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 789 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
764 | # | 790 | # |
765 | 791 | ||
766 | # | 792 | # |
767 | # may also be needed; see USB_STORAGE Help for more information | 793 | # see USB_STORAGE Help for more information |
768 | # | 794 | # |
769 | CONFIG_USB_STORAGE=y | 795 | CONFIG_USB_STORAGE=y |
770 | # CONFIG_USB_STORAGE_DEBUG is not set | 796 | # CONFIG_USB_STORAGE_DEBUG is not set |
771 | # CONFIG_USB_STORAGE_DATAFAB is not set | 797 | # CONFIG_USB_STORAGE_DATAFAB is not set |
772 | # CONFIG_USB_STORAGE_FREECOM is not set | 798 | # CONFIG_USB_STORAGE_FREECOM is not set |
773 | # CONFIG_USB_STORAGE_ISD200 is not set | 799 | # CONFIG_USB_STORAGE_ISD200 is not set |
774 | # CONFIG_USB_STORAGE_DPCM is not set | ||
775 | # CONFIG_USB_STORAGE_USBAT is not set | 800 | # CONFIG_USB_STORAGE_USBAT is not set |
776 | # CONFIG_USB_STORAGE_SDDR09 is not set | 801 | # CONFIG_USB_STORAGE_SDDR09 is not set |
777 | # CONFIG_USB_STORAGE_SDDR55 is not set | 802 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -817,6 +842,10 @@ CONFIG_USB_STORAGE=y | |||
817 | # CONFIG_USB_ISIGHTFW is not set | 842 | # CONFIG_USB_ISIGHTFW is not set |
818 | # CONFIG_USB_VST is not set | 843 | # CONFIG_USB_VST is not set |
819 | # CONFIG_USB_GADGET is not set | 844 | # CONFIG_USB_GADGET is not set |
845 | |||
846 | # | ||
847 | # OTG and related infrastructure | ||
848 | # | ||
820 | # CONFIG_MMC is not set | 849 | # CONFIG_MMC is not set |
821 | # CONFIG_MEMSTICK is not set | 850 | # CONFIG_MEMSTICK is not set |
822 | # CONFIG_NEW_LEDS is not set | 851 | # CONFIG_NEW_LEDS is not set |
@@ -826,7 +855,6 @@ CONFIG_USB_STORAGE=y | |||
826 | # CONFIG_DMADEVICES is not set | 855 | # CONFIG_DMADEVICES is not set |
827 | # CONFIG_UIO is not set | 856 | # CONFIG_UIO is not set |
828 | # CONFIG_STAGING is not set | 857 | # CONFIG_STAGING is not set |
829 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
830 | 858 | ||
831 | # | 859 | # |
832 | # File systems | 860 | # File systems |
@@ -847,6 +875,7 @@ CONFIG_FS_MBCACHE=y | |||
847 | CONFIG_FILE_LOCKING=y | 875 | CONFIG_FILE_LOCKING=y |
848 | # CONFIG_XFS_FS is not set | 876 | # CONFIG_XFS_FS is not set |
849 | # CONFIG_OCFS2_FS is not set | 877 | # CONFIG_OCFS2_FS is not set |
878 | # CONFIG_BTRFS_FS is not set | ||
850 | CONFIG_DNOTIFY=y | 879 | CONFIG_DNOTIFY=y |
851 | CONFIG_INOTIFY=y | 880 | CONFIG_INOTIFY=y |
852 | CONFIG_INOTIFY_USER=y | 881 | CONFIG_INOTIFY_USER=y |
@@ -883,10 +912,7 @@ CONFIG_TMPFS=y | |||
883 | # CONFIG_TMPFS_POSIX_ACL is not set | 912 | # CONFIG_TMPFS_POSIX_ACL is not set |
884 | # CONFIG_HUGETLB_PAGE is not set | 913 | # CONFIG_HUGETLB_PAGE is not set |
885 | # CONFIG_CONFIGFS_FS is not set | 914 | # CONFIG_CONFIGFS_FS is not set |
886 | 915 | CONFIG_MISC_FILESYSTEMS=y | |
887 | # | ||
888 | # Miscellaneous filesystems | ||
889 | # | ||
890 | # CONFIG_ADFS_FS is not set | 916 | # CONFIG_ADFS_FS is not set |
891 | # CONFIG_AFFS_FS is not set | 917 | # CONFIG_AFFS_FS is not set |
892 | # CONFIG_HFS_FS is not set | 918 | # CONFIG_HFS_FS is not set |
@@ -906,6 +932,7 @@ CONFIG_JFFS2_ZLIB=y | |||
906 | CONFIG_JFFS2_RTIME=y | 932 | CONFIG_JFFS2_RTIME=y |
907 | # CONFIG_JFFS2_RUBIN is not set | 933 | # CONFIG_JFFS2_RUBIN is not set |
908 | CONFIG_CRAMFS=y | 934 | CONFIG_CRAMFS=y |
935 | # CONFIG_SQUASHFS is not set | ||
909 | # CONFIG_VXFS_FS is not set | 936 | # CONFIG_VXFS_FS is not set |
910 | # CONFIG_MINIX_FS is not set | 937 | # CONFIG_MINIX_FS is not set |
911 | # CONFIG_OMFS_FS is not set | 938 | # CONFIG_OMFS_FS is not set |
@@ -1002,6 +1029,7 @@ CONFIG_NLS_ISO8859_1=y | |||
1002 | # Library routines | 1029 | # Library routines |
1003 | # | 1030 | # |
1004 | CONFIG_BITREVERSE=y | 1031 | CONFIG_BITREVERSE=y |
1032 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1005 | # CONFIG_CRC_CCITT is not set | 1033 | # CONFIG_CRC_CCITT is not set |
1006 | # CONFIG_CRC16 is not set | 1034 | # CONFIG_CRC16 is not set |
1007 | # CONFIG_CRC_T10DIF is not set | 1035 | # CONFIG_CRC_T10DIF is not set |
@@ -1053,6 +1081,7 @@ CONFIG_SCHED_DEBUG=y | |||
1053 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1081 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1054 | # CONFIG_DEBUG_LIST is not set | 1082 | # CONFIG_DEBUG_LIST is not set |
1055 | # CONFIG_DEBUG_SG is not set | 1083 | # CONFIG_DEBUG_SG is not set |
1084 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1056 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1085 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1057 | # CONFIG_RCU_TORTURE_TEST is not set | 1086 | # CONFIG_RCU_TORTURE_TEST is not set |
1058 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1087 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -1061,6 +1090,8 @@ CONFIG_SCHED_DEBUG=y | |||
1061 | # CONFIG_FAULT_INJECTION is not set | 1090 | # CONFIG_FAULT_INJECTION is not set |
1062 | # CONFIG_LATENCYTOP is not set | 1091 | # CONFIG_LATENCYTOP is not set |
1063 | CONFIG_HAVE_FUNCTION_TRACER=y | 1092 | CONFIG_HAVE_FUNCTION_TRACER=y |
1093 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1094 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1064 | 1095 | ||
1065 | # | 1096 | # |
1066 | # Tracers | 1097 | # Tracers |
@@ -1069,11 +1100,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1069 | # CONFIG_SCHED_TRACER is not set | 1100 | # CONFIG_SCHED_TRACER is not set |
1070 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1101 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
1071 | # CONFIG_BOOT_TRACER is not set | 1102 | # CONFIG_BOOT_TRACER is not set |
1103 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1072 | # CONFIG_STACK_TRACER is not set | 1104 | # CONFIG_STACK_TRACER is not set |
1073 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1105 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1074 | # CONFIG_SAMPLES is not set | 1106 | # CONFIG_SAMPLES is not set |
1075 | CONFIG_HAVE_ARCH_KGDB=y | 1107 | CONFIG_HAVE_ARCH_KGDB=y |
1076 | # CONFIG_KGDB is not set | 1108 | # CONFIG_KGDB is not set |
1109 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1077 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1110 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1078 | # CONFIG_DEBUG_STACK_USAGE is not set | 1111 | # CONFIG_DEBUG_STACK_USAGE is not set |
1079 | # CONFIG_DEBUG_PAGEALLOC is not set | 1112 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -1100,11 +1133,15 @@ CONFIG_CRYPTO=y | |||
1100 | # | 1133 | # |
1101 | # CONFIG_CRYPTO_FIPS is not set | 1134 | # CONFIG_CRYPTO_FIPS is not set |
1102 | CONFIG_CRYPTO_ALGAPI=y | 1135 | CONFIG_CRYPTO_ALGAPI=y |
1103 | CONFIG_CRYPTO_AEAD=y | 1136 | CONFIG_CRYPTO_ALGAPI2=y |
1137 | CONFIG_CRYPTO_AEAD2=y | ||
1104 | CONFIG_CRYPTO_BLKCIPHER=y | 1138 | CONFIG_CRYPTO_BLKCIPHER=y |
1139 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1105 | CONFIG_CRYPTO_HASH=y | 1140 | CONFIG_CRYPTO_HASH=y |
1106 | CONFIG_CRYPTO_RNG=y | 1141 | CONFIG_CRYPTO_HASH2=y |
1142 | CONFIG_CRYPTO_RNG2=y | ||
1107 | CONFIG_CRYPTO_MANAGER=y | 1143 | CONFIG_CRYPTO_MANAGER=y |
1144 | CONFIG_CRYPTO_MANAGER2=y | ||
1108 | # CONFIG_CRYPTO_GF128MUL is not set | 1145 | # CONFIG_CRYPTO_GF128MUL is not set |
1109 | # CONFIG_CRYPTO_NULL is not set | 1146 | # CONFIG_CRYPTO_NULL is not set |
1110 | # CONFIG_CRYPTO_CRYPTD is not set | 1147 | # CONFIG_CRYPTO_CRYPTD is not set |
diff --git a/arch/powerpc/configs/52xx/lite5200b_defconfig b/arch/powerpc/configs/52xx/lite5200b_defconfig index 9796220032fd..b7b880562906 100644 --- a/arch/powerpc/configs/52xx/lite5200b_defconfig +++ b/arch/powerpc/configs/52xx/lite5200b_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:10:16 2008 | 4 | # Mon Jan 26 21:41:14 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -72,14 +72,23 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
72 | # CONFIG_BSD_PROCESS_ACCT is not set | 72 | # CONFIG_BSD_PROCESS_ACCT is not set |
73 | # CONFIG_TASKSTATS is not set | 73 | # CONFIG_TASKSTATS is not set |
74 | # CONFIG_AUDIT is not set | 74 | # CONFIG_AUDIT is not set |
75 | |||
76 | # | ||
77 | # RCU Subsystem | ||
78 | # | ||
79 | CONFIG_CLASSIC_RCU=y | ||
80 | # CONFIG_TREE_RCU is not set | ||
81 | # CONFIG_PREEMPT_RCU is not set | ||
82 | # CONFIG_TREE_RCU_TRACE is not set | ||
83 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
75 | # CONFIG_IKCONFIG is not set | 84 | # CONFIG_IKCONFIG is not set |
76 | CONFIG_LOG_BUF_SHIFT=14 | 85 | CONFIG_LOG_BUF_SHIFT=14 |
77 | # CONFIG_CGROUPS is not set | ||
78 | CONFIG_GROUP_SCHED=y | 86 | CONFIG_GROUP_SCHED=y |
79 | # CONFIG_FAIR_GROUP_SCHED is not set | 87 | # CONFIG_FAIR_GROUP_SCHED is not set |
80 | # CONFIG_RT_GROUP_SCHED is not set | 88 | # CONFIG_RT_GROUP_SCHED is not set |
81 | CONFIG_USER_SCHED=y | 89 | CONFIG_USER_SCHED=y |
82 | # CONFIG_CGROUP_SCHED is not set | 90 | # CONFIG_CGROUP_SCHED is not set |
91 | # CONFIG_CGROUPS is not set | ||
83 | CONFIG_SYSFS_DEPRECATED=y | 92 | CONFIG_SYSFS_DEPRECATED=y |
84 | CONFIG_SYSFS_DEPRECATED_V2=y | 93 | CONFIG_SYSFS_DEPRECATED_V2=y |
85 | # CONFIG_RELAY is not set | 94 | # CONFIG_RELAY is not set |
@@ -112,7 +121,6 @@ CONFIG_SLUB_DEBUG=y | |||
112 | CONFIG_SLUB=y | 121 | CONFIG_SLUB=y |
113 | # CONFIG_SLOB is not set | 122 | # CONFIG_SLOB is not set |
114 | # CONFIG_PROFILING is not set | 123 | # CONFIG_PROFILING is not set |
115 | # CONFIG_MARKERS is not set | ||
116 | CONFIG_HAVE_OPROFILE=y | 124 | CONFIG_HAVE_OPROFILE=y |
117 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 125 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
118 | CONFIG_HAVE_IOREMAP_PROT=y | 126 | CONFIG_HAVE_IOREMAP_PROT=y |
@@ -123,7 +131,6 @@ CONFIG_HAVE_CLK=y | |||
123 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 131 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
124 | CONFIG_SLABINFO=y | 132 | CONFIG_SLABINFO=y |
125 | CONFIG_RT_MUTEXES=y | 133 | CONFIG_RT_MUTEXES=y |
126 | # CONFIG_TINY_SHMEM is not set | ||
127 | CONFIG_BASE_SMALL=0 | 134 | CONFIG_BASE_SMALL=0 |
128 | CONFIG_MODULES=y | 135 | CONFIG_MODULES=y |
129 | # CONFIG_MODULE_FORCE_LOAD is not set | 136 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -131,11 +138,9 @@ CONFIG_MODULE_UNLOAD=y | |||
131 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 138 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
132 | # CONFIG_MODVERSIONS is not set | 139 | # CONFIG_MODVERSIONS is not set |
133 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 140 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
134 | CONFIG_KMOD=y | ||
135 | CONFIG_BLOCK=y | 141 | CONFIG_BLOCK=y |
136 | # CONFIG_LBD is not set | 142 | # CONFIG_LBD is not set |
137 | # CONFIG_BLK_DEV_IO_TRACE is not set | 143 | # CONFIG_BLK_DEV_IO_TRACE is not set |
138 | # CONFIG_LSF is not set | ||
139 | # CONFIG_BLK_DEV_BSG is not set | 144 | # CONFIG_BLK_DEV_BSG is not set |
140 | # CONFIG_BLK_DEV_INTEGRITY is not set | 145 | # CONFIG_BLK_DEV_INTEGRITY is not set |
141 | 146 | ||
@@ -151,7 +156,6 @@ CONFIG_DEFAULT_AS=y | |||
151 | # CONFIG_DEFAULT_CFQ is not set | 156 | # CONFIG_DEFAULT_CFQ is not set |
152 | # CONFIG_DEFAULT_NOOP is not set | 157 | # CONFIG_DEFAULT_NOOP is not set |
153 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 158 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
154 | CONFIG_CLASSIC_RCU=y | ||
155 | CONFIG_FREEZER=y | 159 | CONFIG_FREEZER=y |
156 | 160 | ||
157 | # | 161 | # |
@@ -192,7 +196,7 @@ CONFIG_PPC_LITE5200=y | |||
192 | CONFIG_PPC_BESTCOMM=y | 196 | CONFIG_PPC_BESTCOMM=y |
193 | CONFIG_PPC_BESTCOMM_ATA=y | 197 | CONFIG_PPC_BESTCOMM_ATA=y |
194 | CONFIG_PPC_BESTCOMM_FEC=y | 198 | CONFIG_PPC_BESTCOMM_FEC=y |
195 | CONFIG_PPC_BESTCOMM_GEN_BD=y | 199 | # CONFIG_SIMPLE_GPIO is not set |
196 | 200 | ||
197 | # | 201 | # |
198 | # Kernel options | 202 | # Kernel options |
@@ -220,6 +224,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
220 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 224 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
221 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 225 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
222 | # CONFIG_KEXEC is not set | 226 | # CONFIG_KEXEC is not set |
227 | # CONFIG_CRASH_DUMP is not set | ||
223 | CONFIG_ARCH_FLATMEM_ENABLE=y | 228 | CONFIG_ARCH_FLATMEM_ENABLE=y |
224 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 229 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
225 | CONFIG_SELECT_MEMORY_MODEL=y | 230 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -231,12 +236,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
231 | CONFIG_PAGEFLAGS_EXTENDED=y | 236 | CONFIG_PAGEFLAGS_EXTENDED=y |
232 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 237 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
233 | CONFIG_MIGRATION=y | 238 | CONFIG_MIGRATION=y |
234 | # CONFIG_RESOURCES_64BIT is not set | ||
235 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 239 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
236 | CONFIG_ZONE_DMA_FLAG=1 | 240 | CONFIG_ZONE_DMA_FLAG=1 |
237 | CONFIG_BOUNCE=y | 241 | CONFIG_BOUNCE=y |
238 | CONFIG_VIRT_TO_BUS=y | 242 | CONFIG_VIRT_TO_BUS=y |
239 | CONFIG_UNEVICTABLE_LRU=y | 243 | CONFIG_UNEVICTABLE_LRU=y |
244 | CONFIG_PPC_4K_PAGES=y | ||
245 | # CONFIG_PPC_16K_PAGES is not set | ||
246 | # CONFIG_PPC_64K_PAGES is not set | ||
240 | CONFIG_FORCE_MAX_ZONEORDER=11 | 247 | CONFIG_FORCE_MAX_ZONEORDER=11 |
241 | CONFIG_PROC_DEVICETREE=y | 248 | CONFIG_PROC_DEVICETREE=y |
242 | # CONFIG_CMDLINE_BOOL is not set | 249 | # CONFIG_CMDLINE_BOOL is not set |
@@ -264,6 +271,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
264 | # CONFIG_PCI_MSI is not set | 271 | # CONFIG_PCI_MSI is not set |
265 | CONFIG_PCI_LEGACY=y | 272 | CONFIG_PCI_LEGACY=y |
266 | # CONFIG_PCI_DEBUG is not set | 273 | # CONFIG_PCI_DEBUG is not set |
274 | # CONFIG_PCI_STUB is not set | ||
267 | # CONFIG_PCCARD is not set | 275 | # CONFIG_PCCARD is not set |
268 | # CONFIG_HOTPLUG_PCI is not set | 276 | # CONFIG_HOTPLUG_PCI is not set |
269 | # CONFIG_HAS_RAPIDIO is not set | 277 | # CONFIG_HAS_RAPIDIO is not set |
@@ -286,6 +294,7 @@ CONFIG_NET=y | |||
286 | # | 294 | # |
287 | # Networking options | 295 | # Networking options |
288 | # | 296 | # |
297 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
289 | CONFIG_PACKET=y | 298 | CONFIG_PACKET=y |
290 | # CONFIG_PACKET_MMAP is not set | 299 | # CONFIG_PACKET_MMAP is not set |
291 | CONFIG_UNIX=y | 300 | CONFIG_UNIX=y |
@@ -342,6 +351,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
342 | # CONFIG_ECONET is not set | 351 | # CONFIG_ECONET is not set |
343 | # CONFIG_WAN_ROUTER is not set | 352 | # CONFIG_WAN_ROUTER is not set |
344 | # CONFIG_NET_SCHED is not set | 353 | # CONFIG_NET_SCHED is not set |
354 | # CONFIG_DCB is not set | ||
345 | 355 | ||
346 | # | 356 | # |
347 | # Network testing | 357 | # Network testing |
@@ -354,6 +364,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
354 | # CONFIG_AF_RXRPC is not set | 364 | # CONFIG_AF_RXRPC is not set |
355 | # CONFIG_PHONET is not set | 365 | # CONFIG_PHONET is not set |
356 | # CONFIG_WIRELESS is not set | 366 | # CONFIG_WIRELESS is not set |
367 | # CONFIG_WIMAX is not set | ||
357 | # CONFIG_RFKILL is not set | 368 | # CONFIG_RFKILL is not set |
358 | # CONFIG_NET_9P is not set | 369 | # CONFIG_NET_9P is not set |
359 | 370 | ||
@@ -396,13 +407,19 @@ CONFIG_BLK_DEV_RAM_SIZE=32768 | |||
396 | # CONFIG_BLK_DEV_HD is not set | 407 | # CONFIG_BLK_DEV_HD is not set |
397 | CONFIG_MISC_DEVICES=y | 408 | CONFIG_MISC_DEVICES=y |
398 | # CONFIG_PHANTOM is not set | 409 | # CONFIG_PHANTOM is not set |
399 | # CONFIG_EEPROM_93CX6 is not set | ||
400 | # CONFIG_SGI_IOC4 is not set | 410 | # CONFIG_SGI_IOC4 is not set |
401 | # CONFIG_TIFM_CORE is not set | 411 | # CONFIG_TIFM_CORE is not set |
402 | # CONFIG_ICS932S401 is not set | 412 | # CONFIG_ICS932S401 is not set |
403 | # CONFIG_ENCLOSURE_SERVICES is not set | 413 | # CONFIG_ENCLOSURE_SERVICES is not set |
404 | # CONFIG_HP_ILO is not set | 414 | # CONFIG_HP_ILO is not set |
405 | # CONFIG_C2PORT is not set | 415 | # CONFIG_C2PORT is not set |
416 | |||
417 | # | ||
418 | # EEPROM support | ||
419 | # | ||
420 | # CONFIG_EEPROM_AT24 is not set | ||
421 | # CONFIG_EEPROM_LEGACY is not set | ||
422 | # CONFIG_EEPROM_93CX6 is not set | ||
406 | CONFIG_HAVE_IDE=y | 423 | CONFIG_HAVE_IDE=y |
407 | # CONFIG_IDE is not set | 424 | # CONFIG_IDE is not set |
408 | 425 | ||
@@ -445,6 +462,7 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
445 | # CONFIG_SCSI_SRP_ATTRS is not set | 462 | # CONFIG_SCSI_SRP_ATTRS is not set |
446 | CONFIG_SCSI_LOWLEVEL=y | 463 | CONFIG_SCSI_LOWLEVEL=y |
447 | # CONFIG_ISCSI_TCP is not set | 464 | # CONFIG_ISCSI_TCP is not set |
465 | # CONFIG_SCSI_CXGB3_ISCSI is not set | ||
448 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 466 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
449 | # CONFIG_SCSI_3W_9XXX is not set | 467 | # CONFIG_SCSI_3W_9XXX is not set |
450 | # CONFIG_SCSI_ACARD is not set | 468 | # CONFIG_SCSI_ACARD is not set |
@@ -461,6 +479,8 @@ CONFIG_SCSI_LOWLEVEL=y | |||
461 | # CONFIG_MEGARAID_SAS is not set | 479 | # CONFIG_MEGARAID_SAS is not set |
462 | # CONFIG_SCSI_HPTIOP is not set | 480 | # CONFIG_SCSI_HPTIOP is not set |
463 | # CONFIG_SCSI_BUSLOGIC is not set | 481 | # CONFIG_SCSI_BUSLOGIC is not set |
482 | # CONFIG_LIBFC is not set | ||
483 | # CONFIG_FCOE is not set | ||
464 | # CONFIG_SCSI_DMX3191D is not set | 484 | # CONFIG_SCSI_DMX3191D is not set |
465 | # CONFIG_SCSI_EATA is not set | 485 | # CONFIG_SCSI_EATA is not set |
466 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 486 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
@@ -580,6 +600,9 @@ CONFIG_LXT_PHY=y | |||
580 | # CONFIG_BROADCOM_PHY is not set | 600 | # CONFIG_BROADCOM_PHY is not set |
581 | # CONFIG_ICPLUS_PHY is not set | 601 | # CONFIG_ICPLUS_PHY is not set |
582 | # CONFIG_REALTEK_PHY is not set | 602 | # CONFIG_REALTEK_PHY is not set |
603 | # CONFIG_NATIONAL_PHY is not set | ||
604 | # CONFIG_STE10XP is not set | ||
605 | # CONFIG_LSI_ET1011C_PHY is not set | ||
583 | # CONFIG_FIXED_PHY is not set | 606 | # CONFIG_FIXED_PHY is not set |
584 | # CONFIG_MDIO_BITBANG is not set | 607 | # CONFIG_MDIO_BITBANG is not set |
585 | CONFIG_NET_ETHERNET=y | 608 | CONFIG_NET_ETHERNET=y |
@@ -626,6 +649,7 @@ CONFIG_NETDEV_1000=y | |||
626 | # CONFIG_JME is not set | 649 | # CONFIG_JME is not set |
627 | CONFIG_NETDEV_10000=y | 650 | CONFIG_NETDEV_10000=y |
628 | # CONFIG_CHELSIO_T1 is not set | 651 | # CONFIG_CHELSIO_T1 is not set |
652 | CONFIG_CHELSIO_T3_DEPENDS=y | ||
629 | # CONFIG_CHELSIO_T3 is not set | 653 | # CONFIG_CHELSIO_T3 is not set |
630 | # CONFIG_ENIC is not set | 654 | # CONFIG_ENIC is not set |
631 | # CONFIG_IXGBE is not set | 655 | # CONFIG_IXGBE is not set |
@@ -648,6 +672,10 @@ CONFIG_NETDEV_10000=y | |||
648 | # CONFIG_WLAN_PRE80211 is not set | 672 | # CONFIG_WLAN_PRE80211 is not set |
649 | # CONFIG_WLAN_80211 is not set | 673 | # CONFIG_WLAN_80211 is not set |
650 | # CONFIG_IWLWIFI_LEDS is not set | 674 | # CONFIG_IWLWIFI_LEDS is not set |
675 | |||
676 | # | ||
677 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
678 | # | ||
651 | # CONFIG_WAN is not set | 679 | # CONFIG_WAN is not set |
652 | # CONFIG_FDDI is not set | 680 | # CONFIG_FDDI is not set |
653 | # CONFIG_HIPPI is not set | 681 | # CONFIG_HIPPI is not set |
@@ -695,8 +723,10 @@ CONFIG_SERIAL_MPC52xx_CONSOLE=y | |||
695 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | 723 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
696 | # CONFIG_SERIAL_JSM is not set | 724 | # CONFIG_SERIAL_JSM is not set |
697 | CONFIG_UNIX98_PTYS=y | 725 | CONFIG_UNIX98_PTYS=y |
726 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
698 | CONFIG_LEGACY_PTYS=y | 727 | CONFIG_LEGACY_PTYS=y |
699 | CONFIG_LEGACY_PTY_COUNT=256 | 728 | CONFIG_LEGACY_PTY_COUNT=256 |
729 | # CONFIG_HVC_UDBG is not set | ||
700 | # CONFIG_IPMI_HANDLER is not set | 730 | # CONFIG_IPMI_HANDLER is not set |
701 | # CONFIG_HW_RANDOM is not set | 731 | # CONFIG_HW_RANDOM is not set |
702 | # CONFIG_NVRAM is not set | 732 | # CONFIG_NVRAM is not set |
@@ -762,8 +792,6 @@ CONFIG_I2C_MPC=y | |||
762 | # Miscellaneous I2C Chip support | 792 | # Miscellaneous I2C Chip support |
763 | # | 793 | # |
764 | # CONFIG_DS1682 is not set | 794 | # CONFIG_DS1682 is not set |
765 | # CONFIG_EEPROM_AT24 is not set | ||
766 | # CONFIG_EEPROM_LEGACY is not set | ||
767 | # CONFIG_SENSORS_PCF8574 is not set | 795 | # CONFIG_SENSORS_PCF8574 is not set |
768 | # CONFIG_PCF8575 is not set | 796 | # CONFIG_PCF8575 is not set |
769 | # CONFIG_SENSORS_PCA9539 is not set | 797 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -796,10 +824,12 @@ CONFIG_SSB_POSSIBLE=y | |||
796 | # CONFIG_MFD_CORE is not set | 824 | # CONFIG_MFD_CORE is not set |
797 | # CONFIG_MFD_SM501 is not set | 825 | # CONFIG_MFD_SM501 is not set |
798 | # CONFIG_HTC_PASIC3 is not set | 826 | # CONFIG_HTC_PASIC3 is not set |
827 | # CONFIG_TWL4030_CORE is not set | ||
799 | # CONFIG_MFD_TMIO is not set | 828 | # CONFIG_MFD_TMIO is not set |
800 | # CONFIG_PMIC_DA903X is not set | 829 | # CONFIG_PMIC_DA903X is not set |
801 | # CONFIG_MFD_WM8400 is not set | 830 | # CONFIG_MFD_WM8400 is not set |
802 | # CONFIG_MFD_WM8350_I2C is not set | 831 | # CONFIG_MFD_WM8350_I2C is not set |
832 | # CONFIG_MFD_PCF50633 is not set | ||
803 | # CONFIG_REGULATOR is not set | 833 | # CONFIG_REGULATOR is not set |
804 | 834 | ||
805 | # | 835 | # |
@@ -846,9 +876,13 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
846 | # | 876 | # |
847 | 877 | ||
848 | # | 878 | # |
849 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 879 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
850 | # | 880 | # |
851 | # CONFIG_USB_GADGET is not set | 881 | # CONFIG_USB_GADGET is not set |
882 | |||
883 | # | ||
884 | # OTG and related infrastructure | ||
885 | # | ||
852 | # CONFIG_UWB is not set | 886 | # CONFIG_UWB is not set |
853 | # CONFIG_MMC is not set | 887 | # CONFIG_MMC is not set |
854 | # CONFIG_MEMSTICK is not set | 888 | # CONFIG_MEMSTICK is not set |
@@ -860,7 +894,6 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
860 | # CONFIG_DMADEVICES is not set | 894 | # CONFIG_DMADEVICES is not set |
861 | # CONFIG_UIO is not set | 895 | # CONFIG_UIO is not set |
862 | # CONFIG_STAGING is not set | 896 | # CONFIG_STAGING is not set |
863 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
864 | 897 | ||
865 | # | 898 | # |
866 | # File systems | 899 | # File systems |
@@ -881,6 +914,7 @@ CONFIG_FS_MBCACHE=y | |||
881 | CONFIG_FILE_LOCKING=y | 914 | CONFIG_FILE_LOCKING=y |
882 | # CONFIG_XFS_FS is not set | 915 | # CONFIG_XFS_FS is not set |
883 | # CONFIG_OCFS2_FS is not set | 916 | # CONFIG_OCFS2_FS is not set |
917 | # CONFIG_BTRFS_FS is not set | ||
884 | CONFIG_DNOTIFY=y | 918 | CONFIG_DNOTIFY=y |
885 | CONFIG_INOTIFY=y | 919 | CONFIG_INOTIFY=y |
886 | CONFIG_INOTIFY_USER=y | 920 | CONFIG_INOTIFY_USER=y |
@@ -914,10 +948,7 @@ CONFIG_TMPFS=y | |||
914 | # CONFIG_TMPFS_POSIX_ACL is not set | 948 | # CONFIG_TMPFS_POSIX_ACL is not set |
915 | # CONFIG_HUGETLB_PAGE is not set | 949 | # CONFIG_HUGETLB_PAGE is not set |
916 | # CONFIG_CONFIGFS_FS is not set | 950 | # CONFIG_CONFIGFS_FS is not set |
917 | 951 | CONFIG_MISC_FILESYSTEMS=y | |
918 | # | ||
919 | # Miscellaneous filesystems | ||
920 | # | ||
921 | # CONFIG_ADFS_FS is not set | 952 | # CONFIG_ADFS_FS is not set |
922 | # CONFIG_AFFS_FS is not set | 953 | # CONFIG_AFFS_FS is not set |
923 | # CONFIG_HFS_FS is not set | 954 | # CONFIG_HFS_FS is not set |
@@ -926,6 +957,7 @@ CONFIG_TMPFS=y | |||
926 | # CONFIG_BFS_FS is not set | 957 | # CONFIG_BFS_FS is not set |
927 | # CONFIG_EFS_FS is not set | 958 | # CONFIG_EFS_FS is not set |
928 | # CONFIG_CRAMFS is not set | 959 | # CONFIG_CRAMFS is not set |
960 | # CONFIG_SQUASHFS is not set | ||
929 | # CONFIG_VXFS_FS is not set | 961 | # CONFIG_VXFS_FS is not set |
930 | # CONFIG_MINIX_FS is not set | 962 | # CONFIG_MINIX_FS is not set |
931 | # CONFIG_OMFS_FS is not set | 963 | # CONFIG_OMFS_FS is not set |
@@ -967,6 +999,7 @@ CONFIG_MSDOS_PARTITION=y | |||
967 | # Library routines | 999 | # Library routines |
968 | # | 1000 | # |
969 | CONFIG_BITREVERSE=y | 1001 | CONFIG_BITREVERSE=y |
1002 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
970 | # CONFIG_CRC_CCITT is not set | 1003 | # CONFIG_CRC_CCITT is not set |
971 | # CONFIG_CRC16 is not set | 1004 | # CONFIG_CRC16 is not set |
972 | # CONFIG_CRC_T10DIF is not set | 1005 | # CONFIG_CRC_T10DIF is not set |
@@ -1016,6 +1049,7 @@ CONFIG_DEBUG_INFO=y | |||
1016 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1049 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1017 | # CONFIG_DEBUG_LIST is not set | 1050 | # CONFIG_DEBUG_LIST is not set |
1018 | # CONFIG_DEBUG_SG is not set | 1051 | # CONFIG_DEBUG_SG is not set |
1052 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1019 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1053 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1020 | # CONFIG_RCU_TORTURE_TEST is not set | 1054 | # CONFIG_RCU_TORTURE_TEST is not set |
1021 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1055 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -1024,6 +1058,8 @@ CONFIG_DEBUG_INFO=y | |||
1024 | # CONFIG_FAULT_INJECTION is not set | 1058 | # CONFIG_FAULT_INJECTION is not set |
1025 | # CONFIG_LATENCYTOP is not set | 1059 | # CONFIG_LATENCYTOP is not set |
1026 | CONFIG_HAVE_FUNCTION_TRACER=y | 1060 | CONFIG_HAVE_FUNCTION_TRACER=y |
1061 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1062 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1027 | 1063 | ||
1028 | # | 1064 | # |
1029 | # Tracers | 1065 | # Tracers |
@@ -1032,11 +1068,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1032 | # CONFIG_SCHED_TRACER is not set | 1068 | # CONFIG_SCHED_TRACER is not set |
1033 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1069 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
1034 | # CONFIG_BOOT_TRACER is not set | 1070 | # CONFIG_BOOT_TRACER is not set |
1071 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1035 | # CONFIG_STACK_TRACER is not set | 1072 | # CONFIG_STACK_TRACER is not set |
1036 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1073 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1037 | # CONFIG_SAMPLES is not set | 1074 | # CONFIG_SAMPLES is not set |
1038 | CONFIG_HAVE_ARCH_KGDB=y | 1075 | CONFIG_HAVE_ARCH_KGDB=y |
1039 | # CONFIG_KGDB is not set | 1076 | # CONFIG_KGDB is not set |
1077 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1040 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1078 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1041 | # CONFIG_DEBUG_STACK_USAGE is not set | 1079 | # CONFIG_DEBUG_STACK_USAGE is not set |
1042 | # CONFIG_DEBUG_PAGEALLOC is not set | 1080 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -1063,11 +1101,15 @@ CONFIG_CRYPTO=y | |||
1063 | # | 1101 | # |
1064 | # CONFIG_CRYPTO_FIPS is not set | 1102 | # CONFIG_CRYPTO_FIPS is not set |
1065 | CONFIG_CRYPTO_ALGAPI=y | 1103 | CONFIG_CRYPTO_ALGAPI=y |
1066 | CONFIG_CRYPTO_AEAD=y | 1104 | CONFIG_CRYPTO_ALGAPI2=y |
1105 | CONFIG_CRYPTO_AEAD2=y | ||
1067 | CONFIG_CRYPTO_BLKCIPHER=y | 1106 | CONFIG_CRYPTO_BLKCIPHER=y |
1107 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1068 | CONFIG_CRYPTO_HASH=y | 1108 | CONFIG_CRYPTO_HASH=y |
1069 | CONFIG_CRYPTO_RNG=y | 1109 | CONFIG_CRYPTO_HASH2=y |
1110 | CONFIG_CRYPTO_RNG2=y | ||
1070 | CONFIG_CRYPTO_MANAGER=y | 1111 | CONFIG_CRYPTO_MANAGER=y |
1112 | CONFIG_CRYPTO_MANAGER2=y | ||
1071 | # CONFIG_CRYPTO_GF128MUL is not set | 1113 | # CONFIG_CRYPTO_GF128MUL is not set |
1072 | # CONFIG_CRYPTO_NULL is not set | 1114 | # CONFIG_CRYPTO_NULL is not set |
1073 | # CONFIG_CRYPTO_CRYPTD is not set | 1115 | # CONFIG_CRYPTO_CRYPTD is not set |
diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/configs/52xx/motionpro_defconfig index d081e0031057..fb10f22fd0d2 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:11:02 2008 | 4 | # Mon Jan 26 21:42:29 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -71,14 +71,23 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
71 | # CONFIG_BSD_PROCESS_ACCT is not set | 71 | # CONFIG_BSD_PROCESS_ACCT is not set |
72 | # CONFIG_TASKSTATS is not set | 72 | # CONFIG_TASKSTATS is not set |
73 | # CONFIG_AUDIT is not set | 73 | # CONFIG_AUDIT is not set |
74 | |||
75 | # | ||
76 | # RCU Subsystem | ||
77 | # | ||
78 | CONFIG_CLASSIC_RCU=y | ||
79 | # CONFIG_TREE_RCU is not set | ||
80 | # CONFIG_PREEMPT_RCU is not set | ||
81 | # CONFIG_TREE_RCU_TRACE is not set | ||
82 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
74 | # CONFIG_IKCONFIG is not set | 83 | # CONFIG_IKCONFIG is not set |
75 | CONFIG_LOG_BUF_SHIFT=14 | 84 | CONFIG_LOG_BUF_SHIFT=14 |
76 | # CONFIG_CGROUPS is not set | ||
77 | CONFIG_GROUP_SCHED=y | 85 | CONFIG_GROUP_SCHED=y |
78 | CONFIG_FAIR_GROUP_SCHED=y | 86 | CONFIG_FAIR_GROUP_SCHED=y |
79 | # CONFIG_RT_GROUP_SCHED is not set | 87 | # CONFIG_RT_GROUP_SCHED is not set |
80 | CONFIG_USER_SCHED=y | 88 | CONFIG_USER_SCHED=y |
81 | # CONFIG_CGROUP_SCHED is not set | 89 | # CONFIG_CGROUP_SCHED is not set |
90 | # CONFIG_CGROUPS is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 91 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 92 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 93 | # CONFIG_RELAY is not set |
@@ -110,7 +119,6 @@ CONFIG_SLUB_DEBUG=y | |||
110 | CONFIG_SLUB=y | 119 | CONFIG_SLUB=y |
111 | # CONFIG_SLOB is not set | 120 | # CONFIG_SLOB is not set |
112 | # CONFIG_PROFILING is not set | 121 | # CONFIG_PROFILING is not set |
113 | # CONFIG_MARKERS is not set | ||
114 | CONFIG_HAVE_OPROFILE=y | 122 | CONFIG_HAVE_OPROFILE=y |
115 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 123 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
116 | CONFIG_HAVE_IOREMAP_PROT=y | 124 | CONFIG_HAVE_IOREMAP_PROT=y |
@@ -121,13 +129,11 @@ CONFIG_HAVE_CLK=y | |||
121 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 129 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
122 | CONFIG_SLABINFO=y | 130 | CONFIG_SLABINFO=y |
123 | CONFIG_RT_MUTEXES=y | 131 | CONFIG_RT_MUTEXES=y |
124 | # CONFIG_TINY_SHMEM is not set | ||
125 | CONFIG_BASE_SMALL=0 | 132 | CONFIG_BASE_SMALL=0 |
126 | # CONFIG_MODULES is not set | 133 | # CONFIG_MODULES is not set |
127 | CONFIG_BLOCK=y | 134 | CONFIG_BLOCK=y |
128 | # CONFIG_LBD is not set | 135 | # CONFIG_LBD is not set |
129 | # CONFIG_BLK_DEV_IO_TRACE is not set | 136 | # CONFIG_BLK_DEV_IO_TRACE is not set |
130 | # CONFIG_LSF is not set | ||
131 | # CONFIG_BLK_DEV_BSG is not set | 137 | # CONFIG_BLK_DEV_BSG is not set |
132 | # CONFIG_BLK_DEV_INTEGRITY is not set | 138 | # CONFIG_BLK_DEV_INTEGRITY is not set |
133 | 139 | ||
@@ -143,7 +149,6 @@ CONFIG_DEFAULT_AS=y | |||
143 | # CONFIG_DEFAULT_CFQ is not set | 149 | # CONFIG_DEFAULT_CFQ is not set |
144 | # CONFIG_DEFAULT_NOOP is not set | 150 | # CONFIG_DEFAULT_NOOP is not set |
145 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 151 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
146 | CONFIG_CLASSIC_RCU=y | ||
147 | # CONFIG_FREEZER is not set | 152 | # CONFIG_FREEZER is not set |
148 | 153 | ||
149 | # | 154 | # |
@@ -182,9 +187,9 @@ CONFIG_PPC_MPC5200_SIMPLE=y | |||
182 | # CONFIG_TAU is not set | 187 | # CONFIG_TAU is not set |
183 | # CONFIG_FSL_ULI1575 is not set | 188 | # CONFIG_FSL_ULI1575 is not set |
184 | CONFIG_PPC_BESTCOMM=y | 189 | CONFIG_PPC_BESTCOMM=y |
185 | # CONFIG_PPC_BESTCOMM_ATA is not set | 190 | CONFIG_PPC_BESTCOMM_ATA=y |
186 | CONFIG_PPC_BESTCOMM_FEC=y | 191 | CONFIG_PPC_BESTCOMM_FEC=y |
187 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | 192 | # CONFIG_SIMPLE_GPIO is not set |
188 | 193 | ||
189 | # | 194 | # |
190 | # Kernel options | 195 | # Kernel options |
@@ -211,6 +216,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
211 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 216 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
212 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 217 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
213 | # CONFIG_KEXEC is not set | 218 | # CONFIG_KEXEC is not set |
219 | # CONFIG_CRASH_DUMP is not set | ||
214 | CONFIG_ARCH_FLATMEM_ENABLE=y | 220 | CONFIG_ARCH_FLATMEM_ENABLE=y |
215 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 221 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
216 | CONFIG_SELECT_MEMORY_MODEL=y | 222 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -222,12 +228,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
222 | CONFIG_PAGEFLAGS_EXTENDED=y | 228 | CONFIG_PAGEFLAGS_EXTENDED=y |
223 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 229 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
224 | CONFIG_MIGRATION=y | 230 | CONFIG_MIGRATION=y |
225 | # CONFIG_RESOURCES_64BIT is not set | ||
226 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 231 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
227 | CONFIG_ZONE_DMA_FLAG=1 | 232 | CONFIG_ZONE_DMA_FLAG=1 |
228 | CONFIG_BOUNCE=y | 233 | CONFIG_BOUNCE=y |
229 | CONFIG_VIRT_TO_BUS=y | 234 | CONFIG_VIRT_TO_BUS=y |
230 | CONFIG_UNEVICTABLE_LRU=y | 235 | CONFIG_UNEVICTABLE_LRU=y |
236 | CONFIG_PPC_4K_PAGES=y | ||
237 | # CONFIG_PPC_16K_PAGES is not set | ||
238 | # CONFIG_PPC_64K_PAGES is not set | ||
231 | CONFIG_FORCE_MAX_ZONEORDER=11 | 239 | CONFIG_FORCE_MAX_ZONEORDER=11 |
232 | CONFIG_PROC_DEVICETREE=y | 240 | CONFIG_PROC_DEVICETREE=y |
233 | # CONFIG_CMDLINE_BOOL is not set | 241 | # CONFIG_CMDLINE_BOOL is not set |
@@ -268,6 +276,7 @@ CONFIG_NET=y | |||
268 | # | 276 | # |
269 | # Networking options | 277 | # Networking options |
270 | # | 278 | # |
279 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
271 | CONFIG_PACKET=y | 280 | CONFIG_PACKET=y |
272 | # CONFIG_PACKET_MMAP is not set | 281 | # CONFIG_PACKET_MMAP is not set |
273 | CONFIG_UNIX=y | 282 | CONFIG_UNIX=y |
@@ -324,6 +333,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
324 | # CONFIG_ECONET is not set | 333 | # CONFIG_ECONET is not set |
325 | # CONFIG_WAN_ROUTER is not set | 334 | # CONFIG_WAN_ROUTER is not set |
326 | # CONFIG_NET_SCHED is not set | 335 | # CONFIG_NET_SCHED is not set |
336 | # CONFIG_DCB is not set | ||
327 | 337 | ||
328 | # | 338 | # |
329 | # Network testing | 339 | # Network testing |
@@ -336,6 +346,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
336 | # CONFIG_AF_RXRPC is not set | 346 | # CONFIG_AF_RXRPC is not set |
337 | # CONFIG_PHONET is not set | 347 | # CONFIG_PHONET is not set |
338 | # CONFIG_WIRELESS is not set | 348 | # CONFIG_WIRELESS is not set |
349 | # CONFIG_WIMAX is not set | ||
339 | # CONFIG_RFKILL is not set | 350 | # CONFIG_RFKILL is not set |
340 | # CONFIG_NET_9P is not set | 351 | # CONFIG_NET_9P is not set |
341 | 352 | ||
@@ -427,6 +438,12 @@ CONFIG_MTD_ROM=y | |||
427 | # CONFIG_MTD_ONENAND is not set | 438 | # CONFIG_MTD_ONENAND is not set |
428 | 439 | ||
429 | # | 440 | # |
441 | # LPDDR flash memory drivers | ||
442 | # | ||
443 | # CONFIG_MTD_LPDDR is not set | ||
444 | # CONFIG_MTD_QINFO_PROBE is not set | ||
445 | |||
446 | # | ||
430 | # UBI - Unsorted block images | 447 | # UBI - Unsorted block images |
431 | # | 448 | # |
432 | # CONFIG_MTD_UBI is not set | 449 | # CONFIG_MTD_UBI is not set |
@@ -447,10 +464,16 @@ CONFIG_BLK_DEV_RAM_SIZE=32768 | |||
447 | # CONFIG_ATA_OVER_ETH is not set | 464 | # CONFIG_ATA_OVER_ETH is not set |
448 | # CONFIG_BLK_DEV_HD is not set | 465 | # CONFIG_BLK_DEV_HD is not set |
449 | CONFIG_MISC_DEVICES=y | 466 | CONFIG_MISC_DEVICES=y |
450 | # CONFIG_EEPROM_93CX6 is not set | ||
451 | # CONFIG_ICS932S401 is not set | 467 | # CONFIG_ICS932S401 is not set |
452 | # CONFIG_ENCLOSURE_SERVICES is not set | 468 | # CONFIG_ENCLOSURE_SERVICES is not set |
453 | # CONFIG_C2PORT is not set | 469 | # CONFIG_C2PORT is not set |
470 | |||
471 | # | ||
472 | # EEPROM support | ||
473 | # | ||
474 | # CONFIG_EEPROM_AT24 is not set | ||
475 | CONFIG_EEPROM_LEGACY=y | ||
476 | # CONFIG_EEPROM_93CX6 is not set | ||
454 | CONFIG_HAVE_IDE=y | 477 | CONFIG_HAVE_IDE=y |
455 | # CONFIG_IDE is not set | 478 | # CONFIG_IDE is not set |
456 | 479 | ||
@@ -492,6 +515,7 @@ CONFIG_CHR_DEV_SG=y | |||
492 | # CONFIG_SCSI_SRP_ATTRS is not set | 515 | # CONFIG_SCSI_SRP_ATTRS is not set |
493 | CONFIG_SCSI_LOWLEVEL=y | 516 | CONFIG_SCSI_LOWLEVEL=y |
494 | # CONFIG_ISCSI_TCP is not set | 517 | # CONFIG_ISCSI_TCP is not set |
518 | # CONFIG_LIBFC is not set | ||
495 | # CONFIG_SCSI_DEBUG is not set | 519 | # CONFIG_SCSI_DEBUG is not set |
496 | # CONFIG_SCSI_DH is not set | 520 | # CONFIG_SCSI_DH is not set |
497 | CONFIG_ATA=y | 521 | CONFIG_ATA=y |
@@ -525,6 +549,9 @@ CONFIG_SMSC_PHY=y | |||
525 | CONFIG_BROADCOM_PHY=y | 549 | CONFIG_BROADCOM_PHY=y |
526 | CONFIG_ICPLUS_PHY=y | 550 | CONFIG_ICPLUS_PHY=y |
527 | # CONFIG_REALTEK_PHY is not set | 551 | # CONFIG_REALTEK_PHY is not set |
552 | # CONFIG_NATIONAL_PHY is not set | ||
553 | # CONFIG_STE10XP is not set | ||
554 | # CONFIG_LSI_ET1011C_PHY is not set | ||
528 | # CONFIG_FIXED_PHY is not set | 555 | # CONFIG_FIXED_PHY is not set |
529 | CONFIG_MDIO_BITBANG=y | 556 | CONFIG_MDIO_BITBANG=y |
530 | CONFIG_NET_ETHERNET=y | 557 | CONFIG_NET_ETHERNET=y |
@@ -548,6 +575,10 @@ CONFIG_FEC_MPC52xx_MDIO=y | |||
548 | # CONFIG_WLAN_PRE80211 is not set | 575 | # CONFIG_WLAN_PRE80211 is not set |
549 | # CONFIG_WLAN_80211 is not set | 576 | # CONFIG_WLAN_80211 is not set |
550 | # CONFIG_IWLWIFI_LEDS is not set | 577 | # CONFIG_IWLWIFI_LEDS is not set |
578 | |||
579 | # | ||
580 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
581 | # | ||
551 | # CONFIG_WAN is not set | 582 | # CONFIG_WAN is not set |
552 | # CONFIG_PPP is not set | 583 | # CONFIG_PPP is not set |
553 | # CONFIG_SLIP is not set | 584 | # CONFIG_SLIP is not set |
@@ -590,8 +621,10 @@ CONFIG_SERIAL_MPC52xx=y | |||
590 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | 621 | CONFIG_SERIAL_MPC52xx_CONSOLE=y |
591 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | 622 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
592 | CONFIG_UNIX98_PTYS=y | 623 | CONFIG_UNIX98_PTYS=y |
624 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
593 | CONFIG_LEGACY_PTYS=y | 625 | CONFIG_LEGACY_PTYS=y |
594 | CONFIG_LEGACY_PTY_COUNT=256 | 626 | CONFIG_LEGACY_PTY_COUNT=256 |
627 | # CONFIG_HVC_UDBG is not set | ||
595 | # CONFIG_IPMI_HANDLER is not set | 628 | # CONFIG_IPMI_HANDLER is not set |
596 | # CONFIG_HW_RANDOM is not set | 629 | # CONFIG_HW_RANDOM is not set |
597 | # CONFIG_NVRAM is not set | 630 | # CONFIG_NVRAM is not set |
@@ -629,8 +662,6 @@ CONFIG_I2C_MPC=y | |||
629 | # Miscellaneous I2C Chip support | 662 | # Miscellaneous I2C Chip support |
630 | # | 663 | # |
631 | # CONFIG_DS1682 is not set | 664 | # CONFIG_DS1682 is not set |
632 | # CONFIG_EEPROM_AT24 is not set | ||
633 | CONFIG_EEPROM_LEGACY=y | ||
634 | # CONFIG_SENSORS_PCF8574 is not set | 665 | # CONFIG_SENSORS_PCF8574 is not set |
635 | # CONFIG_PCF8575 is not set | 666 | # CONFIG_PCF8575 is not set |
636 | # CONFIG_SENSORS_PCA9539 is not set | 667 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -659,6 +690,7 @@ CONFIG_HWMON=y | |||
659 | # CONFIG_SENSORS_ADT7462 is not set | 690 | # CONFIG_SENSORS_ADT7462 is not set |
660 | # CONFIG_SENSORS_ADT7470 is not set | 691 | # CONFIG_SENSORS_ADT7470 is not set |
661 | # CONFIG_SENSORS_ADT7473 is not set | 692 | # CONFIG_SENSORS_ADT7473 is not set |
693 | # CONFIG_SENSORS_ADT7475 is not set | ||
662 | # CONFIG_SENSORS_ATXP1 is not set | 694 | # CONFIG_SENSORS_ATXP1 is not set |
663 | # CONFIG_SENSORS_DS1621 is not set | 695 | # CONFIG_SENSORS_DS1621 is not set |
664 | # CONFIG_SENSORS_F71805F is not set | 696 | # CONFIG_SENSORS_F71805F is not set |
@@ -678,6 +710,7 @@ CONFIG_HWMON=y | |||
678 | # CONFIG_SENSORS_LM90 is not set | 710 | # CONFIG_SENSORS_LM90 is not set |
679 | # CONFIG_SENSORS_LM92 is not set | 711 | # CONFIG_SENSORS_LM92 is not set |
680 | # CONFIG_SENSORS_LM93 is not set | 712 | # CONFIG_SENSORS_LM93 is not set |
713 | # CONFIG_SENSORS_LTC4245 is not set | ||
681 | # CONFIG_SENSORS_MAX1619 is not set | 714 | # CONFIG_SENSORS_MAX1619 is not set |
682 | # CONFIG_SENSORS_MAX6650 is not set | 715 | # CONFIG_SENSORS_MAX6650 is not set |
683 | # CONFIG_SENSORS_PC87360 is not set | 716 | # CONFIG_SENSORS_PC87360 is not set |
@@ -721,10 +754,12 @@ CONFIG_SSB_POSSIBLE=y | |||
721 | # CONFIG_MFD_CORE is not set | 754 | # CONFIG_MFD_CORE is not set |
722 | # CONFIG_MFD_SM501 is not set | 755 | # CONFIG_MFD_SM501 is not set |
723 | # CONFIG_HTC_PASIC3 is not set | 756 | # CONFIG_HTC_PASIC3 is not set |
757 | # CONFIG_TWL4030_CORE is not set | ||
724 | # CONFIG_MFD_TMIO is not set | 758 | # CONFIG_MFD_TMIO is not set |
725 | # CONFIG_PMIC_DA903X is not set | 759 | # CONFIG_PMIC_DA903X is not set |
726 | # CONFIG_MFD_WM8400 is not set | 760 | # CONFIG_MFD_WM8400 is not set |
727 | # CONFIG_MFD_WM8350_I2C is not set | 761 | # CONFIG_MFD_WM8350_I2C is not set |
762 | # CONFIG_MFD_PCF50633 is not set | ||
728 | # CONFIG_REGULATOR is not set | 763 | # CONFIG_REGULATOR is not set |
729 | 764 | ||
730 | # | 765 | # |
@@ -835,7 +870,6 @@ CONFIG_RTC_DRV_DS1307=y | |||
835 | # CONFIG_DMADEVICES is not set | 870 | # CONFIG_DMADEVICES is not set |
836 | # CONFIG_UIO is not set | 871 | # CONFIG_UIO is not set |
837 | # CONFIG_STAGING is not set | 872 | # CONFIG_STAGING is not set |
838 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
839 | 873 | ||
840 | # | 874 | # |
841 | # File systems | 875 | # File systems |
@@ -856,6 +890,7 @@ CONFIG_FS_MBCACHE=y | |||
856 | CONFIG_FILE_LOCKING=y | 890 | CONFIG_FILE_LOCKING=y |
857 | # CONFIG_XFS_FS is not set | 891 | # CONFIG_XFS_FS is not set |
858 | # CONFIG_OCFS2_FS is not set | 892 | # CONFIG_OCFS2_FS is not set |
893 | # CONFIG_BTRFS_FS is not set | ||
859 | CONFIG_DNOTIFY=y | 894 | CONFIG_DNOTIFY=y |
860 | CONFIG_INOTIFY=y | 895 | CONFIG_INOTIFY=y |
861 | CONFIG_INOTIFY_USER=y | 896 | CONFIG_INOTIFY_USER=y |
@@ -892,10 +927,7 @@ CONFIG_TMPFS=y | |||
892 | # CONFIG_TMPFS_POSIX_ACL is not set | 927 | # CONFIG_TMPFS_POSIX_ACL is not set |
893 | # CONFIG_HUGETLB_PAGE is not set | 928 | # CONFIG_HUGETLB_PAGE is not set |
894 | # CONFIG_CONFIGFS_FS is not set | 929 | # CONFIG_CONFIGFS_FS is not set |
895 | 930 | CONFIG_MISC_FILESYSTEMS=y | |
896 | # | ||
897 | # Miscellaneous filesystems | ||
898 | # | ||
899 | # CONFIG_ADFS_FS is not set | 931 | # CONFIG_ADFS_FS is not set |
900 | # CONFIG_AFFS_FS is not set | 932 | # CONFIG_AFFS_FS is not set |
901 | # CONFIG_HFS_FS is not set | 933 | # CONFIG_HFS_FS is not set |
@@ -915,6 +947,7 @@ CONFIG_JFFS2_ZLIB=y | |||
915 | CONFIG_JFFS2_RTIME=y | 947 | CONFIG_JFFS2_RTIME=y |
916 | # CONFIG_JFFS2_RUBIN is not set | 948 | # CONFIG_JFFS2_RUBIN is not set |
917 | CONFIG_CRAMFS=y | 949 | CONFIG_CRAMFS=y |
950 | # CONFIG_SQUASHFS is not set | ||
918 | # CONFIG_VXFS_FS is not set | 951 | # CONFIG_VXFS_FS is not set |
919 | # CONFIG_MINIX_FS is not set | 952 | # CONFIG_MINIX_FS is not set |
920 | # CONFIG_OMFS_FS is not set | 953 | # CONFIG_OMFS_FS is not set |
@@ -1011,6 +1044,7 @@ CONFIG_NLS_ISO8859_1=y | |||
1011 | # Library routines | 1044 | # Library routines |
1012 | # | 1045 | # |
1013 | CONFIG_BITREVERSE=y | 1046 | CONFIG_BITREVERSE=y |
1047 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1014 | # CONFIG_CRC_CCITT is not set | 1048 | # CONFIG_CRC_CCITT is not set |
1015 | # CONFIG_CRC16 is not set | 1049 | # CONFIG_CRC16 is not set |
1016 | # CONFIG_CRC_T10DIF is not set | 1050 | # CONFIG_CRC_T10DIF is not set |
@@ -1062,6 +1096,7 @@ CONFIG_DEBUG_INFO=y | |||
1062 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1096 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1063 | # CONFIG_DEBUG_LIST is not set | 1097 | # CONFIG_DEBUG_LIST is not set |
1064 | # CONFIG_DEBUG_SG is not set | 1098 | # CONFIG_DEBUG_SG is not set |
1099 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1065 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1100 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1066 | # CONFIG_RCU_TORTURE_TEST is not set | 1101 | # CONFIG_RCU_TORTURE_TEST is not set |
1067 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1102 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -1070,6 +1105,8 @@ CONFIG_DEBUG_INFO=y | |||
1070 | # CONFIG_FAULT_INJECTION is not set | 1105 | # CONFIG_FAULT_INJECTION is not set |
1071 | # CONFIG_LATENCYTOP is not set | 1106 | # CONFIG_LATENCYTOP is not set |
1072 | CONFIG_HAVE_FUNCTION_TRACER=y | 1107 | CONFIG_HAVE_FUNCTION_TRACER=y |
1108 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1109 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1073 | 1110 | ||
1074 | # | 1111 | # |
1075 | # Tracers | 1112 | # Tracers |
@@ -1078,11 +1115,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1078 | # CONFIG_SCHED_TRACER is not set | 1115 | # CONFIG_SCHED_TRACER is not set |
1079 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1116 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
1080 | # CONFIG_BOOT_TRACER is not set | 1117 | # CONFIG_BOOT_TRACER is not set |
1118 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1081 | # CONFIG_STACK_TRACER is not set | 1119 | # CONFIG_STACK_TRACER is not set |
1082 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1120 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1083 | # CONFIG_SAMPLES is not set | 1121 | # CONFIG_SAMPLES is not set |
1084 | CONFIG_HAVE_ARCH_KGDB=y | 1122 | CONFIG_HAVE_ARCH_KGDB=y |
1085 | # CONFIG_KGDB is not set | 1123 | # CONFIG_KGDB is not set |
1124 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1086 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1125 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1087 | # CONFIG_DEBUG_STACK_USAGE is not set | 1126 | # CONFIG_DEBUG_STACK_USAGE is not set |
1088 | # CONFIG_DEBUG_PAGEALLOC is not set | 1127 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -1109,11 +1148,15 @@ CONFIG_CRYPTO=y | |||
1109 | # | 1148 | # |
1110 | # CONFIG_CRYPTO_FIPS is not set | 1149 | # CONFIG_CRYPTO_FIPS is not set |
1111 | CONFIG_CRYPTO_ALGAPI=y | 1150 | CONFIG_CRYPTO_ALGAPI=y |
1112 | CONFIG_CRYPTO_AEAD=y | 1151 | CONFIG_CRYPTO_ALGAPI2=y |
1152 | CONFIG_CRYPTO_AEAD2=y | ||
1113 | CONFIG_CRYPTO_BLKCIPHER=y | 1153 | CONFIG_CRYPTO_BLKCIPHER=y |
1154 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1114 | CONFIG_CRYPTO_HASH=y | 1155 | CONFIG_CRYPTO_HASH=y |
1115 | CONFIG_CRYPTO_RNG=y | 1156 | CONFIG_CRYPTO_HASH2=y |
1157 | CONFIG_CRYPTO_RNG2=y | ||
1116 | CONFIG_CRYPTO_MANAGER=y | 1158 | CONFIG_CRYPTO_MANAGER=y |
1159 | CONFIG_CRYPTO_MANAGER2=y | ||
1117 | # CONFIG_CRYPTO_GF128MUL is not set | 1160 | # CONFIG_CRYPTO_GF128MUL is not set |
1118 | # CONFIG_CRYPTO_NULL is not set | 1161 | # CONFIG_CRYPTO_NULL is not set |
1119 | # CONFIG_CRYPTO_CRYPTD is not set | 1162 | # CONFIG_CRYPTO_CRYPTD is not set |
diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig index b21b8e8c3a78..00944c09a0ae 100644 --- a/arch/powerpc/configs/52xx/pcm030_defconfig +++ b/arch/powerpc/configs/52xx/pcm030_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:13:16 2008 | 4 | # Mon Jan 26 21:41:33 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -72,15 +72,24 @@ CONFIG_POSIX_MQUEUE=y | |||
72 | # CONFIG_BSD_PROCESS_ACCT is not set | 72 | # CONFIG_BSD_PROCESS_ACCT is not set |
73 | # CONFIG_TASKSTATS is not set | 73 | # CONFIG_TASKSTATS is not set |
74 | # CONFIG_AUDIT is not set | 74 | # CONFIG_AUDIT is not set |
75 | |||
76 | # | ||
77 | # RCU Subsystem | ||
78 | # | ||
79 | CONFIG_CLASSIC_RCU=y | ||
80 | # CONFIG_TREE_RCU is not set | ||
81 | # CONFIG_PREEMPT_RCU is not set | ||
82 | # CONFIG_TREE_RCU_TRACE is not set | ||
83 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
75 | CONFIG_IKCONFIG=y | 84 | CONFIG_IKCONFIG=y |
76 | CONFIG_IKCONFIG_PROC=y | 85 | CONFIG_IKCONFIG_PROC=y |
77 | CONFIG_LOG_BUF_SHIFT=14 | 86 | CONFIG_LOG_BUF_SHIFT=14 |
78 | # CONFIG_CGROUPS is not set | ||
79 | CONFIG_GROUP_SCHED=y | 87 | CONFIG_GROUP_SCHED=y |
80 | CONFIG_FAIR_GROUP_SCHED=y | 88 | CONFIG_FAIR_GROUP_SCHED=y |
81 | # CONFIG_RT_GROUP_SCHED is not set | 89 | # CONFIG_RT_GROUP_SCHED is not set |
82 | CONFIG_USER_SCHED=y | 90 | CONFIG_USER_SCHED=y |
83 | # CONFIG_CGROUP_SCHED is not set | 91 | # CONFIG_CGROUP_SCHED is not set |
92 | # CONFIG_CGROUPS is not set | ||
84 | CONFIG_SYSFS_DEPRECATED=y | 93 | CONFIG_SYSFS_DEPRECATED=y |
85 | CONFIG_SYSFS_DEPRECATED_V2=y | 94 | CONFIG_SYSFS_DEPRECATED_V2=y |
86 | # CONFIG_RELAY is not set | 95 | # CONFIG_RELAY is not set |
@@ -112,7 +121,6 @@ CONFIG_SLAB=y | |||
112 | # CONFIG_SLUB is not set | 121 | # CONFIG_SLUB is not set |
113 | # CONFIG_SLOB is not set | 122 | # CONFIG_SLOB is not set |
114 | # CONFIG_PROFILING is not set | 123 | # CONFIG_PROFILING is not set |
115 | # CONFIG_MARKERS is not set | ||
116 | CONFIG_HAVE_OPROFILE=y | 124 | CONFIG_HAVE_OPROFILE=y |
117 | # CONFIG_KPROBES is not set | 125 | # CONFIG_KPROBES is not set |
118 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 126 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
@@ -124,7 +132,6 @@ CONFIG_HAVE_CLK=y | |||
124 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 132 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
125 | CONFIG_SLABINFO=y | 133 | CONFIG_SLABINFO=y |
126 | CONFIG_RT_MUTEXES=y | 134 | CONFIG_RT_MUTEXES=y |
127 | # CONFIG_TINY_SHMEM is not set | ||
128 | CONFIG_BASE_SMALL=0 | 135 | CONFIG_BASE_SMALL=0 |
129 | CONFIG_MODULES=y | 136 | CONFIG_MODULES=y |
130 | # CONFIG_MODULE_FORCE_LOAD is not set | 137 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -132,11 +139,9 @@ CONFIG_MODULE_UNLOAD=y | |||
132 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 139 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
133 | # CONFIG_MODVERSIONS is not set | 140 | # CONFIG_MODVERSIONS is not set |
134 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 141 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
135 | CONFIG_KMOD=y | ||
136 | CONFIG_BLOCK=y | 142 | CONFIG_BLOCK=y |
137 | # CONFIG_LBD is not set | 143 | # CONFIG_LBD is not set |
138 | # CONFIG_BLK_DEV_IO_TRACE is not set | 144 | # CONFIG_BLK_DEV_IO_TRACE is not set |
139 | # CONFIG_LSF is not set | ||
140 | # CONFIG_BLK_DEV_BSG is not set | 145 | # CONFIG_BLK_DEV_BSG is not set |
141 | # CONFIG_BLK_DEV_INTEGRITY is not set | 146 | # CONFIG_BLK_DEV_INTEGRITY is not set |
142 | 147 | ||
@@ -152,7 +157,6 @@ CONFIG_IOSCHED_NOOP=y | |||
152 | # CONFIG_DEFAULT_CFQ is not set | 157 | # CONFIG_DEFAULT_CFQ is not set |
153 | CONFIG_DEFAULT_NOOP=y | 158 | CONFIG_DEFAULT_NOOP=y |
154 | CONFIG_DEFAULT_IOSCHED="noop" | 159 | CONFIG_DEFAULT_IOSCHED="noop" |
155 | CONFIG_CLASSIC_RCU=y | ||
156 | # CONFIG_FREEZER is not set | 160 | # CONFIG_FREEZER is not set |
157 | 161 | ||
158 | # | 162 | # |
@@ -191,9 +195,9 @@ CONFIG_PPC_MPC5200_SIMPLE=y | |||
191 | # CONFIG_TAU is not set | 195 | # CONFIG_TAU is not set |
192 | # CONFIG_FSL_ULI1575 is not set | 196 | # CONFIG_FSL_ULI1575 is not set |
193 | CONFIG_PPC_BESTCOMM=y | 197 | CONFIG_PPC_BESTCOMM=y |
194 | CONFIG_PPC_BESTCOMM_ATA=y | 198 | CONFIG_PPC_BESTCOMM_ATA=m |
195 | CONFIG_PPC_BESTCOMM_FEC=y | 199 | CONFIG_PPC_BESTCOMM_FEC=y |
196 | CONFIG_PPC_BESTCOMM_GEN_BD=y | 200 | # CONFIG_SIMPLE_GPIO is not set |
197 | 201 | ||
198 | # | 202 | # |
199 | # Kernel options | 203 | # Kernel options |
@@ -212,7 +216,6 @@ CONFIG_SCHED_HRTICK=y | |||
212 | # CONFIG_PREEMPT_NONE is not set | 216 | # CONFIG_PREEMPT_NONE is not set |
213 | # CONFIG_PREEMPT_VOLUNTARY is not set | 217 | # CONFIG_PREEMPT_VOLUNTARY is not set |
214 | CONFIG_PREEMPT=y | 218 | CONFIG_PREEMPT=y |
215 | # CONFIG_PREEMPT_RCU is not set | ||
216 | CONFIG_BINFMT_ELF=y | 219 | CONFIG_BINFMT_ELF=y |
217 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set | 220 | # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set |
218 | # CONFIG_HAVE_AOUT is not set | 221 | # CONFIG_HAVE_AOUT is not set |
@@ -222,6 +225,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
222 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 225 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
223 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 226 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
224 | # CONFIG_KEXEC is not set | 227 | # CONFIG_KEXEC is not set |
228 | # CONFIG_CRASH_DUMP is not set | ||
225 | CONFIG_ARCH_FLATMEM_ENABLE=y | 229 | CONFIG_ARCH_FLATMEM_ENABLE=y |
226 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 230 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
227 | CONFIG_SELECT_MEMORY_MODEL=y | 231 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -233,12 +237,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
233 | CONFIG_PAGEFLAGS_EXTENDED=y | 237 | CONFIG_PAGEFLAGS_EXTENDED=y |
234 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 238 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
235 | CONFIG_MIGRATION=y | 239 | CONFIG_MIGRATION=y |
236 | # CONFIG_RESOURCES_64BIT is not set | ||
237 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 240 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
238 | CONFIG_ZONE_DMA_FLAG=1 | 241 | CONFIG_ZONE_DMA_FLAG=1 |
239 | CONFIG_BOUNCE=y | 242 | CONFIG_BOUNCE=y |
240 | CONFIG_VIRT_TO_BUS=y | 243 | CONFIG_VIRT_TO_BUS=y |
241 | CONFIG_UNEVICTABLE_LRU=y | 244 | CONFIG_UNEVICTABLE_LRU=y |
245 | CONFIG_PPC_4K_PAGES=y | ||
246 | # CONFIG_PPC_16K_PAGES is not set | ||
247 | # CONFIG_PPC_64K_PAGES is not set | ||
242 | CONFIG_FORCE_MAX_ZONEORDER=11 | 248 | CONFIG_FORCE_MAX_ZONEORDER=11 |
243 | CONFIG_PROC_DEVICETREE=y | 249 | CONFIG_PROC_DEVICETREE=y |
244 | # CONFIG_CMDLINE_BOOL is not set | 250 | # CONFIG_CMDLINE_BOOL is not set |
@@ -261,6 +267,7 @@ CONFIG_PCI_SYSCALL=y | |||
261 | CONFIG_ARCH_SUPPORTS_MSI=y | 267 | CONFIG_ARCH_SUPPORTS_MSI=y |
262 | # CONFIG_PCI_MSI is not set | 268 | # CONFIG_PCI_MSI is not set |
263 | CONFIG_PCI_LEGACY=y | 269 | CONFIG_PCI_LEGACY=y |
270 | # CONFIG_PCI_STUB is not set | ||
264 | # CONFIG_PCCARD is not set | 271 | # CONFIG_PCCARD is not set |
265 | # CONFIG_HOTPLUG_PCI is not set | 272 | # CONFIG_HOTPLUG_PCI is not set |
266 | # CONFIG_HAS_RAPIDIO is not set | 273 | # CONFIG_HAS_RAPIDIO is not set |
@@ -283,6 +290,7 @@ CONFIG_NET=y | |||
283 | # | 290 | # |
284 | # Networking options | 291 | # Networking options |
285 | # | 292 | # |
293 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
286 | CONFIG_PACKET=y | 294 | CONFIG_PACKET=y |
287 | # CONFIG_PACKET_MMAP is not set | 295 | # CONFIG_PACKET_MMAP is not set |
288 | CONFIG_UNIX=y | 296 | CONFIG_UNIX=y |
@@ -333,6 +341,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
333 | # CONFIG_ECONET is not set | 341 | # CONFIG_ECONET is not set |
334 | # CONFIG_WAN_ROUTER is not set | 342 | # CONFIG_WAN_ROUTER is not set |
335 | # CONFIG_NET_SCHED is not set | 343 | # CONFIG_NET_SCHED is not set |
344 | # CONFIG_DCB is not set | ||
336 | 345 | ||
337 | # | 346 | # |
338 | # Network testing | 347 | # Network testing |
@@ -345,6 +354,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
345 | # CONFIG_AF_RXRPC is not set | 354 | # CONFIG_AF_RXRPC is not set |
346 | # CONFIG_PHONET is not set | 355 | # CONFIG_PHONET is not set |
347 | # CONFIG_WIRELESS is not set | 356 | # CONFIG_WIRELESS is not set |
357 | # CONFIG_WIMAX is not set | ||
348 | # CONFIG_RFKILL is not set | 358 | # CONFIG_RFKILL is not set |
349 | # CONFIG_NET_9P is not set | 359 | # CONFIG_NET_9P is not set |
350 | 360 | ||
@@ -365,6 +375,7 @@ CONFIG_MTD=y | |||
365 | # CONFIG_MTD_DEBUG is not set | 375 | # CONFIG_MTD_DEBUG is not set |
366 | # CONFIG_MTD_CONCAT is not set | 376 | # CONFIG_MTD_CONCAT is not set |
367 | CONFIG_MTD_PARTITIONS=y | 377 | CONFIG_MTD_PARTITIONS=y |
378 | # CONFIG_MTD_TESTS is not set | ||
368 | # CONFIG_MTD_REDBOOT_PARTS is not set | 379 | # CONFIG_MTD_REDBOOT_PARTS is not set |
369 | CONFIG_MTD_CMDLINE_PARTS=y | 380 | CONFIG_MTD_CMDLINE_PARTS=y |
370 | # CONFIG_MTD_OF_PARTS is not set | 381 | # CONFIG_MTD_OF_PARTS is not set |
@@ -413,9 +424,7 @@ CONFIG_MTD_CFI_UTIL=y | |||
413 | # | 424 | # |
414 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | 425 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set |
415 | CONFIG_MTD_PHYSMAP=y | 426 | CONFIG_MTD_PHYSMAP=y |
416 | CONFIG_MTD_PHYSMAP_START=0x0 | 427 | # CONFIG_MTD_PHYSMAP_COMPAT is not set |
417 | CONFIG_MTD_PHYSMAP_LEN=0x0 | ||
418 | CONFIG_MTD_PHYSMAP_BANKWIDTH=1 | ||
419 | # CONFIG_MTD_PHYSMAP_OF is not set | 428 | # CONFIG_MTD_PHYSMAP_OF is not set |
420 | # CONFIG_MTD_INTEL_VR_NOR is not set | 429 | # CONFIG_MTD_INTEL_VR_NOR is not set |
421 | # CONFIG_MTD_PLATRAM is not set | 430 | # CONFIG_MTD_PLATRAM is not set |
@@ -439,6 +448,12 @@ CONFIG_MTD_PHYSMAP_BANKWIDTH=1 | |||
439 | # CONFIG_MTD_ONENAND is not set | 448 | # CONFIG_MTD_ONENAND is not set |
440 | 449 | ||
441 | # | 450 | # |
451 | # LPDDR flash memory drivers | ||
452 | # | ||
453 | # CONFIG_MTD_LPDDR is not set | ||
454 | # CONFIG_MTD_QINFO_PROBE is not set | ||
455 | |||
456 | # | ||
442 | # UBI - Unsorted block images | 457 | # UBI - Unsorted block images |
443 | # | 458 | # |
444 | # CONFIG_MTD_UBI is not set | 459 | # CONFIG_MTD_UBI is not set |
@@ -587,6 +602,9 @@ CONFIG_PHYLIB=y | |||
587 | # CONFIG_BROADCOM_PHY is not set | 602 | # CONFIG_BROADCOM_PHY is not set |
588 | # CONFIG_ICPLUS_PHY is not set | 603 | # CONFIG_ICPLUS_PHY is not set |
589 | # CONFIG_REALTEK_PHY is not set | 604 | # CONFIG_REALTEK_PHY is not set |
605 | # CONFIG_NATIONAL_PHY is not set | ||
606 | # CONFIG_STE10XP is not set | ||
607 | # CONFIG_LSI_ET1011C_PHY is not set | ||
590 | # CONFIG_FIXED_PHY is not set | 608 | # CONFIG_FIXED_PHY is not set |
591 | # CONFIG_MDIO_BITBANG is not set | 609 | # CONFIG_MDIO_BITBANG is not set |
592 | CONFIG_NET_ETHERNET=y | 610 | CONFIG_NET_ETHERNET=y |
@@ -621,6 +639,10 @@ CONFIG_FEC_MPC52xx_MDIO=y | |||
621 | # CONFIG_IWLWIFI_LEDS is not set | 639 | # CONFIG_IWLWIFI_LEDS is not set |
622 | 640 | ||
623 | # | 641 | # |
642 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
643 | # | ||
644 | |||
645 | # | ||
624 | # USB Network Adapters | 646 | # USB Network Adapters |
625 | # | 647 | # |
626 | # CONFIG_USB_CATC is not set | 648 | # CONFIG_USB_CATC is not set |
@@ -675,7 +697,9 @@ CONFIG_SERIAL_MPC52xx_CONSOLE=y | |||
675 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600 | 697 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=9600 |
676 | # CONFIG_SERIAL_JSM is not set | 698 | # CONFIG_SERIAL_JSM is not set |
677 | CONFIG_UNIX98_PTYS=y | 699 | CONFIG_UNIX98_PTYS=y |
700 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
678 | # CONFIG_LEGACY_PTYS is not set | 701 | # CONFIG_LEGACY_PTYS is not set |
702 | # CONFIG_HVC_UDBG is not set | ||
679 | # CONFIG_IPMI_HANDLER is not set | 703 | # CONFIG_IPMI_HANDLER is not set |
680 | CONFIG_HW_RANDOM=y | 704 | CONFIG_HW_RANDOM=y |
681 | # CONFIG_NVRAM is not set | 705 | # CONFIG_NVRAM is not set |
@@ -740,8 +764,6 @@ CONFIG_I2C_MPC=y | |||
740 | # Miscellaneous I2C Chip support | 764 | # Miscellaneous I2C Chip support |
741 | # | 765 | # |
742 | # CONFIG_DS1682 is not set | 766 | # CONFIG_DS1682 is not set |
743 | # CONFIG_EEPROM_AT24 is not set | ||
744 | CONFIG_EEPROM_LEGACY=m | ||
745 | # CONFIG_SENSORS_PCF8574 is not set | 767 | # CONFIG_SENSORS_PCF8574 is not set |
746 | # CONFIG_PCF8575 is not set | 768 | # CONFIG_PCF8575 is not set |
747 | # CONFIG_SENSORS_PCA9539 is not set | 769 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -774,10 +796,12 @@ CONFIG_SSB_POSSIBLE=y | |||
774 | # CONFIG_MFD_CORE is not set | 796 | # CONFIG_MFD_CORE is not set |
775 | # CONFIG_MFD_SM501 is not set | 797 | # CONFIG_MFD_SM501 is not set |
776 | # CONFIG_HTC_PASIC3 is not set | 798 | # CONFIG_HTC_PASIC3 is not set |
799 | # CONFIG_TWL4030_CORE is not set | ||
777 | # CONFIG_MFD_TMIO is not set | 800 | # CONFIG_MFD_TMIO is not set |
778 | # CONFIG_PMIC_DA903X is not set | 801 | # CONFIG_PMIC_DA903X is not set |
779 | # CONFIG_MFD_WM8400 is not set | 802 | # CONFIG_MFD_WM8400 is not set |
780 | # CONFIG_MFD_WM8350_I2C is not set | 803 | # CONFIG_MFD_WM8350_I2C is not set |
804 | # CONFIG_MFD_PCF50633 is not set | ||
781 | # CONFIG_REGULATOR is not set | 805 | # CONFIG_REGULATOR is not set |
782 | 806 | ||
783 | # | 807 | # |
@@ -837,6 +861,7 @@ CONFIG_USB_DEVICEFS=y | |||
837 | # | 861 | # |
838 | # CONFIG_USB_C67X00_HCD is not set | 862 | # CONFIG_USB_C67X00_HCD is not set |
839 | # CONFIG_USB_EHCI_HCD is not set | 863 | # CONFIG_USB_EHCI_HCD is not set |
864 | # CONFIG_USB_OXU210HP_HCD is not set | ||
840 | # CONFIG_USB_ISP116X_HCD is not set | 865 | # CONFIG_USB_ISP116X_HCD is not set |
841 | # CONFIG_USB_ISP1760_HCD is not set | 866 | # CONFIG_USB_ISP1760_HCD is not set |
842 | CONFIG_USB_OHCI_HCD=m | 867 | CONFIG_USB_OHCI_HCD=m |
@@ -864,18 +889,17 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | |||
864 | # CONFIG_USB_TMC is not set | 889 | # CONFIG_USB_TMC is not set |
865 | 890 | ||
866 | # | 891 | # |
867 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 892 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
868 | # | 893 | # |
869 | 894 | ||
870 | # | 895 | # |
871 | # may also be needed; see USB_STORAGE Help for more information | 896 | # see USB_STORAGE Help for more information |
872 | # | 897 | # |
873 | CONFIG_USB_STORAGE=m | 898 | CONFIG_USB_STORAGE=m |
874 | # CONFIG_USB_STORAGE_DEBUG is not set | 899 | # CONFIG_USB_STORAGE_DEBUG is not set |
875 | # CONFIG_USB_STORAGE_DATAFAB is not set | 900 | # CONFIG_USB_STORAGE_DATAFAB is not set |
876 | # CONFIG_USB_STORAGE_FREECOM is not set | 901 | # CONFIG_USB_STORAGE_FREECOM is not set |
877 | # CONFIG_USB_STORAGE_ISD200 is not set | 902 | # CONFIG_USB_STORAGE_ISD200 is not set |
878 | # CONFIG_USB_STORAGE_DPCM is not set | ||
879 | # CONFIG_USB_STORAGE_USBAT is not set | 903 | # CONFIG_USB_STORAGE_USBAT is not set |
880 | # CONFIG_USB_STORAGE_SDDR09 is not set | 904 | # CONFIG_USB_STORAGE_SDDR09 is not set |
881 | # CONFIG_USB_STORAGE_SDDR55 is not set | 905 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -921,6 +945,10 @@ CONFIG_USB_STORAGE=m | |||
921 | # CONFIG_USB_ISIGHTFW is not set | 945 | # CONFIG_USB_ISIGHTFW is not set |
922 | # CONFIG_USB_VST is not set | 946 | # CONFIG_USB_VST is not set |
923 | # CONFIG_USB_GADGET is not set | 947 | # CONFIG_USB_GADGET is not set |
948 | |||
949 | # | ||
950 | # OTG and related infrastructure | ||
951 | # | ||
924 | # CONFIG_UWB is not set | 952 | # CONFIG_UWB is not set |
925 | # CONFIG_MMC is not set | 953 | # CONFIG_MMC is not set |
926 | # CONFIG_MEMSTICK is not set | 954 | # CONFIG_MEMSTICK is not set |
@@ -983,7 +1011,6 @@ CONFIG_RTC_DRV_PCF8563=m | |||
983 | # CONFIG_DMADEVICES is not set | 1011 | # CONFIG_DMADEVICES is not set |
984 | # CONFIG_UIO is not set | 1012 | # CONFIG_UIO is not set |
985 | # CONFIG_STAGING is not set | 1013 | # CONFIG_STAGING is not set |
986 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
987 | 1014 | ||
988 | # | 1015 | # |
989 | # File systems | 1016 | # File systems |
@@ -1004,6 +1031,7 @@ CONFIG_FS_MBCACHE=m | |||
1004 | CONFIG_FILE_LOCKING=y | 1031 | CONFIG_FILE_LOCKING=y |
1005 | # CONFIG_XFS_FS is not set | 1032 | # CONFIG_XFS_FS is not set |
1006 | # CONFIG_OCFS2_FS is not set | 1033 | # CONFIG_OCFS2_FS is not set |
1034 | # CONFIG_BTRFS_FS is not set | ||
1007 | # CONFIG_DNOTIFY is not set | 1035 | # CONFIG_DNOTIFY is not set |
1008 | # CONFIG_INOTIFY is not set | 1036 | # CONFIG_INOTIFY is not set |
1009 | # CONFIG_QUOTA is not set | 1037 | # CONFIG_QUOTA is not set |
@@ -1039,10 +1067,7 @@ CONFIG_TMPFS=y | |||
1039 | # CONFIG_TMPFS_POSIX_ACL is not set | 1067 | # CONFIG_TMPFS_POSIX_ACL is not set |
1040 | # CONFIG_HUGETLB_PAGE is not set | 1068 | # CONFIG_HUGETLB_PAGE is not set |
1041 | # CONFIG_CONFIGFS_FS is not set | 1069 | # CONFIG_CONFIGFS_FS is not set |
1042 | 1070 | CONFIG_MISC_FILESYSTEMS=y | |
1043 | # | ||
1044 | # Miscellaneous filesystems | ||
1045 | # | ||
1046 | # CONFIG_ADFS_FS is not set | 1071 | # CONFIG_ADFS_FS is not set |
1047 | # CONFIG_AFFS_FS is not set | 1072 | # CONFIG_AFFS_FS is not set |
1048 | # CONFIG_HFS_FS is not set | 1073 | # CONFIG_HFS_FS is not set |
@@ -1062,6 +1087,7 @@ CONFIG_JFFS2_ZLIB=y | |||
1062 | CONFIG_JFFS2_RTIME=y | 1087 | CONFIG_JFFS2_RTIME=y |
1063 | # CONFIG_JFFS2_RUBIN is not set | 1088 | # CONFIG_JFFS2_RUBIN is not set |
1064 | # CONFIG_CRAMFS is not set | 1089 | # CONFIG_CRAMFS is not set |
1090 | # CONFIG_SQUASHFS is not set | ||
1065 | # CONFIG_VXFS_FS is not set | 1091 | # CONFIG_VXFS_FS is not set |
1066 | # CONFIG_MINIX_FS is not set | 1092 | # CONFIG_MINIX_FS is not set |
1067 | # CONFIG_OMFS_FS is not set | 1093 | # CONFIG_OMFS_FS is not set |
@@ -1141,6 +1167,7 @@ CONFIG_NLS_ISO8859_1=y | |||
1141 | # Library routines | 1167 | # Library routines |
1142 | # | 1168 | # |
1143 | CONFIG_BITREVERSE=y | 1169 | CONFIG_BITREVERSE=y |
1170 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1144 | # CONFIG_CRC_CCITT is not set | 1171 | # CONFIG_CRC_CCITT is not set |
1145 | # CONFIG_CRC16 is not set | 1172 | # CONFIG_CRC16 is not set |
1146 | # CONFIG_CRC_T10DIF is not set | 1173 | # CONFIG_CRC_T10DIF is not set |
@@ -1173,6 +1200,8 @@ CONFIG_FRAME_WARN=1024 | |||
1173 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1200 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
1174 | # CONFIG_LATENCYTOP is not set | 1201 | # CONFIG_LATENCYTOP is not set |
1175 | CONFIG_HAVE_FUNCTION_TRACER=y | 1202 | CONFIG_HAVE_FUNCTION_TRACER=y |
1203 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1204 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1176 | 1205 | ||
1177 | # | 1206 | # |
1178 | # Tracers | 1207 | # Tracers |
@@ -1180,6 +1209,7 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1180 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1209 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1181 | # CONFIG_SAMPLES is not set | 1210 | # CONFIG_SAMPLES is not set |
1182 | CONFIG_HAVE_ARCH_KGDB=y | 1211 | CONFIG_HAVE_ARCH_KGDB=y |
1212 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1183 | # CONFIG_IRQSTACKS is not set | 1213 | # CONFIG_IRQSTACKS is not set |
1184 | # CONFIG_BOOTX_TEXT is not set | 1214 | # CONFIG_BOOTX_TEXT is not set |
1185 | # CONFIG_PPC_EARLY_DEBUG is not set | 1215 | # CONFIG_PPC_EARLY_DEBUG is not set |
diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig index 79954579f5ec..65237ad6f07e 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:09:30 2008 | 4 | # Mon Jan 26 21:42:58 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -71,14 +71,23 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
71 | # CONFIG_BSD_PROCESS_ACCT is not set | 71 | # CONFIG_BSD_PROCESS_ACCT is not set |
72 | # CONFIG_TASKSTATS is not set | 72 | # CONFIG_TASKSTATS is not set |
73 | # CONFIG_AUDIT is not set | 73 | # CONFIG_AUDIT is not set |
74 | |||
75 | # | ||
76 | # RCU Subsystem | ||
77 | # | ||
78 | CONFIG_CLASSIC_RCU=y | ||
79 | # CONFIG_TREE_RCU is not set | ||
80 | # CONFIG_PREEMPT_RCU is not set | ||
81 | # CONFIG_TREE_RCU_TRACE is not set | ||
82 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
74 | # CONFIG_IKCONFIG is not set | 83 | # CONFIG_IKCONFIG is not set |
75 | CONFIG_LOG_BUF_SHIFT=14 | 84 | CONFIG_LOG_BUF_SHIFT=14 |
76 | # CONFIG_CGROUPS is not set | ||
77 | CONFIG_GROUP_SCHED=y | 85 | CONFIG_GROUP_SCHED=y |
78 | CONFIG_FAIR_GROUP_SCHED=y | 86 | CONFIG_FAIR_GROUP_SCHED=y |
79 | # CONFIG_RT_GROUP_SCHED is not set | 87 | # CONFIG_RT_GROUP_SCHED is not set |
80 | CONFIG_USER_SCHED=y | 88 | CONFIG_USER_SCHED=y |
81 | # CONFIG_CGROUP_SCHED is not set | 89 | # CONFIG_CGROUP_SCHED is not set |
90 | # CONFIG_CGROUPS is not set | ||
82 | CONFIG_SYSFS_DEPRECATED=y | 91 | CONFIG_SYSFS_DEPRECATED=y |
83 | CONFIG_SYSFS_DEPRECATED_V2=y | 92 | CONFIG_SYSFS_DEPRECATED_V2=y |
84 | # CONFIG_RELAY is not set | 93 | # CONFIG_RELAY is not set |
@@ -110,7 +119,6 @@ CONFIG_SLUB_DEBUG=y | |||
110 | CONFIG_SLUB=y | 119 | CONFIG_SLUB=y |
111 | # CONFIG_SLOB is not set | 120 | # CONFIG_SLOB is not set |
112 | # CONFIG_PROFILING is not set | 121 | # CONFIG_PROFILING is not set |
113 | # CONFIG_MARKERS is not set | ||
114 | CONFIG_HAVE_OPROFILE=y | 122 | CONFIG_HAVE_OPROFILE=y |
115 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 123 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
116 | CONFIG_HAVE_IOREMAP_PROT=y | 124 | CONFIG_HAVE_IOREMAP_PROT=y |
@@ -121,7 +129,6 @@ CONFIG_HAVE_CLK=y | |||
121 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 129 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
122 | CONFIG_SLABINFO=y | 130 | CONFIG_SLABINFO=y |
123 | CONFIG_RT_MUTEXES=y | 131 | CONFIG_RT_MUTEXES=y |
124 | # CONFIG_TINY_SHMEM is not set | ||
125 | CONFIG_BASE_SMALL=0 | 132 | CONFIG_BASE_SMALL=0 |
126 | CONFIG_MODULES=y | 133 | CONFIG_MODULES=y |
127 | # CONFIG_MODULE_FORCE_LOAD is not set | 134 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -129,11 +136,9 @@ CONFIG_MODULE_UNLOAD=y | |||
129 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 136 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
130 | CONFIG_MODVERSIONS=y | 137 | CONFIG_MODVERSIONS=y |
131 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 138 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
132 | CONFIG_KMOD=y | ||
133 | CONFIG_BLOCK=y | 139 | CONFIG_BLOCK=y |
134 | # CONFIG_LBD is not set | 140 | # CONFIG_LBD is not set |
135 | # CONFIG_BLK_DEV_IO_TRACE is not set | 141 | # CONFIG_BLK_DEV_IO_TRACE is not set |
136 | # CONFIG_LSF is not set | ||
137 | # CONFIG_BLK_DEV_BSG is not set | 142 | # CONFIG_BLK_DEV_BSG is not set |
138 | # CONFIG_BLK_DEV_INTEGRITY is not set | 143 | # CONFIG_BLK_DEV_INTEGRITY is not set |
139 | 144 | ||
@@ -149,7 +154,6 @@ CONFIG_DEFAULT_AS=y | |||
149 | # CONFIG_DEFAULT_CFQ is not set | 154 | # CONFIG_DEFAULT_CFQ is not set |
150 | # CONFIG_DEFAULT_NOOP is not set | 155 | # CONFIG_DEFAULT_NOOP is not set |
151 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 156 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
152 | CONFIG_CLASSIC_RCU=y | ||
153 | # CONFIG_FREEZER is not set | 157 | # CONFIG_FREEZER is not set |
154 | 158 | ||
155 | # | 159 | # |
@@ -188,9 +192,9 @@ CONFIG_PPC_MPC5200_BUGFIX=y | |||
188 | # CONFIG_TAU is not set | 192 | # CONFIG_TAU is not set |
189 | # CONFIG_FSL_ULI1575 is not set | 193 | # CONFIG_FSL_ULI1575 is not set |
190 | CONFIG_PPC_BESTCOMM=y | 194 | CONFIG_PPC_BESTCOMM=y |
191 | # CONFIG_PPC_BESTCOMM_ATA is not set | 195 | CONFIG_PPC_BESTCOMM_ATA=y |
192 | CONFIG_PPC_BESTCOMM_FEC=y | 196 | CONFIG_PPC_BESTCOMM_FEC=y |
193 | # CONFIG_PPC_BESTCOMM_GEN_BD is not set | 197 | # CONFIG_SIMPLE_GPIO is not set |
194 | 198 | ||
195 | # | 199 | # |
196 | # Kernel options | 200 | # Kernel options |
@@ -217,6 +221,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
217 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 221 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
218 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 222 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
219 | # CONFIG_KEXEC is not set | 223 | # CONFIG_KEXEC is not set |
224 | # CONFIG_CRASH_DUMP is not set | ||
220 | CONFIG_ARCH_FLATMEM_ENABLE=y | 225 | CONFIG_ARCH_FLATMEM_ENABLE=y |
221 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 226 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
222 | CONFIG_SELECT_MEMORY_MODEL=y | 227 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -228,12 +233,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
228 | CONFIG_PAGEFLAGS_EXTENDED=y | 233 | CONFIG_PAGEFLAGS_EXTENDED=y |
229 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 234 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
230 | CONFIG_MIGRATION=y | 235 | CONFIG_MIGRATION=y |
231 | # CONFIG_RESOURCES_64BIT is not set | ||
232 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 236 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
233 | CONFIG_ZONE_DMA_FLAG=1 | 237 | CONFIG_ZONE_DMA_FLAG=1 |
234 | CONFIG_BOUNCE=y | 238 | CONFIG_BOUNCE=y |
235 | CONFIG_VIRT_TO_BUS=y | 239 | CONFIG_VIRT_TO_BUS=y |
236 | CONFIG_UNEVICTABLE_LRU=y | 240 | CONFIG_UNEVICTABLE_LRU=y |
241 | CONFIG_PPC_4K_PAGES=y | ||
242 | # CONFIG_PPC_16K_PAGES is not set | ||
243 | # CONFIG_PPC_64K_PAGES is not set | ||
237 | CONFIG_FORCE_MAX_ZONEORDER=11 | 244 | CONFIG_FORCE_MAX_ZONEORDER=11 |
238 | CONFIG_PROC_DEVICETREE=y | 245 | CONFIG_PROC_DEVICETREE=y |
239 | # CONFIG_CMDLINE_BOOL is not set | 246 | # CONFIG_CMDLINE_BOOL is not set |
@@ -274,6 +281,7 @@ CONFIG_NET=y | |||
274 | # | 281 | # |
275 | # Networking options | 282 | # Networking options |
276 | # | 283 | # |
284 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
277 | CONFIG_PACKET=y | 285 | CONFIG_PACKET=y |
278 | # CONFIG_PACKET_MMAP is not set | 286 | # CONFIG_PACKET_MMAP is not set |
279 | CONFIG_UNIX=y | 287 | CONFIG_UNIX=y |
@@ -330,6 +338,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
330 | # CONFIG_ECONET is not set | 338 | # CONFIG_ECONET is not set |
331 | # CONFIG_WAN_ROUTER is not set | 339 | # CONFIG_WAN_ROUTER is not set |
332 | # CONFIG_NET_SCHED is not set | 340 | # CONFIG_NET_SCHED is not set |
341 | # CONFIG_DCB is not set | ||
333 | 342 | ||
334 | # | 343 | # |
335 | # Network testing | 344 | # Network testing |
@@ -342,6 +351,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
342 | # CONFIG_AF_RXRPC is not set | 351 | # CONFIG_AF_RXRPC is not set |
343 | # CONFIG_PHONET is not set | 352 | # CONFIG_PHONET is not set |
344 | # CONFIG_WIRELESS is not set | 353 | # CONFIG_WIRELESS is not set |
354 | # CONFIG_WIMAX is not set | ||
345 | # CONFIG_RFKILL is not set | 355 | # CONFIG_RFKILL is not set |
346 | # CONFIG_NET_9P is not set | 356 | # CONFIG_NET_9P is not set |
347 | 357 | ||
@@ -364,6 +374,7 @@ CONFIG_MTD=y | |||
364 | # CONFIG_MTD_DEBUG is not set | 374 | # CONFIG_MTD_DEBUG is not set |
365 | CONFIG_MTD_CONCAT=y | 375 | CONFIG_MTD_CONCAT=y |
366 | CONFIG_MTD_PARTITIONS=y | 376 | CONFIG_MTD_PARTITIONS=y |
377 | # CONFIG_MTD_TESTS is not set | ||
367 | # CONFIG_MTD_REDBOOT_PARTS is not set | 378 | # CONFIG_MTD_REDBOOT_PARTS is not set |
368 | CONFIG_MTD_CMDLINE_PARTS=y | 379 | CONFIG_MTD_CMDLINE_PARTS=y |
369 | # CONFIG_MTD_OF_PARTS is not set | 380 | # CONFIG_MTD_OF_PARTS is not set |
@@ -433,6 +444,12 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
433 | # CONFIG_MTD_ONENAND is not set | 444 | # CONFIG_MTD_ONENAND is not set |
434 | 445 | ||
435 | # | 446 | # |
447 | # LPDDR flash memory drivers | ||
448 | # | ||
449 | # CONFIG_MTD_LPDDR is not set | ||
450 | # CONFIG_MTD_QINFO_PROBE is not set | ||
451 | |||
452 | # | ||
436 | # UBI - Unsorted block images | 453 | # UBI - Unsorted block images |
437 | # | 454 | # |
438 | # CONFIG_MTD_UBI is not set | 455 | # CONFIG_MTD_UBI is not set |
@@ -496,6 +513,7 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
496 | # CONFIG_SCSI_SRP_ATTRS is not set | 513 | # CONFIG_SCSI_SRP_ATTRS is not set |
497 | CONFIG_SCSI_LOWLEVEL=y | 514 | CONFIG_SCSI_LOWLEVEL=y |
498 | # CONFIG_ISCSI_TCP is not set | 515 | # CONFIG_ISCSI_TCP is not set |
516 | # CONFIG_LIBFC is not set | ||
499 | # CONFIG_SCSI_DEBUG is not set | 517 | # CONFIG_SCSI_DEBUG is not set |
500 | # CONFIG_SCSI_DH is not set | 518 | # CONFIG_SCSI_DH is not set |
501 | CONFIG_ATA=y | 519 | CONFIG_ATA=y |
@@ -530,6 +548,9 @@ CONFIG_LXT_PHY=y | |||
530 | # CONFIG_BROADCOM_PHY is not set | 548 | # CONFIG_BROADCOM_PHY is not set |
531 | # CONFIG_ICPLUS_PHY is not set | 549 | # CONFIG_ICPLUS_PHY is not set |
532 | # CONFIG_REALTEK_PHY is not set | 550 | # CONFIG_REALTEK_PHY is not set |
551 | # CONFIG_NATIONAL_PHY is not set | ||
552 | # CONFIG_STE10XP is not set | ||
553 | # CONFIG_LSI_ET1011C_PHY is not set | ||
533 | # CONFIG_FIXED_PHY is not set | 554 | # CONFIG_FIXED_PHY is not set |
534 | # CONFIG_MDIO_BITBANG is not set | 555 | # CONFIG_MDIO_BITBANG is not set |
535 | CONFIG_NET_ETHERNET=y | 556 | CONFIG_NET_ETHERNET=y |
@@ -555,6 +576,10 @@ CONFIG_FEC_MPC52xx_MDIO=y | |||
555 | # CONFIG_IWLWIFI_LEDS is not set | 576 | # CONFIG_IWLWIFI_LEDS is not set |
556 | 577 | ||
557 | # | 578 | # |
579 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
580 | # | ||
581 | |||
582 | # | ||
558 | # USB Network Adapters | 583 | # USB Network Adapters |
559 | # | 584 | # |
560 | # CONFIG_USB_CATC is not set | 585 | # CONFIG_USB_CATC is not set |
@@ -604,8 +629,10 @@ CONFIG_SERIAL_MPC52xx=y | |||
604 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | 629 | CONFIG_SERIAL_MPC52xx_CONSOLE=y |
605 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | 630 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
606 | CONFIG_UNIX98_PTYS=y | 631 | CONFIG_UNIX98_PTYS=y |
632 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
607 | CONFIG_LEGACY_PTYS=y | 633 | CONFIG_LEGACY_PTYS=y |
608 | CONFIG_LEGACY_PTY_COUNT=256 | 634 | CONFIG_LEGACY_PTY_COUNT=256 |
635 | # CONFIG_HVC_UDBG is not set | ||
609 | # CONFIG_IPMI_HANDLER is not set | 636 | # CONFIG_IPMI_HANDLER is not set |
610 | # CONFIG_HW_RANDOM is not set | 637 | # CONFIG_HW_RANDOM is not set |
611 | # CONFIG_NVRAM is not set | 638 | # CONFIG_NVRAM is not set |
@@ -645,8 +672,6 @@ CONFIG_I2C_MPC=y | |||
645 | # Miscellaneous I2C Chip support | 672 | # Miscellaneous I2C Chip support |
646 | # | 673 | # |
647 | # CONFIG_DS1682 is not set | 674 | # CONFIG_DS1682 is not set |
648 | # CONFIG_EEPROM_AT24 is not set | ||
649 | # CONFIG_EEPROM_LEGACY is not set | ||
650 | # CONFIG_SENSORS_PCF8574 is not set | 675 | # CONFIG_SENSORS_PCF8574 is not set |
651 | # CONFIG_PCF8575 is not set | 676 | # CONFIG_PCF8575 is not set |
652 | # CONFIG_SENSORS_PCA9539 is not set | 677 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -675,6 +700,7 @@ CONFIG_HWMON=y | |||
675 | # CONFIG_SENSORS_ADT7462 is not set | 700 | # CONFIG_SENSORS_ADT7462 is not set |
676 | # CONFIG_SENSORS_ADT7470 is not set | 701 | # CONFIG_SENSORS_ADT7470 is not set |
677 | # CONFIG_SENSORS_ADT7473 is not set | 702 | # CONFIG_SENSORS_ADT7473 is not set |
703 | # CONFIG_SENSORS_ADT7475 is not set | ||
678 | # CONFIG_SENSORS_ATXP1 is not set | 704 | # CONFIG_SENSORS_ATXP1 is not set |
679 | # CONFIG_SENSORS_DS1621 is not set | 705 | # CONFIG_SENSORS_DS1621 is not set |
680 | # CONFIG_SENSORS_F71805F is not set | 706 | # CONFIG_SENSORS_F71805F is not set |
@@ -694,6 +720,7 @@ CONFIG_HWMON=y | |||
694 | # CONFIG_SENSORS_LM90 is not set | 720 | # CONFIG_SENSORS_LM90 is not set |
695 | # CONFIG_SENSORS_LM92 is not set | 721 | # CONFIG_SENSORS_LM92 is not set |
696 | # CONFIG_SENSORS_LM93 is not set | 722 | # CONFIG_SENSORS_LM93 is not set |
723 | # CONFIG_SENSORS_LTC4245 is not set | ||
697 | # CONFIG_SENSORS_MAX1619 is not set | 724 | # CONFIG_SENSORS_MAX1619 is not set |
698 | # CONFIG_SENSORS_MAX6650 is not set | 725 | # CONFIG_SENSORS_MAX6650 is not set |
699 | # CONFIG_SENSORS_PC87360 is not set | 726 | # CONFIG_SENSORS_PC87360 is not set |
@@ -742,10 +769,12 @@ CONFIG_SSB_POSSIBLE=y | |||
742 | # CONFIG_MFD_CORE is not set | 769 | # CONFIG_MFD_CORE is not set |
743 | # CONFIG_MFD_SM501 is not set | 770 | # CONFIG_MFD_SM501 is not set |
744 | # CONFIG_HTC_PASIC3 is not set | 771 | # CONFIG_HTC_PASIC3 is not set |
772 | # CONFIG_TWL4030_CORE is not set | ||
745 | # CONFIG_MFD_TMIO is not set | 773 | # CONFIG_MFD_TMIO is not set |
746 | # CONFIG_PMIC_DA903X is not set | 774 | # CONFIG_PMIC_DA903X is not set |
747 | # CONFIG_MFD_WM8400 is not set | 775 | # CONFIG_MFD_WM8400 is not set |
748 | # CONFIG_MFD_WM8350_I2C is not set | 776 | # CONFIG_MFD_WM8350_I2C is not set |
777 | # CONFIG_MFD_PCF50633 is not set | ||
749 | # CONFIG_REGULATOR is not set | 778 | # CONFIG_REGULATOR is not set |
750 | 779 | ||
751 | # | 780 | # |
@@ -803,6 +832,7 @@ CONFIG_USB_MON=y | |||
803 | # USB Host Controller Drivers | 832 | # USB Host Controller Drivers |
804 | # | 833 | # |
805 | # CONFIG_USB_C67X00_HCD is not set | 834 | # CONFIG_USB_C67X00_HCD is not set |
835 | # CONFIG_USB_OXU210HP_HCD is not set | ||
806 | # CONFIG_USB_ISP116X_HCD is not set | 836 | # CONFIG_USB_ISP116X_HCD is not set |
807 | # CONFIG_USB_ISP1760_HCD is not set | 837 | # CONFIG_USB_ISP1760_HCD is not set |
808 | CONFIG_USB_OHCI_HCD=y | 838 | CONFIG_USB_OHCI_HCD=y |
@@ -827,18 +857,17 @@ CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | |||
827 | # CONFIG_USB_TMC is not set | 857 | # CONFIG_USB_TMC is not set |
828 | 858 | ||
829 | # | 859 | # |
830 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 860 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
831 | # | 861 | # |
832 | 862 | ||
833 | # | 863 | # |
834 | # may also be needed; see USB_STORAGE Help for more information | 864 | # see USB_STORAGE Help for more information |
835 | # | 865 | # |
836 | CONFIG_USB_STORAGE=y | 866 | CONFIG_USB_STORAGE=y |
837 | # CONFIG_USB_STORAGE_DEBUG is not set | 867 | # CONFIG_USB_STORAGE_DEBUG is not set |
838 | # CONFIG_USB_STORAGE_DATAFAB is not set | 868 | # CONFIG_USB_STORAGE_DATAFAB is not set |
839 | # CONFIG_USB_STORAGE_FREECOM is not set | 869 | # CONFIG_USB_STORAGE_FREECOM is not set |
840 | # CONFIG_USB_STORAGE_ISD200 is not set | 870 | # CONFIG_USB_STORAGE_ISD200 is not set |
841 | # CONFIG_USB_STORAGE_DPCM is not set | ||
842 | # CONFIG_USB_STORAGE_USBAT is not set | 871 | # CONFIG_USB_STORAGE_USBAT is not set |
843 | # CONFIG_USB_STORAGE_SDDR09 is not set | 872 | # CONFIG_USB_STORAGE_SDDR09 is not set |
844 | # CONFIG_USB_STORAGE_SDDR55 is not set | 873 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -884,6 +913,10 @@ CONFIG_USB_STORAGE=y | |||
884 | # CONFIG_USB_ISIGHTFW is not set | 913 | # CONFIG_USB_ISIGHTFW is not set |
885 | # CONFIG_USB_VST is not set | 914 | # CONFIG_USB_VST is not set |
886 | # CONFIG_USB_GADGET is not set | 915 | # CONFIG_USB_GADGET is not set |
916 | |||
917 | # | ||
918 | # OTG and related infrastructure | ||
919 | # | ||
887 | # CONFIG_MMC is not set | 920 | # CONFIG_MMC is not set |
888 | # CONFIG_MEMSTICK is not set | 921 | # CONFIG_MEMSTICK is not set |
889 | # CONFIG_NEW_LEDS is not set | 922 | # CONFIG_NEW_LEDS is not set |
@@ -947,7 +980,6 @@ CONFIG_RTC_DRV_DS1307=y | |||
947 | # CONFIG_DMADEVICES is not set | 980 | # CONFIG_DMADEVICES is not set |
948 | # CONFIG_UIO is not set | 981 | # CONFIG_UIO is not set |
949 | # CONFIG_STAGING is not set | 982 | # CONFIG_STAGING is not set |
950 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
951 | 983 | ||
952 | # | 984 | # |
953 | # File systems | 985 | # File systems |
@@ -968,6 +1000,7 @@ CONFIG_FS_MBCACHE=y | |||
968 | CONFIG_FILE_LOCKING=y | 1000 | CONFIG_FILE_LOCKING=y |
969 | # CONFIG_XFS_FS is not set | 1001 | # CONFIG_XFS_FS is not set |
970 | # CONFIG_OCFS2_FS is not set | 1002 | # CONFIG_OCFS2_FS is not set |
1003 | # CONFIG_BTRFS_FS is not set | ||
971 | CONFIG_DNOTIFY=y | 1004 | CONFIG_DNOTIFY=y |
972 | CONFIG_INOTIFY=y | 1005 | CONFIG_INOTIFY=y |
973 | CONFIG_INOTIFY_USER=y | 1006 | CONFIG_INOTIFY_USER=y |
@@ -1004,10 +1037,7 @@ CONFIG_TMPFS=y | |||
1004 | # CONFIG_TMPFS_POSIX_ACL is not set | 1037 | # CONFIG_TMPFS_POSIX_ACL is not set |
1005 | # CONFIG_HUGETLB_PAGE is not set | 1038 | # CONFIG_HUGETLB_PAGE is not set |
1006 | # CONFIG_CONFIGFS_FS is not set | 1039 | # CONFIG_CONFIGFS_FS is not set |
1007 | 1040 | CONFIG_MISC_FILESYSTEMS=y | |
1008 | # | ||
1009 | # Miscellaneous filesystems | ||
1010 | # | ||
1011 | # CONFIG_ADFS_FS is not set | 1041 | # CONFIG_ADFS_FS is not set |
1012 | # CONFIG_AFFS_FS is not set | 1042 | # CONFIG_AFFS_FS is not set |
1013 | # CONFIG_HFS_FS is not set | 1043 | # CONFIG_HFS_FS is not set |
@@ -1027,6 +1057,7 @@ CONFIG_JFFS2_ZLIB=y | |||
1027 | CONFIG_JFFS2_RTIME=y | 1057 | CONFIG_JFFS2_RTIME=y |
1028 | # CONFIG_JFFS2_RUBIN is not set | 1058 | # CONFIG_JFFS2_RUBIN is not set |
1029 | CONFIG_CRAMFS=y | 1059 | CONFIG_CRAMFS=y |
1060 | # CONFIG_SQUASHFS is not set | ||
1030 | # CONFIG_VXFS_FS is not set | 1061 | # CONFIG_VXFS_FS is not set |
1031 | # CONFIG_MINIX_FS is not set | 1062 | # CONFIG_MINIX_FS is not set |
1032 | # CONFIG_OMFS_FS is not set | 1063 | # CONFIG_OMFS_FS is not set |
@@ -1123,6 +1154,7 @@ CONFIG_NLS_ISO8859_1=y | |||
1123 | # Library routines | 1154 | # Library routines |
1124 | # | 1155 | # |
1125 | CONFIG_BITREVERSE=y | 1156 | CONFIG_BITREVERSE=y |
1157 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1126 | # CONFIG_CRC_CCITT is not set | 1158 | # CONFIG_CRC_CCITT is not set |
1127 | # CONFIG_CRC16 is not set | 1159 | # CONFIG_CRC16 is not set |
1128 | # CONFIG_CRC_T10DIF is not set | 1160 | # CONFIG_CRC_T10DIF is not set |
@@ -1174,6 +1206,7 @@ CONFIG_DEBUG_INFO=y | |||
1174 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1206 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1175 | # CONFIG_DEBUG_LIST is not set | 1207 | # CONFIG_DEBUG_LIST is not set |
1176 | # CONFIG_DEBUG_SG is not set | 1208 | # CONFIG_DEBUG_SG is not set |
1209 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1177 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1210 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1178 | # CONFIG_RCU_TORTURE_TEST is not set | 1211 | # CONFIG_RCU_TORTURE_TEST is not set |
1179 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1212 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -1182,6 +1215,8 @@ CONFIG_DEBUG_INFO=y | |||
1182 | # CONFIG_FAULT_INJECTION is not set | 1215 | # CONFIG_FAULT_INJECTION is not set |
1183 | # CONFIG_LATENCYTOP is not set | 1216 | # CONFIG_LATENCYTOP is not set |
1184 | CONFIG_HAVE_FUNCTION_TRACER=y | 1217 | CONFIG_HAVE_FUNCTION_TRACER=y |
1218 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1219 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1185 | 1220 | ||
1186 | # | 1221 | # |
1187 | # Tracers | 1222 | # Tracers |
@@ -1190,11 +1225,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1190 | # CONFIG_SCHED_TRACER is not set | 1225 | # CONFIG_SCHED_TRACER is not set |
1191 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1226 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
1192 | # CONFIG_BOOT_TRACER is not set | 1227 | # CONFIG_BOOT_TRACER is not set |
1228 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1193 | # CONFIG_STACK_TRACER is not set | 1229 | # CONFIG_STACK_TRACER is not set |
1194 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1230 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1195 | # CONFIG_SAMPLES is not set | 1231 | # CONFIG_SAMPLES is not set |
1196 | CONFIG_HAVE_ARCH_KGDB=y | 1232 | CONFIG_HAVE_ARCH_KGDB=y |
1197 | # CONFIG_KGDB is not set | 1233 | # CONFIG_KGDB is not set |
1234 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1198 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1235 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1199 | # CONFIG_DEBUG_STACK_USAGE is not set | 1236 | # CONFIG_DEBUG_STACK_USAGE is not set |
1200 | # CONFIG_DEBUG_PAGEALLOC is not set | 1237 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -1221,11 +1258,15 @@ CONFIG_CRYPTO=y | |||
1221 | # | 1258 | # |
1222 | # CONFIG_CRYPTO_FIPS is not set | 1259 | # CONFIG_CRYPTO_FIPS is not set |
1223 | CONFIG_CRYPTO_ALGAPI=y | 1260 | CONFIG_CRYPTO_ALGAPI=y |
1224 | CONFIG_CRYPTO_AEAD=y | 1261 | CONFIG_CRYPTO_ALGAPI2=y |
1262 | CONFIG_CRYPTO_AEAD2=y | ||
1225 | CONFIG_CRYPTO_BLKCIPHER=y | 1263 | CONFIG_CRYPTO_BLKCIPHER=y |
1264 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1226 | CONFIG_CRYPTO_HASH=y | 1265 | CONFIG_CRYPTO_HASH=y |
1227 | CONFIG_CRYPTO_RNG=y | 1266 | CONFIG_CRYPTO_HASH2=y |
1267 | CONFIG_CRYPTO_RNG2=y | ||
1228 | CONFIG_CRYPTO_MANAGER=y | 1268 | CONFIG_CRYPTO_MANAGER=y |
1269 | CONFIG_CRYPTO_MANAGER2=y | ||
1229 | # CONFIG_CRYPTO_GF128MUL is not set | 1270 | # CONFIG_CRYPTO_GF128MUL is not set |
1230 | # CONFIG_CRYPTO_NULL is not set | 1271 | # CONFIG_CRYPTO_NULL is not set |
1231 | # CONFIG_CRYPTO_CRYPTD is not set | 1272 | # CONFIG_CRYPTO_CRYPTD is not set |
diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig index 5ff3de205d6a..81afc8b373d7 100644 --- a/arch/powerpc/configs/mpc5200_defconfig +++ b/arch/powerpc/configs/mpc5200_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.28-rc4 | 3 | # Linux kernel version: 2.6.29-rc2 |
4 | # Thu Nov 13 02:09:07 2008 | 4 | # Mon Jan 26 21:40:44 2009 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -43,7 +43,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y | |||
43 | CONFIG_PPC=y | 43 | CONFIG_PPC=y |
44 | CONFIG_EARLY_PRINTK=y | 44 | CONFIG_EARLY_PRINTK=y |
45 | CONFIG_GENERIC_NVRAM=y | 45 | CONFIG_GENERIC_NVRAM=y |
46 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | 46 | CONFIG_SCHED_OMIT_FRAME_POINTER=y |
47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | 47 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y |
48 | CONFIG_PPC_OF=y | 48 | CONFIG_PPC_OF=y |
49 | CONFIG_OF=y | 49 | CONFIG_OF=y |
@@ -72,10 +72,19 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
72 | # CONFIG_BSD_PROCESS_ACCT is not set | 72 | # CONFIG_BSD_PROCESS_ACCT is not set |
73 | # CONFIG_TASKSTATS is not set | 73 | # CONFIG_TASKSTATS is not set |
74 | # CONFIG_AUDIT is not set | 74 | # CONFIG_AUDIT is not set |
75 | |||
76 | # | ||
77 | # RCU Subsystem | ||
78 | # | ||
79 | CONFIG_CLASSIC_RCU=y | ||
80 | # CONFIG_TREE_RCU is not set | ||
81 | # CONFIG_PREEMPT_RCU is not set | ||
82 | # CONFIG_TREE_RCU_TRACE is not set | ||
83 | # CONFIG_PREEMPT_RCU_TRACE is not set | ||
75 | # CONFIG_IKCONFIG is not set | 84 | # CONFIG_IKCONFIG is not set |
76 | CONFIG_LOG_BUF_SHIFT=14 | 85 | CONFIG_LOG_BUF_SHIFT=14 |
77 | # CONFIG_CGROUPS is not set | ||
78 | # CONFIG_GROUP_SCHED is not set | 86 | # CONFIG_GROUP_SCHED is not set |
87 | # CONFIG_CGROUPS is not set | ||
79 | CONFIG_SYSFS_DEPRECATED=y | 88 | CONFIG_SYSFS_DEPRECATED=y |
80 | CONFIG_SYSFS_DEPRECATED_V2=y | 89 | CONFIG_SYSFS_DEPRECATED_V2=y |
81 | # CONFIG_RELAY is not set | 90 | # CONFIG_RELAY is not set |
@@ -108,7 +117,6 @@ CONFIG_SLUB_DEBUG=y | |||
108 | CONFIG_SLUB=y | 117 | CONFIG_SLUB=y |
109 | # CONFIG_SLOB is not set | 118 | # CONFIG_SLOB is not set |
110 | # CONFIG_PROFILING is not set | 119 | # CONFIG_PROFILING is not set |
111 | # CONFIG_MARKERS is not set | ||
112 | CONFIG_HAVE_OPROFILE=y | 120 | CONFIG_HAVE_OPROFILE=y |
113 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y | 121 | CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y |
114 | CONFIG_HAVE_IOREMAP_PROT=y | 122 | CONFIG_HAVE_IOREMAP_PROT=y |
@@ -119,7 +127,6 @@ CONFIG_HAVE_CLK=y | |||
119 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set | 127 | # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set |
120 | CONFIG_SLABINFO=y | 128 | CONFIG_SLABINFO=y |
121 | CONFIG_RT_MUTEXES=y | 129 | CONFIG_RT_MUTEXES=y |
122 | # CONFIG_TINY_SHMEM is not set | ||
123 | CONFIG_BASE_SMALL=0 | 130 | CONFIG_BASE_SMALL=0 |
124 | CONFIG_MODULES=y | 131 | CONFIG_MODULES=y |
125 | # CONFIG_MODULE_FORCE_LOAD is not set | 132 | # CONFIG_MODULE_FORCE_LOAD is not set |
@@ -127,11 +134,9 @@ CONFIG_MODULE_UNLOAD=y | |||
127 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 134 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
128 | # CONFIG_MODVERSIONS is not set | 135 | # CONFIG_MODVERSIONS is not set |
129 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 136 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
130 | CONFIG_KMOD=y | ||
131 | CONFIG_BLOCK=y | 137 | CONFIG_BLOCK=y |
132 | # CONFIG_LBD is not set | 138 | # CONFIG_LBD is not set |
133 | # CONFIG_BLK_DEV_IO_TRACE is not set | 139 | # CONFIG_BLK_DEV_IO_TRACE is not set |
134 | # CONFIG_LSF is not set | ||
135 | # CONFIG_BLK_DEV_BSG is not set | 140 | # CONFIG_BLK_DEV_BSG is not set |
136 | # CONFIG_BLK_DEV_INTEGRITY is not set | 141 | # CONFIG_BLK_DEV_INTEGRITY is not set |
137 | 142 | ||
@@ -147,7 +152,6 @@ CONFIG_DEFAULT_AS=y | |||
147 | # CONFIG_DEFAULT_CFQ is not set | 152 | # CONFIG_DEFAULT_CFQ is not set |
148 | # CONFIG_DEFAULT_NOOP is not set | 153 | # CONFIG_DEFAULT_NOOP is not set |
149 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 154 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
150 | CONFIG_CLASSIC_RCU=y | ||
151 | CONFIG_FREEZER=y | 155 | CONFIG_FREEZER=y |
152 | 156 | ||
153 | # | 157 | # |
@@ -192,7 +196,7 @@ CONFIG_RTAS_PROC=y | |||
192 | CONFIG_PPC_BESTCOMM=y | 196 | CONFIG_PPC_BESTCOMM=y |
193 | CONFIG_PPC_BESTCOMM_ATA=y | 197 | CONFIG_PPC_BESTCOMM_ATA=y |
194 | CONFIG_PPC_BESTCOMM_FEC=y | 198 | CONFIG_PPC_BESTCOMM_FEC=y |
195 | CONFIG_PPC_BESTCOMM_GEN_BD=y | 199 | # CONFIG_SIMPLE_GPIO is not set |
196 | 200 | ||
197 | # | 201 | # |
198 | # Kernel options | 202 | # Kernel options |
@@ -220,6 +224,7 @@ CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | |||
220 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 224 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
221 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 225 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
222 | # CONFIG_KEXEC is not set | 226 | # CONFIG_KEXEC is not set |
227 | # CONFIG_CRASH_DUMP is not set | ||
223 | CONFIG_ARCH_FLATMEM_ENABLE=y | 228 | CONFIG_ARCH_FLATMEM_ENABLE=y |
224 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 229 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
225 | CONFIG_SELECT_MEMORY_MODEL=y | 230 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -231,12 +236,14 @@ CONFIG_FLAT_NODE_MEM_MAP=y | |||
231 | CONFIG_PAGEFLAGS_EXTENDED=y | 236 | CONFIG_PAGEFLAGS_EXTENDED=y |
232 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 237 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
233 | CONFIG_MIGRATION=y | 238 | CONFIG_MIGRATION=y |
234 | # CONFIG_RESOURCES_64BIT is not set | ||
235 | # CONFIG_PHYS_ADDR_T_64BIT is not set | 239 | # CONFIG_PHYS_ADDR_T_64BIT is not set |
236 | CONFIG_ZONE_DMA_FLAG=1 | 240 | CONFIG_ZONE_DMA_FLAG=1 |
237 | CONFIG_BOUNCE=y | 241 | CONFIG_BOUNCE=y |
238 | CONFIG_VIRT_TO_BUS=y | 242 | CONFIG_VIRT_TO_BUS=y |
239 | CONFIG_UNEVICTABLE_LRU=y | 243 | CONFIG_UNEVICTABLE_LRU=y |
244 | CONFIG_PPC_4K_PAGES=y | ||
245 | # CONFIG_PPC_16K_PAGES is not set | ||
246 | # CONFIG_PPC_64K_PAGES is not set | ||
240 | CONFIG_FORCE_MAX_ZONEORDER=11 | 247 | CONFIG_FORCE_MAX_ZONEORDER=11 |
241 | CONFIG_PROC_DEVICETREE=y | 248 | CONFIG_PROC_DEVICETREE=y |
242 | # CONFIG_CMDLINE_BOOL is not set | 249 | # CONFIG_CMDLINE_BOOL is not set |
@@ -264,6 +271,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y | |||
264 | # CONFIG_PCI_MSI is not set | 271 | # CONFIG_PCI_MSI is not set |
265 | CONFIG_PCI_LEGACY=y | 272 | CONFIG_PCI_LEGACY=y |
266 | # CONFIG_PCI_DEBUG is not set | 273 | # CONFIG_PCI_DEBUG is not set |
274 | # CONFIG_PCI_STUB is not set | ||
267 | # CONFIG_PCCARD is not set | 275 | # CONFIG_PCCARD is not set |
268 | # CONFIG_HOTPLUG_PCI is not set | 276 | # CONFIG_HOTPLUG_PCI is not set |
269 | # CONFIG_HAS_RAPIDIO is not set | 277 | # CONFIG_HAS_RAPIDIO is not set |
@@ -286,6 +294,7 @@ CONFIG_NET=y | |||
286 | # | 294 | # |
287 | # Networking options | 295 | # Networking options |
288 | # | 296 | # |
297 | CONFIG_COMPAT_NET_DEV_OPS=y | ||
289 | CONFIG_PACKET=y | 298 | CONFIG_PACKET=y |
290 | # CONFIG_PACKET_MMAP is not set | 299 | # CONFIG_PACKET_MMAP is not set |
291 | CONFIG_UNIX=y | 300 | CONFIG_UNIX=y |
@@ -342,6 +351,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
342 | # CONFIG_ECONET is not set | 351 | # CONFIG_ECONET is not set |
343 | # CONFIG_WAN_ROUTER is not set | 352 | # CONFIG_WAN_ROUTER is not set |
344 | # CONFIG_NET_SCHED is not set | 353 | # CONFIG_NET_SCHED is not set |
354 | # CONFIG_DCB is not set | ||
345 | 355 | ||
346 | # | 356 | # |
347 | # Network testing | 357 | # Network testing |
@@ -354,6 +364,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
354 | # CONFIG_AF_RXRPC is not set | 364 | # CONFIG_AF_RXRPC is not set |
355 | # CONFIG_PHONET is not set | 365 | # CONFIG_PHONET is not set |
356 | # CONFIG_WIRELESS is not set | 366 | # CONFIG_WIRELESS is not set |
367 | # CONFIG_WIMAX is not set | ||
357 | # CONFIG_RFKILL is not set | 368 | # CONFIG_RFKILL is not set |
358 | # CONFIG_NET_9P is not set | 369 | # CONFIG_NET_9P is not set |
359 | 370 | ||
@@ -376,6 +387,7 @@ CONFIG_MTD=y | |||
376 | # CONFIG_MTD_DEBUG is not set | 387 | # CONFIG_MTD_DEBUG is not set |
377 | CONFIG_MTD_CONCAT=y | 388 | CONFIG_MTD_CONCAT=y |
378 | CONFIG_MTD_PARTITIONS=y | 389 | CONFIG_MTD_PARTITIONS=y |
390 | # CONFIG_MTD_TESTS is not set | ||
379 | # CONFIG_MTD_REDBOOT_PARTS is not set | 391 | # CONFIG_MTD_REDBOOT_PARTS is not set |
380 | CONFIG_MTD_CMDLINE_PARTS=y | 392 | CONFIG_MTD_CMDLINE_PARTS=y |
381 | # CONFIG_MTD_OF_PARTS is not set | 393 | # CONFIG_MTD_OF_PARTS is not set |
@@ -447,6 +459,12 @@ CONFIG_MTD_PHYSMAP_OF=y | |||
447 | # CONFIG_MTD_ONENAND is not set | 459 | # CONFIG_MTD_ONENAND is not set |
448 | 460 | ||
449 | # | 461 | # |
462 | # LPDDR flash memory drivers | ||
463 | # | ||
464 | # CONFIG_MTD_LPDDR is not set | ||
465 | # CONFIG_MTD_QINFO_PROBE is not set | ||
466 | |||
467 | # | ||
450 | # UBI - Unsorted block images | 468 | # UBI - Unsorted block images |
451 | # | 469 | # |
452 | # CONFIG_MTD_UBI is not set | 470 | # CONFIG_MTD_UBI is not set |
@@ -474,13 +492,19 @@ CONFIG_BLK_DEV_RAM_SIZE=32768 | |||
474 | # CONFIG_BLK_DEV_HD is not set | 492 | # CONFIG_BLK_DEV_HD is not set |
475 | CONFIG_MISC_DEVICES=y | 493 | CONFIG_MISC_DEVICES=y |
476 | # CONFIG_PHANTOM is not set | 494 | # CONFIG_PHANTOM is not set |
477 | # CONFIG_EEPROM_93CX6 is not set | ||
478 | # CONFIG_SGI_IOC4 is not set | 495 | # CONFIG_SGI_IOC4 is not set |
479 | # CONFIG_TIFM_CORE is not set | 496 | # CONFIG_TIFM_CORE is not set |
480 | # CONFIG_ICS932S401 is not set | 497 | # CONFIG_ICS932S401 is not set |
481 | # CONFIG_ENCLOSURE_SERVICES is not set | 498 | # CONFIG_ENCLOSURE_SERVICES is not set |
482 | # CONFIG_HP_ILO is not set | 499 | # CONFIG_HP_ILO is not set |
483 | # CONFIG_C2PORT is not set | 500 | # CONFIG_C2PORT is not set |
501 | |||
502 | # | ||
503 | # EEPROM support | ||
504 | # | ||
505 | # CONFIG_EEPROM_AT24 is not set | ||
506 | # CONFIG_EEPROM_LEGACY is not set | ||
507 | # CONFIG_EEPROM_93CX6 is not set | ||
484 | CONFIG_HAVE_IDE=y | 508 | CONFIG_HAVE_IDE=y |
485 | # CONFIG_IDE is not set | 509 | # CONFIG_IDE is not set |
486 | 510 | ||
@@ -539,6 +563,8 @@ CONFIG_SCSI_LOWLEVEL=y | |||
539 | # CONFIG_MEGARAID_SAS is not set | 563 | # CONFIG_MEGARAID_SAS is not set |
540 | # CONFIG_SCSI_HPTIOP is not set | 564 | # CONFIG_SCSI_HPTIOP is not set |
541 | # CONFIG_SCSI_BUSLOGIC is not set | 565 | # CONFIG_SCSI_BUSLOGIC is not set |
566 | # CONFIG_LIBFC is not set | ||
567 | # CONFIG_FCOE is not set | ||
542 | # CONFIG_SCSI_DMX3191D is not set | 568 | # CONFIG_SCSI_DMX3191D is not set |
543 | # CONFIG_SCSI_EATA is not set | 569 | # CONFIG_SCSI_EATA is not set |
544 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 570 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
@@ -659,6 +685,9 @@ CONFIG_PHYLIB=y | |||
659 | # CONFIG_BROADCOM_PHY is not set | 685 | # CONFIG_BROADCOM_PHY is not set |
660 | # CONFIG_ICPLUS_PHY is not set | 686 | # CONFIG_ICPLUS_PHY is not set |
661 | # CONFIG_REALTEK_PHY is not set | 687 | # CONFIG_REALTEK_PHY is not set |
688 | # CONFIG_NATIONAL_PHY is not set | ||
689 | # CONFIG_STE10XP is not set | ||
690 | # CONFIG_LSI_ET1011C_PHY is not set | ||
662 | # CONFIG_FIXED_PHY is not set | 691 | # CONFIG_FIXED_PHY is not set |
663 | # CONFIG_MDIO_BITBANG is not set | 692 | # CONFIG_MDIO_BITBANG is not set |
664 | CONFIG_NET_ETHERNET=y | 693 | CONFIG_NET_ETHERNET=y |
@@ -693,6 +722,10 @@ CONFIG_FEC_MPC52xx_MDIO=y | |||
693 | # CONFIG_IWLWIFI_LEDS is not set | 722 | # CONFIG_IWLWIFI_LEDS is not set |
694 | 723 | ||
695 | # | 724 | # |
725 | # Enable WiMAX (Networking options) to see the WiMAX drivers | ||
726 | # | ||
727 | |||
728 | # | ||
696 | # USB Network Adapters | 729 | # USB Network Adapters |
697 | # | 730 | # |
698 | # CONFIG_USB_CATC is not set | 731 | # CONFIG_USB_CATC is not set |
@@ -774,9 +807,11 @@ CONFIG_SERIAL_MPC52xx_CONSOLE=y | |||
774 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | 807 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 |
775 | # CONFIG_SERIAL_JSM is not set | 808 | # CONFIG_SERIAL_JSM is not set |
776 | CONFIG_UNIX98_PTYS=y | 809 | CONFIG_UNIX98_PTYS=y |
810 | # CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set | ||
777 | CONFIG_LEGACY_PTYS=y | 811 | CONFIG_LEGACY_PTYS=y |
778 | CONFIG_LEGACY_PTY_COUNT=256 | 812 | CONFIG_LEGACY_PTY_COUNT=256 |
779 | # CONFIG_HVC_RTAS is not set | 813 | # CONFIG_HVC_RTAS is not set |
814 | # CONFIG_HVC_UDBG is not set | ||
780 | # CONFIG_IPMI_HANDLER is not set | 815 | # CONFIG_IPMI_HANDLER is not set |
781 | # CONFIG_HW_RANDOM is not set | 816 | # CONFIG_HW_RANDOM is not set |
782 | # CONFIG_NVRAM is not set | 817 | # CONFIG_NVRAM is not set |
@@ -844,8 +879,6 @@ CONFIG_I2C_MPC=y | |||
844 | # Miscellaneous I2C Chip support | 879 | # Miscellaneous I2C Chip support |
845 | # | 880 | # |
846 | # CONFIG_DS1682 is not set | 881 | # CONFIG_DS1682 is not set |
847 | # CONFIG_EEPROM_AT24 is not set | ||
848 | # CONFIG_EEPROM_LEGACY is not set | ||
849 | # CONFIG_SENSORS_PCF8574 is not set | 882 | # CONFIG_SENSORS_PCF8574 is not set |
850 | # CONFIG_PCF8575 is not set | 883 | # CONFIG_PCF8575 is not set |
851 | # CONFIG_SENSORS_PCA9539 is not set | 884 | # CONFIG_SENSORS_PCA9539 is not set |
@@ -874,6 +907,7 @@ CONFIG_HWMON=y | |||
874 | # CONFIG_SENSORS_ADT7462 is not set | 907 | # CONFIG_SENSORS_ADT7462 is not set |
875 | # CONFIG_SENSORS_ADT7470 is not set | 908 | # CONFIG_SENSORS_ADT7470 is not set |
876 | # CONFIG_SENSORS_ADT7473 is not set | 909 | # CONFIG_SENSORS_ADT7473 is not set |
910 | # CONFIG_SENSORS_ADT7475 is not set | ||
877 | # CONFIG_SENSORS_ATXP1 is not set | 911 | # CONFIG_SENSORS_ATXP1 is not set |
878 | # CONFIG_SENSORS_DS1621 is not set | 912 | # CONFIG_SENSORS_DS1621 is not set |
879 | # CONFIG_SENSORS_I5K_AMB is not set | 913 | # CONFIG_SENSORS_I5K_AMB is not set |
@@ -894,6 +928,7 @@ CONFIG_HWMON=y | |||
894 | # CONFIG_SENSORS_LM90 is not set | 928 | # CONFIG_SENSORS_LM90 is not set |
895 | # CONFIG_SENSORS_LM92 is not set | 929 | # CONFIG_SENSORS_LM92 is not set |
896 | # CONFIG_SENSORS_LM93 is not set | 930 | # CONFIG_SENSORS_LM93 is not set |
931 | # CONFIG_SENSORS_LTC4245 is not set | ||
897 | # CONFIG_SENSORS_MAX1619 is not set | 932 | # CONFIG_SENSORS_MAX1619 is not set |
898 | # CONFIG_SENSORS_MAX6650 is not set | 933 | # CONFIG_SENSORS_MAX6650 is not set |
899 | # CONFIG_SENSORS_PC87360 is not set | 934 | # CONFIG_SENSORS_PC87360 is not set |
@@ -953,10 +988,12 @@ CONFIG_SSB_POSSIBLE=y | |||
953 | # CONFIG_MFD_CORE is not set | 988 | # CONFIG_MFD_CORE is not set |
954 | # CONFIG_MFD_SM501 is not set | 989 | # CONFIG_MFD_SM501 is not set |
955 | # CONFIG_HTC_PASIC3 is not set | 990 | # CONFIG_HTC_PASIC3 is not set |
991 | # CONFIG_TWL4030_CORE is not set | ||
956 | # CONFIG_MFD_TMIO is not set | 992 | # CONFIG_MFD_TMIO is not set |
957 | # CONFIG_PMIC_DA903X is not set | 993 | # CONFIG_PMIC_DA903X is not set |
958 | # CONFIG_MFD_WM8400 is not set | 994 | # CONFIG_MFD_WM8400 is not set |
959 | # CONFIG_MFD_WM8350_I2C is not set | 995 | # CONFIG_MFD_WM8350_I2C is not set |
996 | # CONFIG_MFD_PCF50633 is not set | ||
960 | # CONFIG_REGULATOR is not set | 997 | # CONFIG_REGULATOR is not set |
961 | 998 | ||
962 | # | 999 | # |
@@ -1051,7 +1088,7 @@ CONFIG_LCD_CLASS_DEVICE=m | |||
1051 | # CONFIG_LCD_ILI9320 is not set | 1088 | # CONFIG_LCD_ILI9320 is not set |
1052 | # CONFIG_LCD_PLATFORM is not set | 1089 | # CONFIG_LCD_PLATFORM is not set |
1053 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | 1090 | CONFIG_BACKLIGHT_CLASS_DEVICE=y |
1054 | # CONFIG_BACKLIGHT_CORGI is not set | 1091 | CONFIG_BACKLIGHT_GENERIC=y |
1055 | 1092 | ||
1056 | # | 1093 | # |
1057 | # Display device support | 1094 | # Display device support |
@@ -1093,21 +1130,22 @@ CONFIG_HID_COMPAT=y | |||
1093 | CONFIG_HID_A4TECH=y | 1130 | CONFIG_HID_A4TECH=y |
1094 | # CONFIG_HID_APPLE is not set | 1131 | # CONFIG_HID_APPLE is not set |
1095 | CONFIG_HID_BELKIN=y | 1132 | CONFIG_HID_BELKIN=y |
1096 | CONFIG_HID_BRIGHT=y | ||
1097 | CONFIG_HID_CHERRY=y | 1133 | CONFIG_HID_CHERRY=y |
1098 | # CONFIG_HID_CHICONY is not set | 1134 | # CONFIG_HID_CHICONY is not set |
1099 | CONFIG_HID_CYPRESS=y | 1135 | CONFIG_HID_CYPRESS=y |
1100 | CONFIG_HID_DELL=y | ||
1101 | CONFIG_HID_EZKEY=y | 1136 | CONFIG_HID_EZKEY=y |
1102 | # CONFIG_HID_GYRATION is not set | 1137 | # CONFIG_HID_GYRATION is not set |
1103 | # CONFIG_HID_LOGITECH is not set | 1138 | # CONFIG_HID_LOGITECH is not set |
1104 | # CONFIG_HID_MICROSOFT is not set | 1139 | # CONFIG_HID_MICROSOFT is not set |
1105 | # CONFIG_HID_MONTEREY is not set | 1140 | # CONFIG_HID_MONTEREY is not set |
1141 | # CONFIG_HID_NTRIG is not set | ||
1106 | # CONFIG_HID_PANTHERLORD is not set | 1142 | # CONFIG_HID_PANTHERLORD is not set |
1107 | # CONFIG_HID_PETALYNX is not set | 1143 | # CONFIG_HID_PETALYNX is not set |
1108 | # CONFIG_HID_SAMSUNG is not set | 1144 | # CONFIG_HID_SAMSUNG is not set |
1109 | # CONFIG_HID_SONY is not set | 1145 | # CONFIG_HID_SONY is not set |
1110 | # CONFIG_HID_SUNPLUS is not set | 1146 | # CONFIG_HID_SUNPLUS is not set |
1147 | # CONFIG_GREENASIA_FF is not set | ||
1148 | # CONFIG_HID_TOPSEED is not set | ||
1111 | # CONFIG_THRUSTMASTER_FF is not set | 1149 | # CONFIG_THRUSTMASTER_FF is not set |
1112 | # CONFIG_ZEROPLUS_FF is not set | 1150 | # CONFIG_ZEROPLUS_FF is not set |
1113 | CONFIG_USB_SUPPORT=y | 1151 | CONFIG_USB_SUPPORT=y |
@@ -1137,6 +1175,7 @@ CONFIG_USB_MON=y | |||
1137 | # | 1175 | # |
1138 | # CONFIG_USB_C67X00_HCD is not set | 1176 | # CONFIG_USB_C67X00_HCD is not set |
1139 | # CONFIG_USB_EHCI_HCD is not set | 1177 | # CONFIG_USB_EHCI_HCD is not set |
1178 | # CONFIG_USB_OXU210HP_HCD is not set | ||
1140 | # CONFIG_USB_ISP116X_HCD is not set | 1179 | # CONFIG_USB_ISP116X_HCD is not set |
1141 | # CONFIG_USB_ISP1760_HCD is not set | 1180 | # CONFIG_USB_ISP1760_HCD is not set |
1142 | CONFIG_USB_OHCI_HCD=y | 1181 | CONFIG_USB_OHCI_HCD=y |
@@ -1164,18 +1203,17 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
1164 | # CONFIG_USB_TMC is not set | 1203 | # CONFIG_USB_TMC is not set |
1165 | 1204 | ||
1166 | # | 1205 | # |
1167 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1206 | # NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed; |
1168 | # | 1207 | # |
1169 | 1208 | ||
1170 | # | 1209 | # |
1171 | # may also be needed; see USB_STORAGE Help for more information | 1210 | # see USB_STORAGE Help for more information |
1172 | # | 1211 | # |
1173 | CONFIG_USB_STORAGE=y | 1212 | CONFIG_USB_STORAGE=y |
1174 | # CONFIG_USB_STORAGE_DEBUG is not set | 1213 | # CONFIG_USB_STORAGE_DEBUG is not set |
1175 | # CONFIG_USB_STORAGE_DATAFAB is not set | 1214 | # CONFIG_USB_STORAGE_DATAFAB is not set |
1176 | # CONFIG_USB_STORAGE_FREECOM is not set | 1215 | # CONFIG_USB_STORAGE_FREECOM is not set |
1177 | # CONFIG_USB_STORAGE_ISD200 is not set | 1216 | # CONFIG_USB_STORAGE_ISD200 is not set |
1178 | # CONFIG_USB_STORAGE_DPCM is not set | ||
1179 | # CONFIG_USB_STORAGE_USBAT is not set | 1217 | # CONFIG_USB_STORAGE_USBAT is not set |
1180 | # CONFIG_USB_STORAGE_SDDR09 is not set | 1218 | # CONFIG_USB_STORAGE_SDDR09 is not set |
1181 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1219 | # CONFIG_USB_STORAGE_SDDR55 is not set |
@@ -1222,6 +1260,10 @@ CONFIG_USB_STORAGE=y | |||
1222 | # CONFIG_USB_ISIGHTFW is not set | 1260 | # CONFIG_USB_ISIGHTFW is not set |
1223 | # CONFIG_USB_VST is not set | 1261 | # CONFIG_USB_VST is not set |
1224 | # CONFIG_USB_GADGET is not set | 1262 | # CONFIG_USB_GADGET is not set |
1263 | |||
1264 | # | ||
1265 | # OTG and related infrastructure | ||
1266 | # | ||
1225 | # CONFIG_UWB is not set | 1267 | # CONFIG_UWB is not set |
1226 | # CONFIG_MMC is not set | 1268 | # CONFIG_MMC is not set |
1227 | # CONFIG_MEMSTICK is not set | 1269 | # CONFIG_MEMSTICK is not set |
@@ -1243,7 +1285,6 @@ CONFIG_NEW_LEDS=y | |||
1243 | # CONFIG_DMADEVICES is not set | 1285 | # CONFIG_DMADEVICES is not set |
1244 | # CONFIG_UIO is not set | 1286 | # CONFIG_UIO is not set |
1245 | # CONFIG_STAGING is not set | 1287 | # CONFIG_STAGING is not set |
1246 | CONFIG_STAGING_EXCLUDE_BUILD=y | ||
1247 | 1288 | ||
1248 | # | 1289 | # |
1249 | # File systems | 1290 | # File systems |
@@ -1264,6 +1305,7 @@ CONFIG_FS_MBCACHE=y | |||
1264 | CONFIG_FILE_LOCKING=y | 1305 | CONFIG_FILE_LOCKING=y |
1265 | # CONFIG_XFS_FS is not set | 1306 | # CONFIG_XFS_FS is not set |
1266 | # CONFIG_OCFS2_FS is not set | 1307 | # CONFIG_OCFS2_FS is not set |
1308 | # CONFIG_BTRFS_FS is not set | ||
1267 | CONFIG_DNOTIFY=y | 1309 | CONFIG_DNOTIFY=y |
1268 | CONFIG_INOTIFY=y | 1310 | CONFIG_INOTIFY=y |
1269 | CONFIG_INOTIFY_USER=y | 1311 | CONFIG_INOTIFY_USER=y |
@@ -1300,10 +1342,7 @@ CONFIG_TMPFS=y | |||
1300 | # CONFIG_TMPFS_POSIX_ACL is not set | 1342 | # CONFIG_TMPFS_POSIX_ACL is not set |
1301 | # CONFIG_HUGETLB_PAGE is not set | 1343 | # CONFIG_HUGETLB_PAGE is not set |
1302 | # CONFIG_CONFIGFS_FS is not set | 1344 | # CONFIG_CONFIGFS_FS is not set |
1303 | 1345 | CONFIG_MISC_FILESYSTEMS=y | |
1304 | # | ||
1305 | # Miscellaneous filesystems | ||
1306 | # | ||
1307 | # CONFIG_ADFS_FS is not set | 1346 | # CONFIG_ADFS_FS is not set |
1308 | # CONFIG_AFFS_FS is not set | 1347 | # CONFIG_AFFS_FS is not set |
1309 | # CONFIG_HFS_FS is not set | 1348 | # CONFIG_HFS_FS is not set |
@@ -1323,6 +1362,7 @@ CONFIG_JFFS2_ZLIB=y | |||
1323 | CONFIG_JFFS2_RTIME=y | 1362 | CONFIG_JFFS2_RTIME=y |
1324 | # CONFIG_JFFS2_RUBIN is not set | 1363 | # CONFIG_JFFS2_RUBIN is not set |
1325 | CONFIG_CRAMFS=y | 1364 | CONFIG_CRAMFS=y |
1365 | # CONFIG_SQUASHFS is not set | ||
1326 | # CONFIG_VXFS_FS is not set | 1366 | # CONFIG_VXFS_FS is not set |
1327 | # CONFIG_MINIX_FS is not set | 1367 | # CONFIG_MINIX_FS is not set |
1328 | # CONFIG_OMFS_FS is not set | 1368 | # CONFIG_OMFS_FS is not set |
@@ -1403,6 +1443,7 @@ CONFIG_NLS_ISO8859_1=y | |||
1403 | # Library routines | 1443 | # Library routines |
1404 | # | 1444 | # |
1405 | CONFIG_BITREVERSE=y | 1445 | CONFIG_BITREVERSE=y |
1446 | CONFIG_GENERIC_FIND_LAST_BIT=y | ||
1406 | # CONFIG_CRC_CCITT is not set | 1447 | # CONFIG_CRC_CCITT is not set |
1407 | # CONFIG_CRC16 is not set | 1448 | # CONFIG_CRC16 is not set |
1408 | # CONFIG_CRC_T10DIF is not set | 1449 | # CONFIG_CRC_T10DIF is not set |
@@ -1454,6 +1495,7 @@ CONFIG_DEBUG_INFO=y | |||
1454 | # CONFIG_DEBUG_MEMORY_INIT is not set | 1495 | # CONFIG_DEBUG_MEMORY_INIT is not set |
1455 | # CONFIG_DEBUG_LIST is not set | 1496 | # CONFIG_DEBUG_LIST is not set |
1456 | # CONFIG_DEBUG_SG is not set | 1497 | # CONFIG_DEBUG_SG is not set |
1498 | # CONFIG_DEBUG_NOTIFIERS is not set | ||
1457 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1499 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1458 | # CONFIG_RCU_TORTURE_TEST is not set | 1500 | # CONFIG_RCU_TORTURE_TEST is not set |
1459 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set | 1501 | # CONFIG_RCU_CPU_STALL_DETECTOR is not set |
@@ -1462,6 +1504,8 @@ CONFIG_DEBUG_INFO=y | |||
1462 | # CONFIG_FAULT_INJECTION is not set | 1504 | # CONFIG_FAULT_INJECTION is not set |
1463 | # CONFIG_LATENCYTOP is not set | 1505 | # CONFIG_LATENCYTOP is not set |
1464 | CONFIG_HAVE_FUNCTION_TRACER=y | 1506 | CONFIG_HAVE_FUNCTION_TRACER=y |
1507 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1508 | CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y | ||
1465 | 1509 | ||
1466 | # | 1510 | # |
1467 | # Tracers | 1511 | # Tracers |
@@ -1470,11 +1514,13 @@ CONFIG_HAVE_FUNCTION_TRACER=y | |||
1470 | # CONFIG_SCHED_TRACER is not set | 1514 | # CONFIG_SCHED_TRACER is not set |
1471 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | 1515 | # CONFIG_CONTEXT_SWITCH_TRACER is not set |
1472 | # CONFIG_BOOT_TRACER is not set | 1516 | # CONFIG_BOOT_TRACER is not set |
1517 | # CONFIG_TRACE_BRANCH_PROFILING is not set | ||
1473 | # CONFIG_STACK_TRACER is not set | 1518 | # CONFIG_STACK_TRACER is not set |
1474 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set | 1519 | # CONFIG_DYNAMIC_PRINTK_DEBUG is not set |
1475 | # CONFIG_SAMPLES is not set | 1520 | # CONFIG_SAMPLES is not set |
1476 | CONFIG_HAVE_ARCH_KGDB=y | 1521 | CONFIG_HAVE_ARCH_KGDB=y |
1477 | # CONFIG_KGDB is not set | 1522 | # CONFIG_KGDB is not set |
1523 | CONFIG_PRINT_STACK_DEPTH=64 | ||
1478 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 1524 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
1479 | # CONFIG_DEBUG_STACK_USAGE is not set | 1525 | # CONFIG_DEBUG_STACK_USAGE is not set |
1480 | # CONFIG_DEBUG_PAGEALLOC is not set | 1526 | # CONFIG_DEBUG_PAGEALLOC is not set |
@@ -1501,11 +1547,15 @@ CONFIG_CRYPTO=y | |||
1501 | # | 1547 | # |
1502 | # CONFIG_CRYPTO_FIPS is not set | 1548 | # CONFIG_CRYPTO_FIPS is not set |
1503 | CONFIG_CRYPTO_ALGAPI=y | 1549 | CONFIG_CRYPTO_ALGAPI=y |
1504 | CONFIG_CRYPTO_AEAD=y | 1550 | CONFIG_CRYPTO_ALGAPI2=y |
1551 | CONFIG_CRYPTO_AEAD2=y | ||
1505 | CONFIG_CRYPTO_BLKCIPHER=y | 1552 | CONFIG_CRYPTO_BLKCIPHER=y |
1553 | CONFIG_CRYPTO_BLKCIPHER2=y | ||
1506 | CONFIG_CRYPTO_HASH=y | 1554 | CONFIG_CRYPTO_HASH=y |
1507 | CONFIG_CRYPTO_RNG=y | 1555 | CONFIG_CRYPTO_HASH2=y |
1556 | CONFIG_CRYPTO_RNG2=y | ||
1508 | CONFIG_CRYPTO_MANAGER=y | 1557 | CONFIG_CRYPTO_MANAGER=y |
1558 | CONFIG_CRYPTO_MANAGER2=y | ||
1509 | # CONFIG_CRYPTO_GF128MUL is not set | 1559 | # CONFIG_CRYPTO_GF128MUL is not set |
1510 | # CONFIG_CRYPTO_NULL is not set | 1560 | # CONFIG_CRYPTO_NULL is not set |
1511 | # CONFIG_CRYPTO_CRYPTD is not set | 1561 | # CONFIG_CRYPTO_CRYPTD is not set |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index da5a3855a0c4..19b12d2cbb4b 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -16,8 +16,6 @@ | |||
16 | * 2 of the License, or (at your option) any later version. | 16 | * 2 of the License, or (at your option) any later version. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define DEBUG | ||
20 | |||
21 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
22 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
23 | #include <linux/string.h> | 21 | #include <linux/string.h> |
@@ -258,7 +256,8 @@ int pci_read_irq_line(struct pci_dev *pci_dev) | |||
258 | } else { | 256 | } else { |
259 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", | 257 | pr_debug(" Got one, spec %d cells (0x%08x 0x%08x...) on %s\n", |
260 | oirq.size, oirq.specifier[0], oirq.specifier[1], | 258 | oirq.size, oirq.specifier[0], oirq.specifier[1], |
261 | oirq.controller->full_name); | 259 | oirq.controller ? oirq.controller->full_name : |
260 | "<default>"); | ||
262 | 261 | ||
263 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | 262 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, |
264 | oirq.size); | 263 | oirq.size); |
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_pci.c b/arch/powerpc/platforms/52xx/mpc52xx_pci.c index c3f2c21024e3..87ff522f28b5 100644 --- a/arch/powerpc/platforms/52xx/mpc52xx_pci.c +++ b/arch/powerpc/platforms/52xx/mpc52xx_pci.c | |||
@@ -20,14 +20,6 @@ | |||
20 | 20 | ||
21 | 21 | ||
22 | /* ======================================================================== */ | 22 | /* ======================================================================== */ |
23 | /* PCI windows config */ | ||
24 | /* ======================================================================== */ | ||
25 | |||
26 | #define MPC52xx_PCI_TARGET_IO 0xf0000000 | ||
27 | #define MPC52xx_PCI_TARGET_MEM 0x00000000 | ||
28 | |||
29 | |||
30 | /* ======================================================================== */ | ||
31 | /* Structures mapping & Defines for PCI Unit */ | 23 | /* Structures mapping & Defines for PCI Unit */ |
32 | /* ======================================================================== */ | 24 | /* ======================================================================== */ |
33 | 25 | ||
@@ -244,7 +236,7 @@ static struct pci_ops mpc52xx_pci_ops = { | |||
244 | 236 | ||
245 | static void __init | 237 | static void __init |
246 | mpc52xx_pci_setup(struct pci_controller *hose, | 238 | mpc52xx_pci_setup(struct pci_controller *hose, |
247 | struct mpc52xx_pci __iomem *pci_regs) | 239 | struct mpc52xx_pci __iomem *pci_regs, phys_addr_t pci_phys) |
248 | { | 240 | { |
249 | struct resource *res; | 241 | struct resource *res; |
250 | u32 tmp; | 242 | u32 tmp; |
@@ -314,10 +306,14 @@ mpc52xx_pci_setup(struct pci_controller *hose, | |||
314 | /* Set all the IWCR fields at once; they're in the same reg */ | 306 | /* Set all the IWCR fields at once; they're in the same reg */ |
315 | out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2)); | 307 | out_be32(&pci_regs->iwcr, MPC52xx_PCI_IWCR_PACK(iwcr0, iwcr1, iwcr2)); |
316 | 308 | ||
317 | out_be32(&pci_regs->tbatr0, | 309 | /* Map IMMR onto PCI bus */ |
318 | MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_IO ); | 310 | pci_phys &= 0xfffc0000; /* bar0 has only 14 significant bits */ |
319 | out_be32(&pci_regs->tbatr1, | 311 | out_be32(&pci_regs->tbatr0, MPC52xx_PCI_TBATR_ENABLE | pci_phys); |
320 | MPC52xx_PCI_TBATR_ENABLE | MPC52xx_PCI_TARGET_MEM ); | 312 | out_be32(&pci_regs->bar0, PCI_BASE_ADDRESS_MEM_PREFETCH | pci_phys); |
313 | |||
314 | /* Map memory onto PCI bus */ | ||
315 | out_be32(&pci_regs->tbatr1, MPC52xx_PCI_TBATR_ENABLE); | ||
316 | out_be32(&pci_regs->bar1, PCI_BASE_ADDRESS_MEM_PREFETCH); | ||
321 | 317 | ||
322 | out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8); | 318 | out_be32(&pci_regs->tcr, MPC52xx_PCI_TCR_LD | MPC52xx_PCI_TCR_WCT8); |
323 | 319 | ||
@@ -414,7 +410,7 @@ mpc52xx_add_bridge(struct device_node *node) | |||
414 | 410 | ||
415 | /* Finish setting up PCI using values obtained by | 411 | /* Finish setting up PCI using values obtained by |
416 | * pci_proces_bridge_OF_ranges */ | 412 | * pci_proces_bridge_OF_ranges */ |
417 | mpc52xx_pci_setup(hose, pci_regs); | 413 | mpc52xx_pci_setup(hose, pci_regs, rsrc.start); |
418 | 414 | ||
419 | return 0; | 415 | return 0; |
420 | } | 416 | } |
diff --git a/arch/sparc/include/asm/cpudata_64.h b/arch/sparc/include/asm/cpudata_64.h index 7da7c13d23c4..a11b89ee9ef8 100644 --- a/arch/sparc/include/asm/cpudata_64.h +++ b/arch/sparc/include/asm/cpudata_64.h | |||
@@ -17,7 +17,7 @@ | |||
17 | typedef struct { | 17 | typedef struct { |
18 | /* Dcache line 1 */ | 18 | /* Dcache line 1 */ |
19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ | 19 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ |
20 | unsigned int __pad0; | 20 | unsigned int __nmi_count; |
21 | unsigned long clock_tick; /* %tick's per second */ | 21 | unsigned long clock_tick; /* %tick's per second */ |
22 | unsigned long __pad; | 22 | unsigned long __pad; |
23 | unsigned int __pad1; | 23 | unsigned int __pad1; |
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index d47d4a1955a9..1934f2cbf513 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -66,9 +66,6 @@ extern void virt_irq_free(unsigned int virt_irq); | |||
66 | extern void __init init_IRQ(void); | 66 | extern void __init init_IRQ(void); |
67 | extern void fixup_irqs(void); | 67 | extern void fixup_irqs(void); |
68 | 68 | ||
69 | extern int register_perfctr_intr(void (*handler)(struct pt_regs *)); | ||
70 | extern void release_perfctr_intr(void (*handler)(struct pt_regs *)); | ||
71 | |||
72 | static inline void set_softint(unsigned long bits) | 69 | static inline void set_softint(unsigned long bits) |
73 | { | 70 | { |
74 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" | 71 | __asm__ __volatile__("wr %0, 0x0, %%set_softint" |
@@ -98,5 +95,6 @@ void __trigger_all_cpu_backtrace(void); | |||
98 | extern void *hardirq_stack[NR_CPUS]; | 95 | extern void *hardirq_stack[NR_CPUS]; |
99 | extern void *softirq_stack[NR_CPUS]; | 96 | extern void *softirq_stack[NR_CPUS]; |
100 | #define __ARCH_HAS_DO_SOFTIRQ | 97 | #define __ARCH_HAS_DO_SOFTIRQ |
98 | #define ARCH_HAS_NMI_WATCHDOG | ||
101 | 99 | ||
102 | #endif | 100 | #endif |
diff --git a/arch/sparc/include/asm/kdebug_64.h b/arch/sparc/include/asm/kdebug_64.h index f905b773235a..feb3578e12c4 100644 --- a/arch/sparc/include/asm/kdebug_64.h +++ b/arch/sparc/include/asm/kdebug_64.h | |||
@@ -14,6 +14,8 @@ enum die_val { | |||
14 | DIE_TRAP, | 14 | DIE_TRAP, |
15 | DIE_TRAP_TL1, | 15 | DIE_TRAP_TL1, |
16 | DIE_CALL, | 16 | DIE_CALL, |
17 | DIE_NMI, | ||
18 | DIE_NMIWATCHDOG, | ||
17 | }; | 19 | }; |
18 | 20 | ||
19 | #endif | 21 | #endif |
diff --git a/arch/sparc/include/asm/nmi.h b/arch/sparc/include/asm/nmi.h new file mode 100644 index 000000000000..fbd546dd4feb --- /dev/null +++ b/arch/sparc/include/asm/nmi.h | |||
@@ -0,0 +1,10 @@ | |||
1 | #ifndef __NMI_H | ||
2 | #define __NMI_H | ||
3 | |||
4 | extern int __init nmi_init(void); | ||
5 | extern void perfctr_irq(int irq, struct pt_regs *regs); | ||
6 | extern void nmi_adjust_hz(unsigned int new_hz); | ||
7 | |||
8 | extern int nmi_usable; | ||
9 | |||
10 | #endif /* __NMI_H */ | ||
diff --git a/arch/sparc/include/asm/pcr.h b/arch/sparc/include/asm/pcr.h new file mode 100644 index 000000000000..a2f5c61f924e --- /dev/null +++ b/arch/sparc/include/asm/pcr.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef __PCR_H | ||
2 | #define __PCR_H | ||
3 | |||
4 | struct pcr_ops { | ||
5 | u64 (*read)(void); | ||
6 | void (*write)(u64); | ||
7 | }; | ||
8 | extern const struct pcr_ops *pcr_ops; | ||
9 | |||
10 | extern void deferred_pcr_work_irq(int irq, struct pt_regs *regs); | ||
11 | extern void schedule_deferred_pcr_work(void); | ||
12 | |||
13 | #define PCR_PIC_PRIV 0x00000001 /* PIC access is privileged */ | ||
14 | #define PCR_STRACE 0x00000002 /* Trace supervisor events */ | ||
15 | #define PCR_UTRACE 0x00000004 /* Trace user events */ | ||
16 | #define PCR_N2_HTRACE 0x00000008 /* Trace hypervisor events */ | ||
17 | #define PCR_N2_TOE_OV0 0x00000010 /* Trap if PIC 0 overflows */ | ||
18 | #define PCR_N2_TOE_OV1 0x00000020 /* Trap if PIC 1 overflows */ | ||
19 | #define PCR_N2_MASK0 0x00003fc0 | ||
20 | #define PCR_N2_MASK0_SHIFT 6 | ||
21 | #define PCR_N2_SL0 0x0003c000 | ||
22 | #define PCR_N2_SL0_SHIFT 14 | ||
23 | #define PCR_N2_OV0 0x00040000 | ||
24 | #define PCR_N2_MASK1 0x07f80000 | ||
25 | #define PCR_N2_MASK1_SHIFT 19 | ||
26 | #define PCR_N2_SL1 0x78000000 | ||
27 | #define PCR_N2_SL1_SHIFT 27 | ||
28 | #define PCR_N2_OV1 0x80000000 | ||
29 | |||
30 | extern unsigned int picl_shift; | ||
31 | |||
32 | /* In order to commonize as much of the implementation as | ||
33 | * possible, we use PICH as our counter. Mostly this is | ||
34 | * to accomodate Niagara-1 which can only count insn cycles | ||
35 | * in PICH. | ||
36 | */ | ||
37 | static inline u64 picl_value(unsigned int nmi_hz) | ||
38 | { | ||
39 | u32 delta = local_cpu_data().clock_tick / (nmi_hz << picl_shift); | ||
40 | |||
41 | return ((u64)((0 - delta) & 0xffffffff)) << 32; | ||
42 | } | ||
43 | |||
44 | extern u64 pcr_enable; | ||
45 | |||
46 | #endif /* __PCR_H */ | ||
diff --git a/arch/sparc/include/asm/pil.h b/arch/sparc/include/asm/pil.h index d573820c0ff4..32a7efe76d00 100644 --- a/arch/sparc/include/asm/pil.h +++ b/arch/sparc/include/asm/pil.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #define PIL_SMP_CTX_NEW_VERSION 4 | 23 | #define PIL_SMP_CTX_NEW_VERSION 4 |
24 | #define PIL_DEVICE_IRQ 5 | 24 | #define PIL_DEVICE_IRQ 5 |
25 | #define PIL_SMP_CALL_FUNC_SNGL 6 | 25 | #define PIL_SMP_CALL_FUNC_SNGL 6 |
26 | #define PIL_DEFERRED_PCR_WORK 7 | ||
26 | #define PIL_NORMAL_MAX 14 | 27 | #define PIL_NORMAL_MAX 14 |
27 | #define PIL_NMI 15 | 28 | #define PIL_NMI 15 |
28 | 29 | ||
diff --git a/arch/sparc/kernel/Makefile b/arch/sparc/kernel/Makefile index 53adcaa0348b..54742e58831c 100644 --- a/arch/sparc/kernel/Makefile +++ b/arch/sparc/kernel/Makefile | |||
@@ -52,6 +52,8 @@ obj-$(CONFIG_SPARC64) += visemul.o | |||
52 | obj-$(CONFIG_SPARC64) += hvapi.o | 52 | obj-$(CONFIG_SPARC64) += hvapi.o |
53 | obj-$(CONFIG_SPARC64) += sstate.o | 53 | obj-$(CONFIG_SPARC64) += sstate.o |
54 | obj-$(CONFIG_SPARC64) += mdesc.o | 54 | obj-$(CONFIG_SPARC64) += mdesc.o |
55 | obj-$(CONFIG_SPARC64) += pcr.o | ||
56 | obj-$(CONFIG_SPARC64) += nmi.o | ||
55 | 57 | ||
56 | # sparc32 do not use GENERIC_HARDIRQS but uses the generic devres implementation | 58 | # sparc32 do not use GENERIC_HARDIRQS but uses the generic devres implementation |
57 | obj-$(CONFIG_SPARC32) += devres.o | 59 | obj-$(CONFIG_SPARC32) += devres.o |
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index 32d32b4824f5..d85c3dc4953a 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -26,6 +26,7 @@ EXPORT_PER_CPU_SYMBOL(__cpu_data); | |||
26 | struct cpu_info { | 26 | struct cpu_info { |
27 | int psr_vers; | 27 | int psr_vers; |
28 | const char *name; | 28 | const char *name; |
29 | const char *pmu_name; | ||
29 | }; | 30 | }; |
30 | 31 | ||
31 | struct fpu_info { | 32 | struct fpu_info { |
@@ -45,6 +46,9 @@ struct manufacturer_info { | |||
45 | #define CPU(ver, _name) \ | 46 | #define CPU(ver, _name) \ |
46 | { .psr_vers = ver, .name = _name } | 47 | { .psr_vers = ver, .name = _name } |
47 | 48 | ||
49 | #define CPU_PMU(ver, _name, _pmu_name) \ | ||
50 | { .psr_vers = ver, .name = _name, .pmu_name = _pmu_name } | ||
51 | |||
48 | #define FPU(ver, _name) \ | 52 | #define FPU(ver, _name) \ |
49 | { .fp_vers = ver, .name = _name } | 53 | { .fp_vers = ver, .name = _name } |
50 | 54 | ||
@@ -183,10 +187,10 @@ static const struct manufacturer_info __initconst manufacturer_info[] = { | |||
183 | },{ | 187 | },{ |
184 | 0x17, | 188 | 0x17, |
185 | .cpu_info = { | 189 | .cpu_info = { |
186 | CPU(0x10, "TI UltraSparc I (SpitFire)"), | 190 | CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"), |
187 | CPU(0x11, "TI UltraSparc II (BlackBird)"), | 191 | CPU_PMU(0x11, "TI UltraSparc II (BlackBird)", "ultra12"), |
188 | CPU(0x12, "TI UltraSparc IIi (Sabre)"), | 192 | CPU_PMU(0x12, "TI UltraSparc IIi (Sabre)", "ultra12"), |
189 | CPU(0x13, "TI UltraSparc IIe (Hummingbird)"), | 193 | CPU_PMU(0x13, "TI UltraSparc IIe (Hummingbird)", "ultra12"), |
190 | CPU(-1, NULL) | 194 | CPU(-1, NULL) |
191 | }, | 195 | }, |
192 | .fpu_info = { | 196 | .fpu_info = { |
@@ -199,7 +203,7 @@ static const struct manufacturer_info __initconst manufacturer_info[] = { | |||
199 | },{ | 203 | },{ |
200 | 0x22, | 204 | 0x22, |
201 | .cpu_info = { | 205 | .cpu_info = { |
202 | CPU(0x10, "TI UltraSparc I (SpitFire)"), | 206 | CPU_PMU(0x10, "TI UltraSparc I (SpitFire)", "ultra12"), |
203 | CPU(-1, NULL) | 207 | CPU(-1, NULL) |
204 | }, | 208 | }, |
205 | .fpu_info = { | 209 | .fpu_info = { |
@@ -209,12 +213,12 @@ static const struct manufacturer_info __initconst manufacturer_info[] = { | |||
209 | },{ | 213 | },{ |
210 | 0x3e, | 214 | 0x3e, |
211 | .cpu_info = { | 215 | .cpu_info = { |
212 | CPU(0x14, "TI UltraSparc III (Cheetah)"), | 216 | CPU_PMU(0x14, "TI UltraSparc III (Cheetah)", "ultra3"), |
213 | CPU(0x15, "TI UltraSparc III+ (Cheetah+)"), | 217 | CPU_PMU(0x15, "TI UltraSparc III+ (Cheetah+)", "ultra3+"), |
214 | CPU(0x16, "TI UltraSparc IIIi (Jalapeno)"), | 218 | CPU_PMU(0x16, "TI UltraSparc IIIi (Jalapeno)", "ultra3i"), |
215 | CPU(0x18, "TI UltraSparc IV (Jaguar)"), | 219 | CPU_PMU(0x18, "TI UltraSparc IV (Jaguar)", "ultra3+"), |
216 | CPU(0x19, "TI UltraSparc IV+ (Panther)"), | 220 | CPU_PMU(0x19, "TI UltraSparc IV+ (Panther)", "ultra4+"), |
217 | CPU(0x22, "TI UltraSparc IIIi+ (Serrano)"), | 221 | CPU_PMU(0x22, "TI UltraSparc IIIi+ (Serrano)", "ultra3i"), |
218 | CPU(-1, NULL) | 222 | CPU(-1, NULL) |
219 | }, | 223 | }, |
220 | .fpu_info = { | 224 | .fpu_info = { |
@@ -234,6 +238,7 @@ static const struct manufacturer_info __initconst manufacturer_info[] = { | |||
234 | 238 | ||
235 | const char *sparc_cpu_type; | 239 | const char *sparc_cpu_type; |
236 | const char *sparc_fpu_type; | 240 | const char *sparc_fpu_type; |
241 | const char *sparc_pmu_type; | ||
237 | 242 | ||
238 | unsigned int fsr_storage; | 243 | unsigned int fsr_storage; |
239 | 244 | ||
@@ -244,6 +249,7 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) | |||
244 | 249 | ||
245 | sparc_cpu_type = NULL; | 250 | sparc_cpu_type = NULL; |
246 | sparc_fpu_type = NULL; | 251 | sparc_fpu_type = NULL; |
252 | sparc_pmu_type = NULL; | ||
247 | manuf = NULL; | 253 | manuf = NULL; |
248 | 254 | ||
249 | for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++) | 255 | for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++) |
@@ -263,6 +269,7 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) | |||
263 | { | 269 | { |
264 | if (cpu->psr_vers == psr_vers) { | 270 | if (cpu->psr_vers == psr_vers) { |
265 | sparc_cpu_type = cpu->name; | 271 | sparc_cpu_type = cpu->name; |
272 | sparc_pmu_type = cpu->pmu_name; | ||
266 | sparc_fpu_type = "No FPU"; | 273 | sparc_fpu_type = "No FPU"; |
267 | break; | 274 | break; |
268 | } | 275 | } |
@@ -290,6 +297,8 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) | |||
290 | psr_impl, fpu_vers); | 297 | psr_impl, fpu_vers); |
291 | sparc_fpu_type = "Unknown FPU"; | 298 | sparc_fpu_type = "Unknown FPU"; |
292 | } | 299 | } |
300 | if (sparc_pmu_type == NULL) | ||
301 | sparc_pmu_type = "Unknown PMU"; | ||
293 | } | 302 | } |
294 | 303 | ||
295 | #ifdef CONFIG_SPARC32 | 304 | #ifdef CONFIG_SPARC32 |
@@ -315,11 +324,13 @@ static void __init sun4v_cpu_probe(void) | |||
315 | case SUN4V_CHIP_NIAGARA1: | 324 | case SUN4V_CHIP_NIAGARA1: |
316 | sparc_cpu_type = "UltraSparc T1 (Niagara)"; | 325 | sparc_cpu_type = "UltraSparc T1 (Niagara)"; |
317 | sparc_fpu_type = "UltraSparc T1 integrated FPU"; | 326 | sparc_fpu_type = "UltraSparc T1 integrated FPU"; |
327 | sparc_pmu_type = "niagara"; | ||
318 | break; | 328 | break; |
319 | 329 | ||
320 | case SUN4V_CHIP_NIAGARA2: | 330 | case SUN4V_CHIP_NIAGARA2: |
321 | sparc_cpu_type = "UltraSparc T2 (Niagara2)"; | 331 | sparc_cpu_type = "UltraSparc T2 (Niagara2)"; |
322 | sparc_fpu_type = "UltraSparc T2 integrated FPU"; | 332 | sparc_fpu_type = "UltraSparc T2 integrated FPU"; |
333 | sparc_pmu_type = "niagara2"; | ||
323 | break; | 334 | break; |
324 | 335 | ||
325 | default: | 336 | default: |
diff --git a/arch/sparc/kernel/irq_64.c b/arch/sparc/kernel/irq_64.c index cab8e0286871..e289376198eb 100644 --- a/arch/sparc/kernel/irq_64.c +++ b/arch/sparc/kernel/irq_64.c | |||
@@ -196,6 +196,11 @@ int show_interrupts(struct seq_file *p, void *v) | |||
196 | seq_putc(p, '\n'); | 196 | seq_putc(p, '\n'); |
197 | skip: | 197 | skip: |
198 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); | 198 | spin_unlock_irqrestore(&irq_desc[i].lock, flags); |
199 | } else if (i == NR_IRQS) { | ||
200 | seq_printf(p, "NMI: "); | ||
201 | for_each_online_cpu(j) | ||
202 | seq_printf(p, "%10u ", cpu_data(j).__nmi_count); | ||
203 | seq_printf(p, " Non-maskable interrupts\n"); | ||
199 | } | 204 | } |
200 | return 0; | 205 | return 0; |
201 | } | 206 | } |
@@ -778,69 +783,6 @@ void do_softirq(void) | |||
778 | local_irq_restore(flags); | 783 | local_irq_restore(flags); |
779 | } | 784 | } |
780 | 785 | ||
781 | static void unhandled_perf_irq(struct pt_regs *regs) | ||
782 | { | ||
783 | unsigned long pcr, pic; | ||
784 | |||
785 | read_pcr(pcr); | ||
786 | read_pic(pic); | ||
787 | |||
788 | write_pcr(0); | ||
789 | |||
790 | printk(KERN_EMERG "CPU %d: Got unexpected perf counter IRQ.\n", | ||
791 | smp_processor_id()); | ||
792 | printk(KERN_EMERG "CPU %d: PCR[%016lx] PIC[%016lx]\n", | ||
793 | smp_processor_id(), pcr, pic); | ||
794 | } | ||
795 | |||
796 | /* Almost a direct copy of the powerpc PMC code. */ | ||
797 | static DEFINE_SPINLOCK(perf_irq_lock); | ||
798 | static void *perf_irq_owner_caller; /* mostly for debugging */ | ||
799 | static void (*perf_irq)(struct pt_regs *regs) = unhandled_perf_irq; | ||
800 | |||
801 | /* Invoked from level 15 PIL handler in trap table. */ | ||
802 | void perfctr_irq(int irq, struct pt_regs *regs) | ||
803 | { | ||
804 | clear_softint(1 << irq); | ||
805 | perf_irq(regs); | ||
806 | } | ||
807 | |||
808 | int register_perfctr_intr(void (*handler)(struct pt_regs *)) | ||
809 | { | ||
810 | int ret; | ||
811 | |||
812 | if (!handler) | ||
813 | return -EINVAL; | ||
814 | |||
815 | spin_lock(&perf_irq_lock); | ||
816 | if (perf_irq != unhandled_perf_irq) { | ||
817 | printk(KERN_WARNING "register_perfctr_intr: " | ||
818 | "perf IRQ busy (reserved by caller %p)\n", | ||
819 | perf_irq_owner_caller); | ||
820 | ret = -EBUSY; | ||
821 | goto out; | ||
822 | } | ||
823 | |||
824 | perf_irq_owner_caller = __builtin_return_address(0); | ||
825 | perf_irq = handler; | ||
826 | |||
827 | ret = 0; | ||
828 | out: | ||
829 | spin_unlock(&perf_irq_lock); | ||
830 | |||
831 | return ret; | ||
832 | } | ||
833 | EXPORT_SYMBOL_GPL(register_perfctr_intr); | ||
834 | |||
835 | void release_perfctr_intr(void (*handler)(struct pt_regs *)) | ||
836 | { | ||
837 | spin_lock(&perf_irq_lock); | ||
838 | perf_irq_owner_caller = NULL; | ||
839 | perf_irq = unhandled_perf_irq; | ||
840 | spin_unlock(&perf_irq_lock); | ||
841 | } | ||
842 | EXPORT_SYMBOL_GPL(release_perfctr_intr); | ||
843 | |||
844 | #ifdef CONFIG_HOTPLUG_CPU | 786 | #ifdef CONFIG_HOTPLUG_CPU |
845 | void fixup_irqs(void) | 787 | void fixup_irqs(void) |
846 | { | 788 | { |
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 81a972e8d8ea..15d8a3f645c9 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h | |||
@@ -5,6 +5,7 @@ | |||
5 | 5 | ||
6 | /* cpu.c */ | 6 | /* cpu.c */ |
7 | extern const char *sparc_cpu_type; | 7 | extern const char *sparc_cpu_type; |
8 | extern const char *sparc_pmu_type; | ||
8 | extern const char *sparc_fpu_type; | 9 | extern const char *sparc_fpu_type; |
9 | 10 | ||
10 | extern unsigned int fsr_storage; | 11 | extern unsigned int fsr_storage; |
diff --git a/arch/sparc/kernel/nmi.c b/arch/sparc/kernel/nmi.c new file mode 100644 index 000000000000..09f088ed4a64 --- /dev/null +++ b/arch/sparc/kernel/nmi.c | |||
@@ -0,0 +1,224 @@ | |||
1 | /* Pseudo NMI support on sparc64 systems. | ||
2 | * | ||
3 | * Copyright (C) 2009 David S. Miller <davem@davemloft.net> | ||
4 | * | ||
5 | * The NMI watchdog support and infrastructure is based almost | ||
6 | * entirely upon the x86 NMI support code. | ||
7 | */ | ||
8 | #include <linux/kernel.h> | ||
9 | #include <linux/param.h> | ||
10 | #include <linux/init.h> | ||
11 | #include <linux/percpu.h> | ||
12 | #include <linux/nmi.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kprobes.h> | ||
15 | #include <linux/kernel_stat.h> | ||
16 | #include <linux/slab.h> | ||
17 | #include <linux/kdebug.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/smp.h> | ||
20 | |||
21 | #include <asm/ptrace.h> | ||
22 | #include <asm/local.h> | ||
23 | #include <asm/pcr.h> | ||
24 | |||
25 | /* We don't have a real NMI on sparc64, but we can fake one | ||
26 | * up using profiling counter overflow interrupts and interrupt | ||
27 | * levels. | ||
28 | * | ||
29 | * The profile overflow interrupts at level 15, so we use | ||
30 | * level 14 as our IRQ off level. | ||
31 | */ | ||
32 | |||
33 | static int nmi_watchdog_active; | ||
34 | static int panic_on_timeout; | ||
35 | |||
36 | int nmi_usable; | ||
37 | EXPORT_SYMBOL_GPL(nmi_usable); | ||
38 | |||
39 | static unsigned int nmi_hz = HZ; | ||
40 | |||
41 | static DEFINE_PER_CPU(unsigned int, last_irq_sum); | ||
42 | static DEFINE_PER_CPU(local_t, alert_counter); | ||
43 | static DEFINE_PER_CPU(int, nmi_touch); | ||
44 | |||
45 | void touch_nmi_watchdog(void) | ||
46 | { | ||
47 | if (nmi_watchdog_active) { | ||
48 | int cpu; | ||
49 | |||
50 | for_each_present_cpu(cpu) { | ||
51 | if (per_cpu(nmi_touch, cpu) != 1) | ||
52 | per_cpu(nmi_touch, cpu) = 1; | ||
53 | } | ||
54 | } | ||
55 | |||
56 | touch_softlockup_watchdog(); | ||
57 | } | ||
58 | EXPORT_SYMBOL(touch_nmi_watchdog); | ||
59 | |||
60 | static void die_nmi(const char *str, struct pt_regs *regs, int do_panic) | ||
61 | { | ||
62 | if (notify_die(DIE_NMIWATCHDOG, str, regs, 0, | ||
63 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) | ||
64 | return; | ||
65 | |||
66 | console_verbose(); | ||
67 | bust_spinlocks(1); | ||
68 | |||
69 | printk(KERN_EMERG "%s", str); | ||
70 | printk(" on CPU%d, ip %08lx, registers:\n", | ||
71 | smp_processor_id(), regs->tpc); | ||
72 | show_regs(regs); | ||
73 | |||
74 | bust_spinlocks(0); | ||
75 | |||
76 | if (do_panic || panic_on_oops) | ||
77 | panic("Non maskable interrupt"); | ||
78 | |||
79 | local_irq_enable(); | ||
80 | do_exit(SIGBUS); | ||
81 | } | ||
82 | |||
83 | notrace __kprobes void perfctr_irq(int irq, struct pt_regs *regs) | ||
84 | { | ||
85 | unsigned int sum, touched = 0; | ||
86 | int cpu = smp_processor_id(); | ||
87 | |||
88 | clear_softint(1 << irq); | ||
89 | pcr_ops->write(PCR_PIC_PRIV); | ||
90 | |||
91 | local_cpu_data().__nmi_count++; | ||
92 | |||
93 | if (notify_die(DIE_NMI, "nmi", regs, 0, | ||
94 | pt_regs_trap_type(regs), SIGINT) == NOTIFY_STOP) | ||
95 | touched = 1; | ||
96 | |||
97 | sum = kstat_irqs_cpu(0, cpu); | ||
98 | if (__get_cpu_var(nmi_touch)) { | ||
99 | __get_cpu_var(nmi_touch) = 0; | ||
100 | touched = 1; | ||
101 | } | ||
102 | if (!touched && __get_cpu_var(last_irq_sum) == sum) { | ||
103 | local_inc(&__get_cpu_var(alert_counter)); | ||
104 | if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz) | ||
105 | die_nmi("BUG: NMI Watchdog detected LOCKUP", | ||
106 | regs, panic_on_timeout); | ||
107 | } else { | ||
108 | __get_cpu_var(last_irq_sum) = sum; | ||
109 | local_set(&__get_cpu_var(alert_counter), 0); | ||
110 | } | ||
111 | if (nmi_usable) { | ||
112 | write_pic(picl_value(nmi_hz)); | ||
113 | pcr_ops->write(pcr_enable); | ||
114 | } | ||
115 | } | ||
116 | |||
117 | static inline unsigned int get_nmi_count(int cpu) | ||
118 | { | ||
119 | return cpu_data(cpu).__nmi_count; | ||
120 | } | ||
121 | |||
122 | static int endflag __initdata; | ||
123 | |||
124 | static __init void nmi_cpu_busy(void *data) | ||
125 | { | ||
126 | local_irq_enable_in_hardirq(); | ||
127 | while (endflag == 0) | ||
128 | mb(); | ||
129 | } | ||
130 | |||
131 | static void report_broken_nmi(int cpu, int *prev_nmi_count) | ||
132 | { | ||
133 | printk(KERN_CONT "\n"); | ||
134 | |||
135 | printk(KERN_WARNING | ||
136 | "WARNING: CPU#%d: NMI appears to be stuck (%d->%d)!\n", | ||
137 | cpu, prev_nmi_count[cpu], get_nmi_count(cpu)); | ||
138 | |||
139 | printk(KERN_WARNING | ||
140 | "Please report this to bugzilla.kernel.org,\n"); | ||
141 | printk(KERN_WARNING | ||
142 | "and attach the output of the 'dmesg' command.\n"); | ||
143 | |||
144 | nmi_usable = 0; | ||
145 | } | ||
146 | |||
147 | static void stop_watchdog(void *unused) | ||
148 | { | ||
149 | pcr_ops->write(PCR_PIC_PRIV); | ||
150 | } | ||
151 | |||
152 | static int __init check_nmi_watchdog(void) | ||
153 | { | ||
154 | unsigned int *prev_nmi_count; | ||
155 | int cpu, err; | ||
156 | |||
157 | prev_nmi_count = kmalloc(nr_cpu_ids * sizeof(unsigned int), GFP_KERNEL); | ||
158 | if (!prev_nmi_count) { | ||
159 | err = -ENOMEM; | ||
160 | goto error; | ||
161 | } | ||
162 | |||
163 | printk(KERN_INFO "Testing NMI watchdog ... "); | ||
164 | |||
165 | smp_call_function(nmi_cpu_busy, (void *)&endflag, 0); | ||
166 | |||
167 | for_each_possible_cpu(cpu) | ||
168 | prev_nmi_count[cpu] = get_nmi_count(cpu); | ||
169 | local_irq_enable(); | ||
170 | mdelay((20 * 1000) / nmi_hz); /* wait 20 ticks */ | ||
171 | |||
172 | for_each_online_cpu(cpu) { | ||
173 | if (get_nmi_count(cpu) - prev_nmi_count[cpu] <= 5) | ||
174 | report_broken_nmi(cpu, prev_nmi_count); | ||
175 | } | ||
176 | endflag = 1; | ||
177 | if (!nmi_usable) { | ||
178 | kfree(prev_nmi_count); | ||
179 | err = -ENODEV; | ||
180 | goto error; | ||
181 | } | ||
182 | printk("OK.\n"); | ||
183 | |||
184 | nmi_hz = 1; | ||
185 | |||
186 | kfree(prev_nmi_count); | ||
187 | return 0; | ||
188 | error: | ||
189 | on_each_cpu(stop_watchdog, NULL, 1); | ||
190 | return err; | ||
191 | } | ||
192 | |||
193 | static void start_watchdog(void *unused) | ||
194 | { | ||
195 | pcr_ops->write(PCR_PIC_PRIV); | ||
196 | write_pic(picl_value(nmi_hz)); | ||
197 | |||
198 | pcr_ops->write(pcr_enable); | ||
199 | } | ||
200 | |||
201 | void nmi_adjust_hz(unsigned int new_hz) | ||
202 | { | ||
203 | nmi_hz = new_hz; | ||
204 | on_each_cpu(start_watchdog, NULL, 1); | ||
205 | } | ||
206 | EXPORT_SYMBOL_GPL(nmi_adjust_hz); | ||
207 | |||
208 | int __init nmi_init(void) | ||
209 | { | ||
210 | nmi_usable = 1; | ||
211 | |||
212 | on_each_cpu(start_watchdog, NULL, 1); | ||
213 | |||
214 | return check_nmi_watchdog(); | ||
215 | } | ||
216 | |||
217 | static int __init setup_nmi_watchdog(char *str) | ||
218 | { | ||
219 | if (!strncmp(str, "panic", 5)) | ||
220 | panic_on_timeout = 1; | ||
221 | |||
222 | return 0; | ||
223 | } | ||
224 | __setup("nmi_watchdog=", setup_nmi_watchdog); | ||
diff --git a/arch/sparc/kernel/pcr.c b/arch/sparc/kernel/pcr.c new file mode 100644 index 000000000000..92e0dda141a4 --- /dev/null +++ b/arch/sparc/kernel/pcr.c | |||
@@ -0,0 +1,153 @@ | |||
1 | /* pcr.c: Generic sparc64 performance counter infrastructure. | ||
2 | * | ||
3 | * Copyright (C) 2009 David S. Miller (davem@davemloft.net) | ||
4 | */ | ||
5 | #include <linux/kernel.h> | ||
6 | #include <linux/module.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/irq.h> | ||
9 | |||
10 | #include <asm/pil.h> | ||
11 | #include <asm/pcr.h> | ||
12 | #include <asm/nmi.h> | ||
13 | |||
14 | /* This code is shared between various users of the performance | ||
15 | * counters. Users will be oprofile, pseudo-NMI watchdog, and the | ||
16 | * perf_counter support layer. | ||
17 | */ | ||
18 | |||
19 | #define PCR_SUN4U_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE) | ||
20 | #define PCR_N2_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE | \ | ||
21 | PCR_N2_TOE_OV1 | \ | ||
22 | (2 << PCR_N2_SL1_SHIFT) | \ | ||
23 | (0xff << PCR_N2_MASK1_SHIFT)) | ||
24 | |||
25 | u64 pcr_enable; | ||
26 | unsigned int picl_shift; | ||
27 | |||
28 | /* Performance counter interrupts run unmasked at PIL level 15. | ||
29 | * Therefore we can't do things like wakeups and other work | ||
30 | * that expects IRQ disabling to be adhered to in locking etc. | ||
31 | * | ||
32 | * Therefore in such situations we defer the work by signalling | ||
33 | * a lower level cpu IRQ. | ||
34 | */ | ||
35 | void deferred_pcr_work_irq(int irq, struct pt_regs *regs) | ||
36 | { | ||
37 | clear_softint(1 << PIL_DEFERRED_PCR_WORK); | ||
38 | } | ||
39 | |||
40 | void schedule_deferred_pcr_work(void) | ||
41 | { | ||
42 | set_softint(1 << PIL_DEFERRED_PCR_WORK); | ||
43 | } | ||
44 | |||
45 | const struct pcr_ops *pcr_ops; | ||
46 | EXPORT_SYMBOL_GPL(pcr_ops); | ||
47 | |||
48 | static u64 direct_pcr_read(void) | ||
49 | { | ||
50 | u64 val; | ||
51 | |||
52 | read_pcr(val); | ||
53 | return val; | ||
54 | } | ||
55 | |||
56 | static void direct_pcr_write(u64 val) | ||
57 | { | ||
58 | write_pcr(val); | ||
59 | } | ||
60 | |||
61 | static const struct pcr_ops direct_pcr_ops = { | ||
62 | .read = direct_pcr_read, | ||
63 | .write = direct_pcr_write, | ||
64 | }; | ||
65 | |||
66 | static void n2_pcr_write(u64 val) | ||
67 | { | ||
68 | unsigned long ret; | ||
69 | |||
70 | ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val); | ||
71 | if (val != HV_EOK) | ||
72 | write_pcr(val); | ||
73 | } | ||
74 | |||
75 | static const struct pcr_ops n2_pcr_ops = { | ||
76 | .read = direct_pcr_read, | ||
77 | .write = n2_pcr_write, | ||
78 | }; | ||
79 | |||
80 | static unsigned long perf_hsvc_group; | ||
81 | static unsigned long perf_hsvc_major; | ||
82 | static unsigned long perf_hsvc_minor; | ||
83 | |||
84 | static int __init register_perf_hsvc(void) | ||
85 | { | ||
86 | if (tlb_type == hypervisor) { | ||
87 | switch (sun4v_chip_type) { | ||
88 | case SUN4V_CHIP_NIAGARA1: | ||
89 | perf_hsvc_group = HV_GRP_NIAG_PERF; | ||
90 | break; | ||
91 | |||
92 | case SUN4V_CHIP_NIAGARA2: | ||
93 | perf_hsvc_group = HV_GRP_N2_CPU; | ||
94 | break; | ||
95 | |||
96 | default: | ||
97 | return -ENODEV; | ||
98 | } | ||
99 | |||
100 | |||
101 | perf_hsvc_major = 1; | ||
102 | perf_hsvc_minor = 0; | ||
103 | if (sun4v_hvapi_register(perf_hsvc_group, | ||
104 | perf_hsvc_major, | ||
105 | &perf_hsvc_minor)) { | ||
106 | printk("perfmon: Could not register hvapi.\n"); | ||
107 | return -ENODEV; | ||
108 | } | ||
109 | } | ||
110 | return 0; | ||
111 | } | ||
112 | |||
113 | static void __init unregister_perf_hsvc(void) | ||
114 | { | ||
115 | if (tlb_type != hypervisor) | ||
116 | return; | ||
117 | sun4v_hvapi_unregister(perf_hsvc_group); | ||
118 | } | ||
119 | |||
120 | int __init pcr_arch_init(void) | ||
121 | { | ||
122 | int err = register_perf_hsvc(); | ||
123 | |||
124 | if (err) | ||
125 | return err; | ||
126 | |||
127 | switch (tlb_type) { | ||
128 | case hypervisor: | ||
129 | pcr_ops = &n2_pcr_ops; | ||
130 | pcr_enable = PCR_N2_ENABLE; | ||
131 | picl_shift = 2; | ||
132 | break; | ||
133 | |||
134 | case cheetah: | ||
135 | case cheetah_plus: | ||
136 | case spitfire: | ||
137 | pcr_ops = &direct_pcr_ops; | ||
138 | pcr_enable = PCR_SUN4U_ENABLE; | ||
139 | break; | ||
140 | |||
141 | default: | ||
142 | err = -ENODEV; | ||
143 | goto out_unregister; | ||
144 | } | ||
145 | |||
146 | return nmi_init(); | ||
147 | |||
148 | out_unregister: | ||
149 | unregister_perf_hsvc(); | ||
150 | return err; | ||
151 | } | ||
152 | |||
153 | arch_initcall(pcr_arch_init); | ||
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index cc8b5604442c..a73954b87f0a 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/cpu.h> | 29 | #include <linux/cpu.h> |
30 | #include <linux/elfcore.h> | 30 | #include <linux/elfcore.h> |
31 | #include <linux/sysrq.h> | 31 | #include <linux/sysrq.h> |
32 | #include <linux/nmi.h> | ||
32 | 33 | ||
33 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
34 | #include <asm/system.h> | 35 | #include <asm/system.h> |
@@ -52,8 +53,10 @@ | |||
52 | 53 | ||
53 | static void sparc64_yield(int cpu) | 54 | static void sparc64_yield(int cpu) |
54 | { | 55 | { |
55 | if (tlb_type != hypervisor) | 56 | if (tlb_type != hypervisor) { |
57 | touch_nmi_watchdog(); | ||
56 | return; | 58 | return; |
59 | } | ||
57 | 60 | ||
58 | clear_thread_flag(TIF_POLLING_NRFLAG); | 61 | clear_thread_flag(TIF_POLLING_NRFLAG); |
59 | smp_mb__after_clear_bit(); | 62 | smp_mb__after_clear_bit(); |
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index 49d061f4ae9d..f2bcfd2967d7 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c | |||
@@ -354,6 +354,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
354 | seq_printf(m, | 354 | seq_printf(m, |
355 | "cpu\t\t: %s\n" | 355 | "cpu\t\t: %s\n" |
356 | "fpu\t\t: %s\n" | 356 | "fpu\t\t: %s\n" |
357 | "pmu\t\t: %s\n" | ||
357 | "prom\t\t: %s\n" | 358 | "prom\t\t: %s\n" |
358 | "type\t\t: %s\n" | 359 | "type\t\t: %s\n" |
359 | "ncpus probed\t: %d\n" | 360 | "ncpus probed\t: %d\n" |
@@ -366,6 +367,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
366 | , | 367 | , |
367 | sparc_cpu_type, | 368 | sparc_cpu_type, |
368 | sparc_fpu_type, | 369 | sparc_fpu_type, |
370 | sparc_pmu_type, | ||
369 | prom_version, | 371 | prom_version, |
370 | ((tlb_type == hypervisor) ? | 372 | ((tlb_type == hypervisor) ? |
371 | "sun4v" : | 373 | "sun4v" : |
diff --git a/arch/sparc/kernel/ttable.S b/arch/sparc/kernel/ttable.S index ea925503b42e..d9bdfb9d5c18 100644 --- a/arch/sparc/kernel/ttable.S +++ b/arch/sparc/kernel/ttable.S | |||
@@ -63,7 +63,8 @@ tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6) | |||
63 | #else | 63 | #else |
64 | tl0_irq6: BTRAP(0x46) | 64 | tl0_irq6: BTRAP(0x46) |
65 | #endif | 65 | #endif |
66 | tl0_irq7: BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) | 66 | tl0_irq7: TRAP_IRQ(deferred_pcr_work_irq, 7) |
67 | tl0_irq8: BTRAP(0x48) BTRAP(0x49) | ||
67 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) | 68 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) |
68 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) | 69 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) |
69 | tl0_irq15: TRAP_NMI_IRQ(perfctr_irq, 15) | 70 | tl0_irq15: TRAP_NMI_IRQ(perfctr_irq, 15) |
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index a9e474bf6385..4ab8993b0863 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/kprobes.h> | 20 | #include <linux/kprobes.h> |
21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
22 | #include <linux/percpu.h> | ||
22 | 23 | ||
23 | #include <asm/page.h> | 24 | #include <asm/page.h> |
24 | #include <asm/pgtable.h> | 25 | #include <asm/pgtable.h> |
@@ -224,6 +225,30 @@ cannot_handle: | |||
224 | unhandled_fault (address, current, regs); | 225 | unhandled_fault (address, current, regs); |
225 | } | 226 | } |
226 | 227 | ||
228 | static void noinline bogus_32bit_fault_tpc(struct pt_regs *regs) | ||
229 | { | ||
230 | static int times; | ||
231 | |||
232 | if (times++ < 10) | ||
233 | printk(KERN_ERR "FAULT[%s:%d]: 32-bit process reports " | ||
234 | "64-bit TPC [%lx]\n", | ||
235 | current->comm, current->pid, | ||
236 | regs->tpc); | ||
237 | show_regs(regs); | ||
238 | } | ||
239 | |||
240 | static void noinline bogus_32bit_fault_address(struct pt_regs *regs, | ||
241 | unsigned long addr) | ||
242 | { | ||
243 | static int times; | ||
244 | |||
245 | if (times++ < 10) | ||
246 | printk(KERN_ERR "FAULT[%s:%d]: 32-bit process " | ||
247 | "reports 64-bit fault address [%lx]\n", | ||
248 | current->comm, current->pid, addr); | ||
249 | show_regs(regs); | ||
250 | } | ||
251 | |||
227 | asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) | 252 | asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) |
228 | { | 253 | { |
229 | struct mm_struct *mm = current->mm; | 254 | struct mm_struct *mm = current->mm; |
@@ -244,6 +269,19 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) | |||
244 | (fault_code & FAULT_CODE_DTLB)) | 269 | (fault_code & FAULT_CODE_DTLB)) |
245 | BUG(); | 270 | BUG(); |
246 | 271 | ||
272 | if (test_thread_flag(TIF_32BIT)) { | ||
273 | if (!(regs->tstate & TSTATE_PRIV)) { | ||
274 | if (unlikely((regs->tpc >> 32) != 0)) { | ||
275 | bogus_32bit_fault_tpc(regs); | ||
276 | goto intr_or_no_mm; | ||
277 | } | ||
278 | } | ||
279 | if (unlikely((address >> 32) != 0)) { | ||
280 | bogus_32bit_fault_address(regs, address); | ||
281 | goto intr_or_no_mm; | ||
282 | } | ||
283 | } | ||
284 | |||
247 | if (regs->tstate & TSTATE_PRIV) { | 285 | if (regs->tstate & TSTATE_PRIV) { |
248 | unsigned long tpc = regs->tpc; | 286 | unsigned long tpc = regs->tpc; |
249 | 287 | ||
@@ -264,12 +302,6 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs) | |||
264 | if (in_atomic() || !mm) | 302 | if (in_atomic() || !mm) |
265 | goto intr_or_no_mm; | 303 | goto intr_or_no_mm; |
266 | 304 | ||
267 | if (test_thread_flag(TIF_32BIT)) { | ||
268 | if (!(regs->tstate & TSTATE_PRIV)) | ||
269 | regs->tpc &= 0xffffffff; | ||
270 | address &= 0xffffffff; | ||
271 | } | ||
272 | |||
273 | if (!down_read_trylock(&mm->mmap_sem)) { | 305 | if (!down_read_trylock(&mm->mmap_sem)) { |
274 | if ((regs->tstate & TSTATE_PRIV) && | 306 | if ((regs->tstate & TSTATE_PRIV) && |
275 | !search_exception_tables(regs->tpc)) { | 307 | !search_exception_tables(regs->tpc)) { |
diff --git a/arch/sparc/oprofile/init.c b/arch/sparc/oprofile/init.c index d6e170c074fc..d172f86439b1 100644 --- a/arch/sparc/oprofile/init.c +++ b/arch/sparc/oprofile/init.c | |||
@@ -13,217 +13,57 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | 14 | ||
15 | #ifdef CONFIG_SPARC64 | 15 | #ifdef CONFIG_SPARC64 |
16 | #include <asm/hypervisor.h> | 16 | #include <linux/notifier.h> |
17 | #include <asm/spitfire.h> | 17 | #include <linux/rcupdate.h> |
18 | #include <asm/cpudata.h> | 18 | #include <linux/kdebug.h> |
19 | #include <asm/irq.h> | 19 | #include <asm/nmi.h> |
20 | 20 | ||
21 | static int nmi_enabled; | 21 | static int profile_timer_exceptions_notify(struct notifier_block *self, |
22 | 22 | unsigned long val, void *data) | |
23 | struct pcr_ops { | ||
24 | u64 (*read)(void); | ||
25 | void (*write)(u64); | ||
26 | }; | ||
27 | static const struct pcr_ops *pcr_ops; | ||
28 | |||
29 | static u64 direct_pcr_read(void) | ||
30 | { | ||
31 | u64 val; | ||
32 | |||
33 | read_pcr(val); | ||
34 | return val; | ||
35 | } | ||
36 | |||
37 | static void direct_pcr_write(u64 val) | ||
38 | { | ||
39 | write_pcr(val); | ||
40 | } | ||
41 | |||
42 | static const struct pcr_ops direct_pcr_ops = { | ||
43 | .read = direct_pcr_read, | ||
44 | .write = direct_pcr_write, | ||
45 | }; | ||
46 | |||
47 | static void n2_pcr_write(u64 val) | ||
48 | { | 23 | { |
49 | unsigned long ret; | 24 | struct die_args *args = (struct die_args *)data; |
50 | 25 | int ret = NOTIFY_DONE; | |
51 | ret = sun4v_niagara2_setperf(HV_N2_PERF_SPARC_CTL, val); | ||
52 | if (val != HV_EOK) | ||
53 | write_pcr(val); | ||
54 | } | ||
55 | |||
56 | static const struct pcr_ops n2_pcr_ops = { | ||
57 | .read = direct_pcr_read, | ||
58 | .write = n2_pcr_write, | ||
59 | }; | ||
60 | |||
61 | /* In order to commonize as much of the implementation as | ||
62 | * possible, we use PICH as our counter. Mostly this is | ||
63 | * to accomodate Niagara-1 which can only count insn cycles | ||
64 | * in PICH. | ||
65 | */ | ||
66 | static u64 picl_value(void) | ||
67 | { | ||
68 | u32 delta = local_cpu_data().clock_tick / HZ; | ||
69 | |||
70 | return ((u64)((0 - delta) & 0xffffffff)) << 32; | ||
71 | } | ||
72 | |||
73 | #define PCR_PIC_PRIV 0x00000001 /* PIC access is privileged */ | ||
74 | #define PCR_STRACE 0x00000002 /* Trace supervisor events */ | ||
75 | #define PCR_UTRACE 0x00000004 /* Trace user events */ | ||
76 | #define PCR_N2_HTRACE 0x00000008 /* Trace hypervisor events */ | ||
77 | #define PCR_N2_TOE_OV0 0x00000010 /* Trap if PIC 0 overflows */ | ||
78 | #define PCR_N2_TOE_OV1 0x00000020 /* Trap if PIC 1 overflows */ | ||
79 | #define PCR_N2_MASK0 0x00003fc0 | ||
80 | #define PCR_N2_MASK0_SHIFT 6 | ||
81 | #define PCR_N2_SL0 0x0003c000 | ||
82 | #define PCR_N2_SL0_SHIFT 14 | ||
83 | #define PCR_N2_OV0 0x00040000 | ||
84 | #define PCR_N2_MASK1 0x07f80000 | ||
85 | #define PCR_N2_MASK1_SHIFT 19 | ||
86 | #define PCR_N2_SL1 0x78000000 | ||
87 | #define PCR_N2_SL1_SHIFT 27 | ||
88 | #define PCR_N2_OV1 0x80000000 | ||
89 | |||
90 | #define PCR_SUN4U_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE) | ||
91 | #define PCR_N2_ENABLE (PCR_PIC_PRIV | PCR_STRACE | PCR_UTRACE | \ | ||
92 | PCR_N2_TOE_OV1 | \ | ||
93 | (2 << PCR_N2_SL1_SHIFT) | \ | ||
94 | (0xff << PCR_N2_MASK1_SHIFT)) | ||
95 | |||
96 | static u64 pcr_enable = PCR_SUN4U_ENABLE; | ||
97 | |||
98 | static void nmi_handler(struct pt_regs *regs) | ||
99 | { | ||
100 | pcr_ops->write(PCR_PIC_PRIV); | ||
101 | |||
102 | if (nmi_enabled) { | ||
103 | oprofile_add_sample(regs, 0); | ||
104 | |||
105 | write_pic(picl_value()); | ||
106 | pcr_ops->write(pcr_enable); | ||
107 | } | ||
108 | } | ||
109 | |||
110 | /* We count "clock cycle" events in the lower 32-bit PIC. | ||
111 | * Then configure it such that it overflows every HZ, and thus | ||
112 | * generates a level 15 interrupt at that frequency. | ||
113 | */ | ||
114 | static void cpu_nmi_start(void *_unused) | ||
115 | { | ||
116 | pcr_ops->write(PCR_PIC_PRIV); | ||
117 | write_pic(picl_value()); | ||
118 | |||
119 | pcr_ops->write(pcr_enable); | ||
120 | } | ||
121 | 26 | ||
122 | static void cpu_nmi_stop(void *_unused) | 27 | switch (val) { |
123 | { | 28 | case DIE_NMI: |
124 | pcr_ops->write(PCR_PIC_PRIV); | 29 | oprofile_add_sample(args->regs, 0); |
125 | } | 30 | ret = NOTIFY_STOP; |
126 | 31 | break; | |
127 | static int nmi_start(void) | 32 | default: |
128 | { | 33 | break; |
129 | int err = register_perfctr_intr(nmi_handler); | ||
130 | |||
131 | if (!err) { | ||
132 | nmi_enabled = 1; | ||
133 | wmb(); | ||
134 | err = on_each_cpu(cpu_nmi_start, NULL, 1); | ||
135 | if (err) { | ||
136 | nmi_enabled = 0; | ||
137 | wmb(); | ||
138 | on_each_cpu(cpu_nmi_stop, NULL, 1); | ||
139 | release_perfctr_intr(nmi_handler); | ||
140 | } | ||
141 | } | 34 | } |
142 | 35 | return ret; | |
143 | return err; | ||
144 | } | ||
145 | |||
146 | static void nmi_stop(void) | ||
147 | { | ||
148 | nmi_enabled = 0; | ||
149 | wmb(); | ||
150 | |||
151 | on_each_cpu(cpu_nmi_stop, NULL, 1); | ||
152 | release_perfctr_intr(nmi_handler); | ||
153 | synchronize_sched(); | ||
154 | } | 36 | } |
155 | 37 | ||
156 | static unsigned long perf_hsvc_group; | 38 | static struct notifier_block profile_timer_exceptions_nb = { |
157 | static unsigned long perf_hsvc_major; | 39 | .notifier_call = profile_timer_exceptions_notify, |
158 | static unsigned long perf_hsvc_minor; | 40 | }; |
159 | 41 | ||
160 | static int __init register_perf_hsvc(void) | 42 | static int timer_start(void) |
161 | { | 43 | { |
162 | if (tlb_type == hypervisor) { | 44 | if (register_die_notifier(&profile_timer_exceptions_nb)) |
163 | switch (sun4v_chip_type) { | 45 | return 1; |
164 | case SUN4V_CHIP_NIAGARA1: | 46 | nmi_adjust_hz(HZ); |
165 | perf_hsvc_group = HV_GRP_NIAG_PERF; | ||
166 | break; | ||
167 | |||
168 | case SUN4V_CHIP_NIAGARA2: | ||
169 | perf_hsvc_group = HV_GRP_N2_CPU; | ||
170 | break; | ||
171 | |||
172 | default: | ||
173 | return -ENODEV; | ||
174 | } | ||
175 | |||
176 | |||
177 | perf_hsvc_major = 1; | ||
178 | perf_hsvc_minor = 0; | ||
179 | if (sun4v_hvapi_register(perf_hsvc_group, | ||
180 | perf_hsvc_major, | ||
181 | &perf_hsvc_minor)) { | ||
182 | printk("perfmon: Could not register N2 hvapi.\n"); | ||
183 | return -ENODEV; | ||
184 | } | ||
185 | } | ||
186 | return 0; | 47 | return 0; |
187 | } | 48 | } |
188 | 49 | ||
189 | static void unregister_perf_hsvc(void) | 50 | |
51 | static void timer_stop(void) | ||
190 | { | 52 | { |
191 | if (tlb_type != hypervisor) | 53 | nmi_adjust_hz(1); |
192 | return; | 54 | unregister_die_notifier(&profile_timer_exceptions_nb); |
193 | sun4v_hvapi_unregister(perf_hsvc_group); | 55 | synchronize_sched(); /* Allow already-started NMIs to complete. */ |
194 | } | 56 | } |
195 | 57 | ||
196 | static int oprofile_nmi_init(struct oprofile_operations *ops) | 58 | static int op_nmi_timer_init(struct oprofile_operations *ops) |
197 | { | 59 | { |
198 | int err = register_perf_hsvc(); | 60 | if (!nmi_usable) |
199 | |||
200 | if (err) | ||
201 | return err; | ||
202 | |||
203 | switch (tlb_type) { | ||
204 | case hypervisor: | ||
205 | pcr_ops = &n2_pcr_ops; | ||
206 | pcr_enable = PCR_N2_ENABLE; | ||
207 | break; | ||
208 | |||
209 | case cheetah: | ||
210 | case cheetah_plus: | ||
211 | pcr_ops = &direct_pcr_ops; | ||
212 | break; | ||
213 | |||
214 | default: | ||
215 | return -ENODEV; | 61 | return -ENODEV; |
216 | } | ||
217 | 62 | ||
218 | ops->create_files = NULL; | 63 | ops->start = timer_start; |
219 | ops->setup = NULL; | 64 | ops->stop = timer_stop; |
220 | ops->shutdown = NULL; | ||
221 | ops->start = nmi_start; | ||
222 | ops->stop = nmi_stop; | ||
223 | ops->cpu_type = "timer"; | 65 | ops->cpu_type = "timer"; |
224 | 66 | printk(KERN_INFO "oprofile: Using perfctr NMI timer interrupt.\n"); | |
225 | printk(KERN_INFO "oprofile: Using perfctr based NMI timer interrupt.\n"); | ||
226 | |||
227 | return 0; | 67 | return 0; |
228 | } | 68 | } |
229 | #endif | 69 | #endif |
@@ -233,7 +73,7 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
233 | int ret = -ENODEV; | 73 | int ret = -ENODEV; |
234 | 74 | ||
235 | #ifdef CONFIG_SPARC64 | 75 | #ifdef CONFIG_SPARC64 |
236 | ret = oprofile_nmi_init(ops); | 76 | ret = op_nmi_timer_init(ops); |
237 | if (!ret) | 77 | if (!ret) |
238 | return ret; | 78 | return ret; |
239 | #endif | 79 | #endif |
@@ -241,10 +81,6 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
241 | return ret; | 81 | return ret; |
242 | } | 82 | } |
243 | 83 | ||
244 | |||
245 | void oprofile_arch_exit(void) | 84 | void oprofile_arch_exit(void) |
246 | { | 85 | { |
247 | #ifdef CONFIG_SPARC64 | ||
248 | unregister_perf_hsvc(); | ||
249 | #endif | ||
250 | } | 86 | } |
diff --git a/arch/x86/boot/video-vesa.c b/arch/x86/boot/video-vesa.c index 75115849af33..4a58c8ce3f69 100644 --- a/arch/x86/boot/video-vesa.c +++ b/arch/x86/boot/video-vesa.c | |||
@@ -269,9 +269,8 @@ void vesa_store_edid(void) | |||
269 | we genuinely have to assume all registers are destroyed here. */ | 269 | we genuinely have to assume all registers are destroyed here. */ |
270 | 270 | ||
271 | asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es" | 271 | asm("pushw %%es; movw %2,%%es; "INT10"; popw %%es" |
272 | : "+a" (ax), "+b" (bx) | 272 | : "+a" (ax), "+b" (bx), "+c" (cx), "+D" (di) |
273 | : "c" (cx), "D" (di) | 273 | : : "esi", "edx"); |
274 | : "esi"); | ||
275 | 274 | ||
276 | if (ax != 0x004f) | 275 | if (ax != 0x004f) |
277 | return; /* No EDID */ | 276 | return; /* No EDID */ |
@@ -285,9 +284,9 @@ void vesa_store_edid(void) | |||
285 | dx = 0; /* EDID block number */ | 284 | dx = 0; /* EDID block number */ |
286 | di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */ | 285 | di =(size_t) &boot_params.edid_info; /* (ES:)Pointer to block */ |
287 | asm(INT10 | 286 | asm(INT10 |
288 | : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info) | 287 | : "+a" (ax), "+b" (bx), "+d" (dx), "=m" (boot_params.edid_info), |
289 | : "c" (cx), "D" (di) | 288 | "+c" (cx), "+D" (di) |
290 | : "esi"); | 289 | : : "esi"); |
291 | #endif /* CONFIG_FIRMWARE_EDID */ | 290 | #endif /* CONFIG_FIRMWARE_EDID */ |
292 | } | 291 | } |
293 | 292 | ||
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h index 3d8ceddbd407..00d41ce4c844 100644 --- a/arch/x86/include/asm/e820.h +++ b/arch/x86/include/asm/e820.h | |||
@@ -49,6 +49,7 @@ | |||
49 | #define E820_RESERVED_KERN 128 | 49 | #define E820_RESERVED_KERN 128 |
50 | 50 | ||
51 | #ifndef __ASSEMBLY__ | 51 | #ifndef __ASSEMBLY__ |
52 | #include <linux/types.h> | ||
52 | struct e820entry { | 53 | struct e820entry { |
53 | __u64 addr; /* start of memory segment */ | 54 | __u64 addr; /* start of memory segment */ |
54 | __u64 size; /* size of memory segment */ | 55 | __u64 size; /* size of memory segment */ |
diff --git a/arch/x86/include/asm/kvm.h b/arch/x86/include/asm/kvm.h index b95162af0bf6..d2e3bf3608af 100644 --- a/arch/x86/include/asm/kvm.h +++ b/arch/x86/include/asm/kvm.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * | 6 | * |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include <asm/types.h> | 9 | #include <linux/types.h> |
10 | #include <linux/ioctl.h> | 10 | #include <linux/ioctl.h> |
11 | 11 | ||
12 | /* Architectural interrupt line count. */ | 12 | /* Architectural interrupt line count. */ |
diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index 1d6e17c2f23a..32c6e17b960b 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h | |||
@@ -3,8 +3,8 @@ | |||
3 | 3 | ||
4 | #ifdef __x86_64__ | 4 | #ifdef __x86_64__ |
5 | 5 | ||
6 | #include <linux/types.h> | ||
6 | #include <asm/ioctls.h> | 7 | #include <asm/ioctls.h> |
7 | #include <asm/types.h> | ||
8 | 8 | ||
9 | /* | 9 | /* |
10 | * Machine Check support for x86 | 10 | * Machine Check support for x86 |
@@ -115,8 +115,6 @@ extern int mce_notify_user(void); | |||
115 | 115 | ||
116 | #endif /* !CONFIG_X86_32 */ | 116 | #endif /* !CONFIG_X86_32 */ |
117 | 117 | ||
118 | |||
119 | |||
120 | #ifdef CONFIG_X86_MCE | 118 | #ifdef CONFIG_X86_MCE |
121 | extern void mcheck_init(struct cpuinfo_x86 *c); | 119 | extern void mcheck_init(struct cpuinfo_x86 *c); |
122 | #else | 120 | #else |
@@ -126,5 +124,4 @@ extern void stop_mce(void); | |||
126 | extern void restart_mce(void); | 124 | extern void restart_mce(void); |
127 | 125 | ||
128 | #endif /* __KERNEL__ */ | 126 | #endif /* __KERNEL__ */ |
129 | |||
130 | #endif /* _ASM_X86_MCE_H */ | 127 | #endif /* _ASM_X86_MCE_H */ |
diff --git a/arch/x86/include/asm/mtrr.h b/arch/x86/include/asm/mtrr.h index 14080d22edb3..a51ada8467de 100644 --- a/arch/x86/include/asm/mtrr.h +++ b/arch/x86/include/asm/mtrr.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #ifndef _ASM_X86_MTRR_H | 23 | #ifndef _ASM_X86_MTRR_H |
24 | #define _ASM_X86_MTRR_H | 24 | #define _ASM_X86_MTRR_H |
25 | 25 | ||
26 | #include <linux/types.h> | ||
26 | #include <linux/ioctl.h> | 27 | #include <linux/ioctl.h> |
27 | #include <linux/errno.h> | 28 | #include <linux/errno.h> |
28 | 29 | ||
diff --git a/arch/x86/include/asm/ptrace-abi.h b/arch/x86/include/asm/ptrace-abi.h index 25f1bb8fc626..8e0f8d199e05 100644 --- a/arch/x86/include/asm/ptrace-abi.h +++ b/arch/x86/include/asm/ptrace-abi.h | |||
@@ -83,7 +83,7 @@ | |||
83 | #ifdef CONFIG_X86_PTRACE_BTS | 83 | #ifdef CONFIG_X86_PTRACE_BTS |
84 | 84 | ||
85 | #ifndef __ASSEMBLY__ | 85 | #ifndef __ASSEMBLY__ |
86 | #include <asm/types.h> | 86 | #include <linux/types.h> |
87 | 87 | ||
88 | /* configuration/status structure used in PTRACE_BTS_CONFIG and | 88 | /* configuration/status structure used in PTRACE_BTS_CONFIG and |
89 | PTRACE_BTS_STATUS commands. | 89 | PTRACE_BTS_STATUS commands. |
diff --git a/arch/x86/include/asm/sigcontext.h b/arch/x86/include/asm/sigcontext.h index 0afcb5e58acc..ec666491aaa4 100644 --- a/arch/x86/include/asm/sigcontext.h +++ b/arch/x86/include/asm/sigcontext.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_X86_SIGCONTEXT_H | 2 | #define _ASM_X86_SIGCONTEXT_H |
3 | 3 | ||
4 | #include <linux/compiler.h> | 4 | #include <linux/compiler.h> |
5 | #include <asm/types.h> | 5 | #include <linux/types.h> |
6 | 6 | ||
7 | #define FP_XSTATE_MAGIC1 0x46505853U | 7 | #define FP_XSTATE_MAGIC1 0x46505853U |
8 | #define FP_XSTATE_MAGIC2 0x46505845U | 8 | #define FP_XSTATE_MAGIC2 0x46505845U |
diff --git a/arch/x86/include/asm/sigcontext32.h b/arch/x86/include/asm/sigcontext32.h index 6126188cf3a9..ad1478c4ae12 100644 --- a/arch/x86/include/asm/sigcontext32.h +++ b/arch/x86/include/asm/sigcontext32.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _ASM_X86_SIGCONTEXT32_H | 1 | #ifndef _ASM_X86_SIGCONTEXT32_H |
2 | #define _ASM_X86_SIGCONTEXT32_H | 2 | #define _ASM_X86_SIGCONTEXT32_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* signal context for 32bit programs. */ | 6 | /* signal context for 32bit programs. */ |
5 | 7 | ||
6 | #define X86_FXSR_MAGIC 0x0000 | 8 | #define X86_FXSR_MAGIC 0x0000 |
diff --git a/arch/x86/include/asm/swab.h b/arch/x86/include/asm/swab.h index 306d4178ffc9..557cd9f00661 100644 --- a/arch/x86/include/asm/swab.h +++ b/arch/x86/include/asm/swab.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_X86_SWAB_H | 1 | #ifndef _ASM_X86_SWAB_H |
2 | #define _ASM_X86_SWAB_H | 2 | #define _ASM_X86_SWAB_H |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <linux/types.h> |
5 | #include <linux/compiler.h> | 5 | #include <linux/compiler.h> |
6 | 6 | ||
7 | static inline __attribute_const__ __u32 __arch_swab32(__u32 val) | 7 | static inline __attribute_const__ __u32 __arch_swab32(__u32 val) |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 549f2ada55f5..430e5c38a544 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -30,7 +30,7 @@ | |||
30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) | 30 | static void __cpuinit early_init_intel(struct cpuinfo_x86 *c) |
31 | { | 31 | { |
32 | /* Unmask CPUID levels if masked: */ | 32 | /* Unmask CPUID levels if masked: */ |
33 | if (c->x86 == 6 && c->x86_model >= 15) { | 33 | if (c->x86 > 6 || (c->x86 == 6 && c->x86_model >= 0xd)) { |
34 | u64 misc_enable; | 34 | u64 misc_enable; |
35 | 35 | ||
36 | rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); | 36 | rdmsrl(MSR_IA32_MISC_ENABLE, misc_enable); |
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c index d259e5d2e054..236a401b8259 100644 --- a/arch/x86/kernel/cpu/mtrr/main.c +++ b/arch/x86/kernel/cpu/mtrr/main.c | |||
@@ -1594,8 +1594,7 @@ int __init mtrr_trim_uncached_memory(unsigned long end_pfn) | |||
1594 | 1594 | ||
1595 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ | 1595 | /* kvm/qemu doesn't have mtrr set right, don't trim them all */ |
1596 | if (!highest_pfn) { | 1596 | if (!highest_pfn) { |
1597 | WARN(!kvm_para_available(), KERN_WARNING | 1597 | printk(KERN_INFO "CPU MTRRs all blank - virtualized system.\n"); |
1598 | "WARNING: strange, CPU MTRRs all blank?\n"); | ||
1599 | return 0; | 1598 | return 0; |
1600 | } | 1599 | } |
1601 | 1600 | ||
diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index da91701a2348..169a120587be 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c | |||
@@ -15,8 +15,8 @@ | |||
15 | * - buffer allocation (memory accounting) | 15 | * - buffer allocation (memory accounting) |
16 | * | 16 | * |
17 | * | 17 | * |
18 | * Copyright (C) 2007-2008 Intel Corporation. | 18 | * Copyright (C) 2007-2009 Intel Corporation. |
19 | * Markus Metzger <markus.t.metzger@intel.com>, 2007-2008 | 19 | * Markus Metzger <markus.t.metzger@intel.com>, 2007-2009 |
20 | */ | 20 | */ |
21 | 21 | ||
22 | 22 | ||
@@ -890,7 +890,7 @@ int ds_set_pebs_reset(struct pebs_tracer *tracer, u64 value) | |||
890 | } | 890 | } |
891 | 891 | ||
892 | static const struct ds_configuration ds_cfg_netburst = { | 892 | static const struct ds_configuration ds_cfg_netburst = { |
893 | .name = "netburst", | 893 | .name = "Netburst", |
894 | .ctl[dsf_bts] = (1 << 2) | (1 << 3), | 894 | .ctl[dsf_bts] = (1 << 2) | (1 << 3), |
895 | .ctl[dsf_bts_kernel] = (1 << 5), | 895 | .ctl[dsf_bts_kernel] = (1 << 5), |
896 | .ctl[dsf_bts_user] = (1 << 6), | 896 | .ctl[dsf_bts_user] = (1 << 6), |
@@ -904,7 +904,7 @@ static const struct ds_configuration ds_cfg_netburst = { | |||
904 | #endif | 904 | #endif |
905 | }; | 905 | }; |
906 | static const struct ds_configuration ds_cfg_pentium_m = { | 906 | static const struct ds_configuration ds_cfg_pentium_m = { |
907 | .name = "pentium m", | 907 | .name = "Pentium M", |
908 | .ctl[dsf_bts] = (1 << 6) | (1 << 7), | 908 | .ctl[dsf_bts] = (1 << 6) | (1 << 7), |
909 | 909 | ||
910 | .sizeof_field = sizeof(long), | 910 | .sizeof_field = sizeof(long), |
@@ -915,8 +915,8 @@ static const struct ds_configuration ds_cfg_pentium_m = { | |||
915 | .sizeof_rec[ds_pebs] = sizeof(long) * 18, | 915 | .sizeof_rec[ds_pebs] = sizeof(long) * 18, |
916 | #endif | 916 | #endif |
917 | }; | 917 | }; |
918 | static const struct ds_configuration ds_cfg_core2 = { | 918 | static const struct ds_configuration ds_cfg_core2_atom = { |
919 | .name = "core 2", | 919 | .name = "Core 2/Atom", |
920 | .ctl[dsf_bts] = (1 << 6) | (1 << 7), | 920 | .ctl[dsf_bts] = (1 << 6) | (1 << 7), |
921 | .ctl[dsf_bts_kernel] = (1 << 9), | 921 | .ctl[dsf_bts_kernel] = (1 << 9), |
922 | .ctl[dsf_bts_user] = (1 << 10), | 922 | .ctl[dsf_bts_user] = (1 << 10), |
@@ -949,19 +949,22 @@ void __cpuinit ds_init_intel(struct cpuinfo_x86 *c) | |||
949 | switch (c->x86) { | 949 | switch (c->x86) { |
950 | case 0x6: | 950 | case 0x6: |
951 | switch (c->x86_model) { | 951 | switch (c->x86_model) { |
952 | case 0 ... 0xC: | 952 | case 0x9: |
953 | /* sorry, don't know about them */ | 953 | case 0xd: /* Pentium M */ |
954 | break; | ||
955 | case 0xD: | ||
956 | case 0xE: /* Pentium M */ | ||
957 | ds_configure(&ds_cfg_pentium_m); | 954 | ds_configure(&ds_cfg_pentium_m); |
958 | break; | 955 | break; |
959 | default: /* Core2, Atom, ... */ | 956 | case 0xf: |
960 | ds_configure(&ds_cfg_core2); | 957 | case 0x17: /* Core2 */ |
958 | case 0x1c: /* Atom */ | ||
959 | ds_configure(&ds_cfg_core2_atom); | ||
960 | break; | ||
961 | case 0x1a: /* i7 */ | ||
962 | default: | ||
963 | /* sorry, don't know about them */ | ||
961 | break; | 964 | break; |
962 | } | 965 | } |
963 | break; | 966 | break; |
964 | case 0xF: | 967 | case 0xf: |
965 | switch (c->x86_model) { | 968 | switch (c->x86_model) { |
966 | case 0x0: | 969 | case 0x0: |
967 | case 0x1: | 970 | case 0x1: |
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index 4064345cf144..fecbce6e7d7c 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -572,6 +572,7 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | |||
572 | case PCI_DEVICE_ID_INTEL_ICH7_1: | 572 | case PCI_DEVICE_ID_INTEL_ICH7_1: |
573 | case PCI_DEVICE_ID_INTEL_ICH7_30: | 573 | case PCI_DEVICE_ID_INTEL_ICH7_30: |
574 | case PCI_DEVICE_ID_INTEL_ICH7_31: | 574 | case PCI_DEVICE_ID_INTEL_ICH7_31: |
575 | case PCI_DEVICE_ID_INTEL_TGP_LPC: | ||
575 | case PCI_DEVICE_ID_INTEL_ESB2_0: | 576 | case PCI_DEVICE_ID_INTEL_ESB2_0: |
576 | case PCI_DEVICE_ID_INTEL_ICH8_0: | 577 | case PCI_DEVICE_ID_INTEL_ICH8_0: |
577 | case PCI_DEVICE_ID_INTEL_ICH8_1: | 578 | case PCI_DEVICE_ID_INTEL_ICH8_1: |
diff --git a/block/blk-barrier.c b/block/blk-barrier.c index 8eba4e43bb0c..f7dae57e6cab 100644 --- a/block/blk-barrier.c +++ b/block/blk-barrier.c | |||
@@ -302,7 +302,7 @@ static void bio_end_empty_barrier(struct bio *bio, int err) | |||
302 | * Description: | 302 | * Description: |
303 | * Issue a flush for the block device in question. Caller can supply | 303 | * Issue a flush for the block device in question. Caller can supply |
304 | * room for storing the error offset in case of a flush error, if they | 304 | * room for storing the error offset in case of a flush error, if they |
305 | * wish to. Caller must run wait_for_completion() on its own. | 305 | * wish to. |
306 | */ | 306 | */ |
307 | int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector) | 307 | int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector) |
308 | { | 308 | { |
diff --git a/block/blk-core.c b/block/blk-core.c index a824e49c0d0a..29bcfac6c688 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -64,11 +64,12 @@ static struct workqueue_struct *kblockd_workqueue; | |||
64 | 64 | ||
65 | static void drive_stat_acct(struct request *rq, int new_io) | 65 | static void drive_stat_acct(struct request *rq, int new_io) |
66 | { | 66 | { |
67 | struct gendisk *disk = rq->rq_disk; | ||
67 | struct hd_struct *part; | 68 | struct hd_struct *part; |
68 | int rw = rq_data_dir(rq); | 69 | int rw = rq_data_dir(rq); |
69 | int cpu; | 70 | int cpu; |
70 | 71 | ||
71 | if (!blk_fs_request(rq) || !rq->rq_disk) | 72 | if (!blk_fs_request(rq) || !disk || !blk_do_io_stat(disk->queue)) |
72 | return; | 73 | return; |
73 | 74 | ||
74 | cpu = part_stat_lock(); | 75 | cpu = part_stat_lock(); |
@@ -599,8 +600,7 @@ blk_init_queue_node(request_fn_proc *rfn, spinlock_t *lock, int node_id) | |||
599 | q->request_fn = rfn; | 600 | q->request_fn = rfn; |
600 | q->prep_rq_fn = NULL; | 601 | q->prep_rq_fn = NULL; |
601 | q->unplug_fn = generic_unplug_device; | 602 | q->unplug_fn = generic_unplug_device; |
602 | q->queue_flags = (1 << QUEUE_FLAG_CLUSTER | | 603 | q->queue_flags = QUEUE_FLAG_DEFAULT; |
603 | 1 << QUEUE_FLAG_STACKABLE); | ||
604 | q->queue_lock = lock; | 604 | q->queue_lock = lock; |
605 | 605 | ||
606 | blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); | 606 | blk_queue_segment_boundary(q, BLK_SEG_BOUNDARY_MASK); |
@@ -1125,6 +1125,8 @@ void init_request_from_bio(struct request *req, struct bio *bio) | |||
1125 | 1125 | ||
1126 | if (bio_sync(bio)) | 1126 | if (bio_sync(bio)) |
1127 | req->cmd_flags |= REQ_RW_SYNC; | 1127 | req->cmd_flags |= REQ_RW_SYNC; |
1128 | if (bio_unplug(bio)) | ||
1129 | req->cmd_flags |= REQ_UNPLUG; | ||
1128 | if (bio_rw_meta(bio)) | 1130 | if (bio_rw_meta(bio)) |
1129 | req->cmd_flags |= REQ_RW_META; | 1131 | req->cmd_flags |= REQ_RW_META; |
1130 | 1132 | ||
@@ -1141,6 +1143,7 @@ static int __make_request(struct request_queue *q, struct bio *bio) | |||
1141 | int el_ret, nr_sectors; | 1143 | int el_ret, nr_sectors; |
1142 | const unsigned short prio = bio_prio(bio); | 1144 | const unsigned short prio = bio_prio(bio); |
1143 | const int sync = bio_sync(bio); | 1145 | const int sync = bio_sync(bio); |
1146 | const int unplug = bio_unplug(bio); | ||
1144 | int rw_flags; | 1147 | int rw_flags; |
1145 | 1148 | ||
1146 | nr_sectors = bio_sectors(bio); | 1149 | nr_sectors = bio_sectors(bio); |
@@ -1244,7 +1247,7 @@ get_rq: | |||
1244 | blk_plug_device(q); | 1247 | blk_plug_device(q); |
1245 | add_request(q, req); | 1248 | add_request(q, req); |
1246 | out: | 1249 | out: |
1247 | if (sync || blk_queue_nonrot(q)) | 1250 | if (unplug || blk_queue_nonrot(q)) |
1248 | __generic_unplug_device(q); | 1251 | __generic_unplug_device(q); |
1249 | spin_unlock_irq(q->queue_lock); | 1252 | spin_unlock_irq(q->queue_lock); |
1250 | return 0; | 1253 | return 0; |
@@ -1448,6 +1451,11 @@ static inline void __generic_make_request(struct bio *bio) | |||
1448 | err = -EOPNOTSUPP; | 1451 | err = -EOPNOTSUPP; |
1449 | goto end_io; | 1452 | goto end_io; |
1450 | } | 1453 | } |
1454 | if (bio_barrier(bio) && bio_has_data(bio) && | ||
1455 | (q->next_ordered == QUEUE_ORDERED_NONE)) { | ||
1456 | err = -EOPNOTSUPP; | ||
1457 | goto end_io; | ||
1458 | } | ||
1451 | 1459 | ||
1452 | ret = q->make_request_fn(q, bio); | 1460 | ret = q->make_request_fn(q, bio); |
1453 | } while (ret); | 1461 | } while (ret); |
@@ -1655,6 +1663,55 @@ void blkdev_dequeue_request(struct request *req) | |||
1655 | } | 1663 | } |
1656 | EXPORT_SYMBOL(blkdev_dequeue_request); | 1664 | EXPORT_SYMBOL(blkdev_dequeue_request); |
1657 | 1665 | ||
1666 | static void blk_account_io_completion(struct request *req, unsigned int bytes) | ||
1667 | { | ||
1668 | struct gendisk *disk = req->rq_disk; | ||
1669 | |||
1670 | if (!disk || !blk_do_io_stat(disk->queue)) | ||
1671 | return; | ||
1672 | |||
1673 | if (blk_fs_request(req)) { | ||
1674 | const int rw = rq_data_dir(req); | ||
1675 | struct hd_struct *part; | ||
1676 | int cpu; | ||
1677 | |||
1678 | cpu = part_stat_lock(); | ||
1679 | part = disk_map_sector_rcu(req->rq_disk, req->sector); | ||
1680 | part_stat_add(cpu, part, sectors[rw], bytes >> 9); | ||
1681 | part_stat_unlock(); | ||
1682 | } | ||
1683 | } | ||
1684 | |||
1685 | static void blk_account_io_done(struct request *req) | ||
1686 | { | ||
1687 | struct gendisk *disk = req->rq_disk; | ||
1688 | |||
1689 | if (!disk || !blk_do_io_stat(disk->queue)) | ||
1690 | return; | ||
1691 | |||
1692 | /* | ||
1693 | * Account IO completion. bar_rq isn't accounted as a normal | ||
1694 | * IO on queueing nor completion. Accounting the containing | ||
1695 | * request is enough. | ||
1696 | */ | ||
1697 | if (blk_fs_request(req) && req != &req->q->bar_rq) { | ||
1698 | unsigned long duration = jiffies - req->start_time; | ||
1699 | const int rw = rq_data_dir(req); | ||
1700 | struct hd_struct *part; | ||
1701 | int cpu; | ||
1702 | |||
1703 | cpu = part_stat_lock(); | ||
1704 | part = disk_map_sector_rcu(disk, req->sector); | ||
1705 | |||
1706 | part_stat_inc(cpu, part, ios[rw]); | ||
1707 | part_stat_add(cpu, part, ticks[rw], duration); | ||
1708 | part_round_stats(cpu, part); | ||
1709 | part_dec_in_flight(part); | ||
1710 | |||
1711 | part_stat_unlock(); | ||
1712 | } | ||
1713 | } | ||
1714 | |||
1658 | /** | 1715 | /** |
1659 | * __end_that_request_first - end I/O on a request | 1716 | * __end_that_request_first - end I/O on a request |
1660 | * @req: the request being processed | 1717 | * @req: the request being processed |
@@ -1690,16 +1747,7 @@ static int __end_that_request_first(struct request *req, int error, | |||
1690 | (unsigned long long)req->sector); | 1747 | (unsigned long long)req->sector); |
1691 | } | 1748 | } |
1692 | 1749 | ||
1693 | if (blk_fs_request(req) && req->rq_disk) { | 1750 | blk_account_io_completion(req, nr_bytes); |
1694 | const int rw = rq_data_dir(req); | ||
1695 | struct hd_struct *part; | ||
1696 | int cpu; | ||
1697 | |||
1698 | cpu = part_stat_lock(); | ||
1699 | part = disk_map_sector_rcu(req->rq_disk, req->sector); | ||
1700 | part_stat_add(cpu, part, sectors[rw], nr_bytes >> 9); | ||
1701 | part_stat_unlock(); | ||
1702 | } | ||
1703 | 1751 | ||
1704 | total_bytes = bio_nbytes = 0; | 1752 | total_bytes = bio_nbytes = 0; |
1705 | while ((bio = req->bio) != NULL) { | 1753 | while ((bio = req->bio) != NULL) { |
@@ -1779,8 +1827,6 @@ static int __end_that_request_first(struct request *req, int error, | |||
1779 | */ | 1827 | */ |
1780 | static void end_that_request_last(struct request *req, int error) | 1828 | static void end_that_request_last(struct request *req, int error) |
1781 | { | 1829 | { |
1782 | struct gendisk *disk = req->rq_disk; | ||
1783 | |||
1784 | if (blk_rq_tagged(req)) | 1830 | if (blk_rq_tagged(req)) |
1785 | blk_queue_end_tag(req->q, req); | 1831 | blk_queue_end_tag(req->q, req); |
1786 | 1832 | ||
@@ -1792,27 +1838,7 @@ static void end_that_request_last(struct request *req, int error) | |||
1792 | 1838 | ||
1793 | blk_delete_timer(req); | 1839 | blk_delete_timer(req); |
1794 | 1840 | ||
1795 | /* | 1841 | blk_account_io_done(req); |
1796 | * Account IO completion. bar_rq isn't accounted as a normal | ||
1797 | * IO on queueing nor completion. Accounting the containing | ||
1798 | * request is enough. | ||
1799 | */ | ||
1800 | if (disk && blk_fs_request(req) && req != &req->q->bar_rq) { | ||
1801 | unsigned long duration = jiffies - req->start_time; | ||
1802 | const int rw = rq_data_dir(req); | ||
1803 | struct hd_struct *part; | ||
1804 | int cpu; | ||
1805 | |||
1806 | cpu = part_stat_lock(); | ||
1807 | part = disk_map_sector_rcu(disk, req->sector); | ||
1808 | |||
1809 | part_stat_inc(cpu, part, ios[rw]); | ||
1810 | part_stat_add(cpu, part, ticks[rw], duration); | ||
1811 | part_round_stats(cpu, part); | ||
1812 | part_dec_in_flight(part); | ||
1813 | |||
1814 | part_stat_unlock(); | ||
1815 | } | ||
1816 | 1842 | ||
1817 | if (req->end_io) | 1843 | if (req->end_io) |
1818 | req->end_io(req, error); | 1844 | req->end_io(req, error); |
diff --git a/block/blk-integrity.c b/block/blk-integrity.c index 61a8e2f8fdd0..91fa8e06b6a5 100644 --- a/block/blk-integrity.c +++ b/block/blk-integrity.c | |||
@@ -309,24 +309,24 @@ static struct kobj_type integrity_ktype = { | |||
309 | /** | 309 | /** |
310 | * blk_integrity_register - Register a gendisk as being integrity-capable | 310 | * blk_integrity_register - Register a gendisk as being integrity-capable |
311 | * @disk: struct gendisk pointer to make integrity-aware | 311 | * @disk: struct gendisk pointer to make integrity-aware |
312 | * @template: integrity profile | 312 | * @template: optional integrity profile to register |
313 | * | 313 | * |
314 | * Description: When a device needs to advertise itself as being able | 314 | * Description: When a device needs to advertise itself as being able |
315 | * to send/receive integrity metadata it must use this function to | 315 | * to send/receive integrity metadata it must use this function to |
316 | * register the capability with the block layer. The template is a | 316 | * register the capability with the block layer. The template is a |
317 | * blk_integrity struct with values appropriate for the underlying | 317 | * blk_integrity struct with values appropriate for the underlying |
318 | * hardware. See Documentation/block/data-integrity.txt. | 318 | * hardware. If template is NULL the new profile is allocated but |
319 | * not filled out. See Documentation/block/data-integrity.txt. | ||
319 | */ | 320 | */ |
320 | int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) | 321 | int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) |
321 | { | 322 | { |
322 | struct blk_integrity *bi; | 323 | struct blk_integrity *bi; |
323 | 324 | ||
324 | BUG_ON(disk == NULL); | 325 | BUG_ON(disk == NULL); |
325 | BUG_ON(template == NULL); | ||
326 | 326 | ||
327 | if (disk->integrity == NULL) { | 327 | if (disk->integrity == NULL) { |
328 | bi = kmem_cache_alloc(integrity_cachep, | 328 | bi = kmem_cache_alloc(integrity_cachep, |
329 | GFP_KERNEL | __GFP_ZERO); | 329 | GFP_KERNEL | __GFP_ZERO); |
330 | if (!bi) | 330 | if (!bi) |
331 | return -1; | 331 | return -1; |
332 | 332 | ||
@@ -346,13 +346,16 @@ int blk_integrity_register(struct gendisk *disk, struct blk_integrity *template) | |||
346 | bi = disk->integrity; | 346 | bi = disk->integrity; |
347 | 347 | ||
348 | /* Use the provided profile as template */ | 348 | /* Use the provided profile as template */ |
349 | bi->name = template->name; | 349 | if (template != NULL) { |
350 | bi->generate_fn = template->generate_fn; | 350 | bi->name = template->name; |
351 | bi->verify_fn = template->verify_fn; | 351 | bi->generate_fn = template->generate_fn; |
352 | bi->tuple_size = template->tuple_size; | 352 | bi->verify_fn = template->verify_fn; |
353 | bi->set_tag_fn = template->set_tag_fn; | 353 | bi->tuple_size = template->tuple_size; |
354 | bi->get_tag_fn = template->get_tag_fn; | 354 | bi->set_tag_fn = template->set_tag_fn; |
355 | bi->tag_size = template->tag_size; | 355 | bi->get_tag_fn = template->get_tag_fn; |
356 | bi->tag_size = template->tag_size; | ||
357 | } else | ||
358 | bi->name = "unsupported"; | ||
356 | 359 | ||
357 | return 0; | 360 | return 0; |
358 | } | 361 | } |
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index a29cb788e408..e29ddfc73cf4 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -130,6 +130,27 @@ static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page) | |||
130 | return queue_var_show(max_hw_sectors_kb, (page)); | 130 | return queue_var_show(max_hw_sectors_kb, (page)); |
131 | } | 131 | } |
132 | 132 | ||
133 | static ssize_t queue_nonrot_show(struct request_queue *q, char *page) | ||
134 | { | ||
135 | return queue_var_show(!blk_queue_nonrot(q), page); | ||
136 | } | ||
137 | |||
138 | static ssize_t queue_nonrot_store(struct request_queue *q, const char *page, | ||
139 | size_t count) | ||
140 | { | ||
141 | unsigned long nm; | ||
142 | ssize_t ret = queue_var_store(&nm, page, count); | ||
143 | |||
144 | spin_lock_irq(q->queue_lock); | ||
145 | if (nm) | ||
146 | queue_flag_clear(QUEUE_FLAG_NONROT, q); | ||
147 | else | ||
148 | queue_flag_set(QUEUE_FLAG_NONROT, q); | ||
149 | spin_unlock_irq(q->queue_lock); | ||
150 | |||
151 | return ret; | ||
152 | } | ||
153 | |||
133 | static ssize_t queue_nomerges_show(struct request_queue *q, char *page) | 154 | static ssize_t queue_nomerges_show(struct request_queue *q, char *page) |
134 | { | 155 | { |
135 | return queue_var_show(blk_queue_nomerges(q), page); | 156 | return queue_var_show(blk_queue_nomerges(q), page); |
@@ -146,8 +167,8 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page, | |||
146 | queue_flag_set(QUEUE_FLAG_NOMERGES, q); | 167 | queue_flag_set(QUEUE_FLAG_NOMERGES, q); |
147 | else | 168 | else |
148 | queue_flag_clear(QUEUE_FLAG_NOMERGES, q); | 169 | queue_flag_clear(QUEUE_FLAG_NOMERGES, q); |
149 | |||
150 | spin_unlock_irq(q->queue_lock); | 170 | spin_unlock_irq(q->queue_lock); |
171 | |||
151 | return ret; | 172 | return ret; |
152 | } | 173 | } |
153 | 174 | ||
@@ -176,6 +197,27 @@ queue_rq_affinity_store(struct request_queue *q, const char *page, size_t count) | |||
176 | return ret; | 197 | return ret; |
177 | } | 198 | } |
178 | 199 | ||
200 | static ssize_t queue_iostats_show(struct request_queue *q, char *page) | ||
201 | { | ||
202 | return queue_var_show(blk_queue_io_stat(q), page); | ||
203 | } | ||
204 | |||
205 | static ssize_t queue_iostats_store(struct request_queue *q, const char *page, | ||
206 | size_t count) | ||
207 | { | ||
208 | unsigned long stats; | ||
209 | ssize_t ret = queue_var_store(&stats, page, count); | ||
210 | |||
211 | spin_lock_irq(q->queue_lock); | ||
212 | if (stats) | ||
213 | queue_flag_set(QUEUE_FLAG_IO_STAT, q); | ||
214 | else | ||
215 | queue_flag_clear(QUEUE_FLAG_IO_STAT, q); | ||
216 | spin_unlock_irq(q->queue_lock); | ||
217 | |||
218 | return ret; | ||
219 | } | ||
220 | |||
179 | static struct queue_sysfs_entry queue_requests_entry = { | 221 | static struct queue_sysfs_entry queue_requests_entry = { |
180 | .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR }, | 222 | .attr = {.name = "nr_requests", .mode = S_IRUGO | S_IWUSR }, |
181 | .show = queue_requests_show, | 223 | .show = queue_requests_show, |
@@ -210,6 +252,12 @@ static struct queue_sysfs_entry queue_hw_sector_size_entry = { | |||
210 | .show = queue_hw_sector_size_show, | 252 | .show = queue_hw_sector_size_show, |
211 | }; | 253 | }; |
212 | 254 | ||
255 | static struct queue_sysfs_entry queue_nonrot_entry = { | ||
256 | .attr = {.name = "rotational", .mode = S_IRUGO | S_IWUSR }, | ||
257 | .show = queue_nonrot_show, | ||
258 | .store = queue_nonrot_store, | ||
259 | }; | ||
260 | |||
213 | static struct queue_sysfs_entry queue_nomerges_entry = { | 261 | static struct queue_sysfs_entry queue_nomerges_entry = { |
214 | .attr = {.name = "nomerges", .mode = S_IRUGO | S_IWUSR }, | 262 | .attr = {.name = "nomerges", .mode = S_IRUGO | S_IWUSR }, |
215 | .show = queue_nomerges_show, | 263 | .show = queue_nomerges_show, |
@@ -222,6 +270,12 @@ static struct queue_sysfs_entry queue_rq_affinity_entry = { | |||
222 | .store = queue_rq_affinity_store, | 270 | .store = queue_rq_affinity_store, |
223 | }; | 271 | }; |
224 | 272 | ||
273 | static struct queue_sysfs_entry queue_iostats_entry = { | ||
274 | .attr = {.name = "iostats", .mode = S_IRUGO | S_IWUSR }, | ||
275 | .show = queue_iostats_show, | ||
276 | .store = queue_iostats_store, | ||
277 | }; | ||
278 | |||
225 | static struct attribute *default_attrs[] = { | 279 | static struct attribute *default_attrs[] = { |
226 | &queue_requests_entry.attr, | 280 | &queue_requests_entry.attr, |
227 | &queue_ra_entry.attr, | 281 | &queue_ra_entry.attr, |
@@ -229,8 +283,10 @@ static struct attribute *default_attrs[] = { | |||
229 | &queue_max_sectors_entry.attr, | 283 | &queue_max_sectors_entry.attr, |
230 | &queue_iosched_entry.attr, | 284 | &queue_iosched_entry.attr, |
231 | &queue_hw_sector_size_entry.attr, | 285 | &queue_hw_sector_size_entry.attr, |
286 | &queue_nonrot_entry.attr, | ||
232 | &queue_nomerges_entry.attr, | 287 | &queue_nomerges_entry.attr, |
233 | &queue_rq_affinity_entry.attr, | 288 | &queue_rq_affinity_entry.attr, |
289 | &queue_iostats_entry.attr, | ||
234 | NULL, | 290 | NULL, |
235 | }; | 291 | }; |
236 | 292 | ||
diff --git a/block/blk.h b/block/blk.h index 6e1ed40534e9..0dce92c37496 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -108,4 +108,12 @@ static inline int blk_cpu_to_group(int cpu) | |||
108 | #endif | 108 | #endif |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline int blk_do_io_stat(struct request_queue *q) | ||
112 | { | ||
113 | if (q) | ||
114 | return blk_queue_io_stat(q); | ||
115 | |||
116 | return 0; | ||
117 | } | ||
118 | |||
111 | #endif | 119 | #endif |
diff --git a/block/blktrace.c b/block/blktrace.c index b0a2cae886db..39cc3bfe56e4 100644 --- a/block/blktrace.c +++ b/block/blktrace.c | |||
@@ -187,59 +187,12 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, | |||
187 | 187 | ||
188 | static struct dentry *blk_tree_root; | 188 | static struct dentry *blk_tree_root; |
189 | static DEFINE_MUTEX(blk_tree_mutex); | 189 | static DEFINE_MUTEX(blk_tree_mutex); |
190 | static unsigned int root_users; | ||
191 | |||
192 | static inline void blk_remove_root(void) | ||
193 | { | ||
194 | if (blk_tree_root) { | ||
195 | debugfs_remove(blk_tree_root); | ||
196 | blk_tree_root = NULL; | ||
197 | } | ||
198 | } | ||
199 | |||
200 | static void blk_remove_tree(struct dentry *dir) | ||
201 | { | ||
202 | mutex_lock(&blk_tree_mutex); | ||
203 | debugfs_remove(dir); | ||
204 | if (--root_users == 0) | ||
205 | blk_remove_root(); | ||
206 | mutex_unlock(&blk_tree_mutex); | ||
207 | } | ||
208 | |||
209 | static struct dentry *blk_create_tree(const char *blk_name) | ||
210 | { | ||
211 | struct dentry *dir = NULL; | ||
212 | int created = 0; | ||
213 | |||
214 | mutex_lock(&blk_tree_mutex); | ||
215 | |||
216 | if (!blk_tree_root) { | ||
217 | blk_tree_root = debugfs_create_dir("block", NULL); | ||
218 | if (!blk_tree_root) | ||
219 | goto err; | ||
220 | created = 1; | ||
221 | } | ||
222 | |||
223 | dir = debugfs_create_dir(blk_name, blk_tree_root); | ||
224 | if (dir) | ||
225 | root_users++; | ||
226 | else { | ||
227 | /* Delete root only if we created it */ | ||
228 | if (created) | ||
229 | blk_remove_root(); | ||
230 | } | ||
231 | |||
232 | err: | ||
233 | mutex_unlock(&blk_tree_mutex); | ||
234 | return dir; | ||
235 | } | ||
236 | 190 | ||
237 | static void blk_trace_cleanup(struct blk_trace *bt) | 191 | static void blk_trace_cleanup(struct blk_trace *bt) |
238 | { | 192 | { |
239 | relay_close(bt->rchan); | ||
240 | debugfs_remove(bt->msg_file); | 193 | debugfs_remove(bt->msg_file); |
241 | debugfs_remove(bt->dropped_file); | 194 | debugfs_remove(bt->dropped_file); |
242 | blk_remove_tree(bt->dir); | 195 | relay_close(bt->rchan); |
243 | free_percpu(bt->sequence); | 196 | free_percpu(bt->sequence); |
244 | free_percpu(bt->msg_data); | 197 | free_percpu(bt->msg_data); |
245 | kfree(bt); | 198 | kfree(bt); |
@@ -346,7 +299,18 @@ static int blk_subbuf_start_callback(struct rchan_buf *buf, void *subbuf, | |||
346 | 299 | ||
347 | static int blk_remove_buf_file_callback(struct dentry *dentry) | 300 | static int blk_remove_buf_file_callback(struct dentry *dentry) |
348 | { | 301 | { |
302 | struct dentry *parent = dentry->d_parent; | ||
349 | debugfs_remove(dentry); | 303 | debugfs_remove(dentry); |
304 | |||
305 | /* | ||
306 | * this will fail for all but the last file, but that is ok. what we | ||
307 | * care about is the top level buts->name directory going away, when | ||
308 | * the last trace file is gone. Then we don't have to rmdir() that | ||
309 | * manually on trace stop, so it nicely solves the issue with | ||
310 | * force killing of running traces. | ||
311 | */ | ||
312 | |||
313 | debugfs_remove(parent); | ||
350 | return 0; | 314 | return 0; |
351 | } | 315 | } |
352 | 316 | ||
@@ -404,7 +368,15 @@ int do_blk_trace_setup(struct request_queue *q, char *name, dev_t dev, | |||
404 | goto err; | 368 | goto err; |
405 | 369 | ||
406 | ret = -ENOENT; | 370 | ret = -ENOENT; |
407 | dir = blk_create_tree(buts->name); | 371 | |
372 | if (!blk_tree_root) { | ||
373 | blk_tree_root = debugfs_create_dir("block", NULL); | ||
374 | if (!blk_tree_root) | ||
375 | return -ENOMEM; | ||
376 | } | ||
377 | |||
378 | dir = debugfs_create_dir(buts->name, blk_tree_root); | ||
379 | |||
408 | if (!dir) | 380 | if (!dir) |
409 | goto err; | 381 | goto err; |
410 | 382 | ||
@@ -458,8 +430,6 @@ probe_err: | |||
458 | atomic_dec(&blk_probes_ref); | 430 | atomic_dec(&blk_probes_ref); |
459 | mutex_unlock(&blk_probe_mutex); | 431 | mutex_unlock(&blk_probe_mutex); |
460 | err: | 432 | err: |
461 | if (dir) | ||
462 | blk_remove_tree(dir); | ||
463 | if (bt) { | 433 | if (bt) { |
464 | if (bt->msg_file) | 434 | if (bt->msg_file) |
465 | debugfs_remove(bt->msg_file); | 435 | debugfs_remove(bt->msg_file); |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index e8525fa72823..664ebfd092ec 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -84,6 +84,11 @@ struct cfq_data { | |||
84 | */ | 84 | */ |
85 | struct cfq_rb_root service_tree; | 85 | struct cfq_rb_root service_tree; |
86 | unsigned int busy_queues; | 86 | unsigned int busy_queues; |
87 | /* | ||
88 | * Used to track any pending rt requests so we can pre-empt current | ||
89 | * non-RT cfqq in service when this value is non-zero. | ||
90 | */ | ||
91 | unsigned int busy_rt_queues; | ||
87 | 92 | ||
88 | int rq_in_driver; | 93 | int rq_in_driver; |
89 | int sync_flight; | 94 | int sync_flight; |
@@ -562,6 +567,8 @@ static void cfq_add_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
562 | BUG_ON(cfq_cfqq_on_rr(cfqq)); | 567 | BUG_ON(cfq_cfqq_on_rr(cfqq)); |
563 | cfq_mark_cfqq_on_rr(cfqq); | 568 | cfq_mark_cfqq_on_rr(cfqq); |
564 | cfqd->busy_queues++; | 569 | cfqd->busy_queues++; |
570 | if (cfq_class_rt(cfqq)) | ||
571 | cfqd->busy_rt_queues++; | ||
565 | 572 | ||
566 | cfq_resort_rr_list(cfqd, cfqq); | 573 | cfq_resort_rr_list(cfqd, cfqq); |
567 | } | 574 | } |
@@ -581,6 +588,8 @@ static void cfq_del_cfqq_rr(struct cfq_data *cfqd, struct cfq_queue *cfqq) | |||
581 | 588 | ||
582 | BUG_ON(!cfqd->busy_queues); | 589 | BUG_ON(!cfqd->busy_queues); |
583 | cfqd->busy_queues--; | 590 | cfqd->busy_queues--; |
591 | if (cfq_class_rt(cfqq)) | ||
592 | cfqd->busy_rt_queues--; | ||
584 | } | 593 | } |
585 | 594 | ||
586 | /* | 595 | /* |
@@ -1005,6 +1014,20 @@ static struct cfq_queue *cfq_select_queue(struct cfq_data *cfqd) | |||
1005 | goto expire; | 1014 | goto expire; |
1006 | 1015 | ||
1007 | /* | 1016 | /* |
1017 | * If we have a RT cfqq waiting, then we pre-empt the current non-rt | ||
1018 | * cfqq. | ||
1019 | */ | ||
1020 | if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) { | ||
1021 | /* | ||
1022 | * We simulate this as cfqq timed out so that it gets to bank | ||
1023 | * the remaining of its time slice. | ||
1024 | */ | ||
1025 | cfq_log_cfqq(cfqd, cfqq, "preempt"); | ||
1026 | cfq_slice_expired(cfqd, 1); | ||
1027 | goto new_queue; | ||
1028 | } | ||
1029 | |||
1030 | /* | ||
1008 | * The active queue has requests and isn't expired, allow it to | 1031 | * The active queue has requests and isn't expired, allow it to |
1009 | * dispatch. | 1032 | * dispatch. |
1010 | */ | 1033 | */ |
@@ -1067,6 +1090,13 @@ __cfq_dispatch_requests(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1067 | if (RB_EMPTY_ROOT(&cfqq->sort_list)) | 1090 | if (RB_EMPTY_ROOT(&cfqq->sort_list)) |
1068 | break; | 1091 | break; |
1069 | 1092 | ||
1093 | /* | ||
1094 | * If there is a non-empty RT cfqq waiting for current | ||
1095 | * cfqq's timeslice to complete, pre-empt this cfqq | ||
1096 | */ | ||
1097 | if (!cfq_class_rt(cfqq) && cfqd->busy_rt_queues) | ||
1098 | break; | ||
1099 | |||
1070 | } while (dispatched < max_dispatch); | 1100 | } while (dispatched < max_dispatch); |
1071 | 1101 | ||
1072 | /* | 1102 | /* |
@@ -1801,6 +1831,12 @@ cfq_should_preempt(struct cfq_data *cfqd, struct cfq_queue *new_cfqq, | |||
1801 | if (rq_is_meta(rq) && !cfqq->meta_pending) | 1831 | if (rq_is_meta(rq) && !cfqq->meta_pending) |
1802 | return 1; | 1832 | return 1; |
1803 | 1833 | ||
1834 | /* | ||
1835 | * Allow an RT request to pre-empt an ongoing non-RT cfqq timeslice. | ||
1836 | */ | ||
1837 | if (cfq_class_rt(new_cfqq) && !cfq_class_rt(cfqq)) | ||
1838 | return 1; | ||
1839 | |||
1804 | if (!cfqd->active_cic || !cfq_cfqq_wait_request(cfqq)) | 1840 | if (!cfqd->active_cic || !cfq_cfqq_wait_request(cfqq)) |
1805 | return 0; | 1841 | return 0; |
1806 | 1842 | ||
@@ -1870,7 +1906,8 @@ cfq_rq_enqueued(struct cfq_data *cfqd, struct cfq_queue *cfqq, | |||
1870 | /* | 1906 | /* |
1871 | * not the active queue - expire current slice if it is | 1907 | * not the active queue - expire current slice if it is |
1872 | * idle and has expired it's mean thinktime or this new queue | 1908 | * idle and has expired it's mean thinktime or this new queue |
1873 | * has some old slice time left and is of higher priority | 1909 | * has some old slice time left and is of higher priority or |
1910 | * this new queue is RT and the current one is BE | ||
1874 | */ | 1911 | */ |
1875 | cfq_preempt_queue(cfqd, cfqq); | 1912 | cfq_preempt_queue(cfqd, cfqq); |
1876 | cfq_mark_cfqq_must_dispatch(cfqq); | 1913 | cfq_mark_cfqq_must_dispatch(cfqq); |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 77bba4c083cb..a603bbf9b1b7 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -61,9 +61,14 @@ | |||
61 | #define EM_MSG_LED_VALUE_ON 0x00010000 | 61 | #define EM_MSG_LED_VALUE_ON 0x00010000 |
62 | 62 | ||
63 | static int ahci_skip_host_reset; | 63 | static int ahci_skip_host_reset; |
64 | static int ahci_ignore_sss; | ||
65 | |||
64 | module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444); | 66 | module_param_named(skip_host_reset, ahci_skip_host_reset, int, 0444); |
65 | MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)"); | 67 | MODULE_PARM_DESC(skip_host_reset, "skip global host reset (0=don't skip, 1=skip)"); |
66 | 68 | ||
69 | module_param_named(ignore_sss, ahci_ignore_sss, int, 0444); | ||
70 | MODULE_PARM_DESC(ignore_sss, "Ignore staggered spinup flag (0=don't ignore, 1=ignore)"); | ||
71 | |||
67 | static int ahci_enable_alpm(struct ata_port *ap, | 72 | static int ahci_enable_alpm(struct ata_port *ap, |
68 | enum link_pm policy); | 73 | enum link_pm policy); |
69 | static void ahci_disable_alpm(struct ata_port *ap); | 74 | static void ahci_disable_alpm(struct ata_port *ap); |
@@ -2692,8 +2697,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2692 | host->iomap = pcim_iomap_table(pdev); | 2697 | host->iomap = pcim_iomap_table(pdev); |
2693 | host->private_data = hpriv; | 2698 | host->private_data = hpriv; |
2694 | 2699 | ||
2695 | if (!(hpriv->cap & HOST_CAP_SSS)) | 2700 | if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss) |
2696 | host->flags |= ATA_HOST_PARALLEL_SCAN; | 2701 | host->flags |= ATA_HOST_PARALLEL_SCAN; |
2702 | else | ||
2703 | printk(KERN_INFO "ahci: SSS flag set, parallel bus scan disabled\n"); | ||
2697 | 2704 | ||
2698 | if (pi.flags & ATA_FLAG_EM) | 2705 | if (pi.flags & ATA_FLAG_EM) |
2699 | ahci_reset_em(host); | 2706 | ahci_reset_em(host); |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 88c242856dae..9fbf0595f3d4 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -164,6 +164,11 @@ MODULE_LICENSE("GPL"); | |||
164 | MODULE_VERSION(DRV_VERSION); | 164 | MODULE_VERSION(DRV_VERSION); |
165 | 165 | ||
166 | 166 | ||
167 | static bool ata_sstatus_online(u32 sstatus) | ||
168 | { | ||
169 | return (sstatus & 0xf) == 0x3; | ||
170 | } | ||
171 | |||
167 | /** | 172 | /** |
168 | * ata_link_next - link iteration helper | 173 | * ata_link_next - link iteration helper |
169 | * @link: the previous link, NULL to start | 174 | * @link: the previous link, NULL to start |
@@ -1015,18 +1020,6 @@ static const char *sata_spd_string(unsigned int spd) | |||
1015 | return spd_str[spd - 1]; | 1020 | return spd_str[spd - 1]; |
1016 | } | 1021 | } |
1017 | 1022 | ||
1018 | void ata_dev_disable(struct ata_device *dev) | ||
1019 | { | ||
1020 | if (ata_dev_enabled(dev)) { | ||
1021 | if (ata_msg_drv(dev->link->ap)) | ||
1022 | ata_dev_printk(dev, KERN_WARNING, "disabled\n"); | ||
1023 | ata_acpi_on_disable(dev); | ||
1024 | ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 | | ||
1025 | ATA_DNXFER_QUIET); | ||
1026 | dev->class++; | ||
1027 | } | ||
1028 | } | ||
1029 | |||
1030 | static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy) | 1023 | static int ata_dev_set_dipm(struct ata_device *dev, enum link_pm policy) |
1031 | { | 1024 | { |
1032 | struct ata_link *link = dev->link; | 1025 | struct ata_link *link = dev->link; |
@@ -2239,6 +2232,40 @@ retry: | |||
2239 | return rc; | 2232 | return rc; |
2240 | } | 2233 | } |
2241 | 2234 | ||
2235 | static int ata_do_link_spd_horkage(struct ata_device *dev) | ||
2236 | { | ||
2237 | struct ata_link *plink = ata_dev_phys_link(dev); | ||
2238 | u32 target, target_limit; | ||
2239 | |||
2240 | if (!sata_scr_valid(plink)) | ||
2241 | return 0; | ||
2242 | |||
2243 | if (dev->horkage & ATA_HORKAGE_1_5_GBPS) | ||
2244 | target = 1; | ||
2245 | else | ||
2246 | return 0; | ||
2247 | |||
2248 | target_limit = (1 << target) - 1; | ||
2249 | |||
2250 | /* if already on stricter limit, no need to push further */ | ||
2251 | if (plink->sata_spd_limit <= target_limit) | ||
2252 | return 0; | ||
2253 | |||
2254 | plink->sata_spd_limit = target_limit; | ||
2255 | |||
2256 | /* Request another EH round by returning -EAGAIN if link is | ||
2257 | * going faster than the target speed. Forward progress is | ||
2258 | * guaranteed by setting sata_spd_limit to target_limit above. | ||
2259 | */ | ||
2260 | if (plink->sata_spd > target) { | ||
2261 | ata_dev_printk(dev, KERN_INFO, | ||
2262 | "applying link speed limit horkage to %s\n", | ||
2263 | sata_spd_string(target)); | ||
2264 | return -EAGAIN; | ||
2265 | } | ||
2266 | return 0; | ||
2267 | } | ||
2268 | |||
2242 | static inline u8 ata_dev_knobble(struct ata_device *dev) | 2269 | static inline u8 ata_dev_knobble(struct ata_device *dev) |
2243 | { | 2270 | { |
2244 | struct ata_port *ap = dev->link->ap; | 2271 | struct ata_port *ap = dev->link->ap; |
@@ -2329,6 +2356,10 @@ int ata_dev_configure(struct ata_device *dev) | |||
2329 | return 0; | 2356 | return 0; |
2330 | } | 2357 | } |
2331 | 2358 | ||
2359 | rc = ata_do_link_spd_horkage(dev); | ||
2360 | if (rc) | ||
2361 | return rc; | ||
2362 | |||
2332 | /* let ACPI work its magic */ | 2363 | /* let ACPI work its magic */ |
2333 | rc = ata_acpi_on_devcfg(dev); | 2364 | rc = ata_acpi_on_devcfg(dev); |
2334 | if (rc) | 2365 | if (rc) |
@@ -2784,7 +2815,7 @@ int ata_bus_probe(struct ata_port *ap) | |||
2784 | /* This is the last chance, better to slow | 2815 | /* This is the last chance, better to slow |
2785 | * down than lose it. | 2816 | * down than lose it. |
2786 | */ | 2817 | */ |
2787 | sata_down_spd_limit(&ap->link); | 2818 | sata_down_spd_limit(&ap->link, 0); |
2788 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); | 2819 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); |
2789 | } | 2820 | } |
2790 | } | 2821 | } |
@@ -2880,21 +2911,27 @@ void ata_port_disable(struct ata_port *ap) | |||
2880 | /** | 2911 | /** |
2881 | * sata_down_spd_limit - adjust SATA spd limit downward | 2912 | * sata_down_spd_limit - adjust SATA spd limit downward |
2882 | * @link: Link to adjust SATA spd limit for | 2913 | * @link: Link to adjust SATA spd limit for |
2914 | * @spd_limit: Additional limit | ||
2883 | * | 2915 | * |
2884 | * Adjust SATA spd limit of @link downward. Note that this | 2916 | * Adjust SATA spd limit of @link downward. Note that this |
2885 | * function only adjusts the limit. The change must be applied | 2917 | * function only adjusts the limit. The change must be applied |
2886 | * using sata_set_spd(). | 2918 | * using sata_set_spd(). |
2887 | * | 2919 | * |
2920 | * If @spd_limit is non-zero, the speed is limited to equal to or | ||
2921 | * lower than @spd_limit if such speed is supported. If | ||
2922 | * @spd_limit is slower than any supported speed, only the lowest | ||
2923 | * supported speed is allowed. | ||
2924 | * | ||
2888 | * LOCKING: | 2925 | * LOCKING: |
2889 | * Inherited from caller. | 2926 | * Inherited from caller. |
2890 | * | 2927 | * |
2891 | * RETURNS: | 2928 | * RETURNS: |
2892 | * 0 on success, negative errno on failure | 2929 | * 0 on success, negative errno on failure |
2893 | */ | 2930 | */ |
2894 | int sata_down_spd_limit(struct ata_link *link) | 2931 | int sata_down_spd_limit(struct ata_link *link, u32 spd_limit) |
2895 | { | 2932 | { |
2896 | u32 sstatus, spd, mask; | 2933 | u32 sstatus, spd, mask; |
2897 | int rc, highbit; | 2934 | int rc, bit; |
2898 | 2935 | ||
2899 | if (!sata_scr_valid(link)) | 2936 | if (!sata_scr_valid(link)) |
2900 | return -EOPNOTSUPP; | 2937 | return -EOPNOTSUPP; |
@@ -2903,7 +2940,7 @@ int sata_down_spd_limit(struct ata_link *link) | |||
2903 | * If not, use cached value in link->sata_spd. | 2940 | * If not, use cached value in link->sata_spd. |
2904 | */ | 2941 | */ |
2905 | rc = sata_scr_read(link, SCR_STATUS, &sstatus); | 2942 | rc = sata_scr_read(link, SCR_STATUS, &sstatus); |
2906 | if (rc == 0) | 2943 | if (rc == 0 && ata_sstatus_online(sstatus)) |
2907 | spd = (sstatus >> 4) & 0xf; | 2944 | spd = (sstatus >> 4) & 0xf; |
2908 | else | 2945 | else |
2909 | spd = link->sata_spd; | 2946 | spd = link->sata_spd; |
@@ -2913,8 +2950,8 @@ int sata_down_spd_limit(struct ata_link *link) | |||
2913 | return -EINVAL; | 2950 | return -EINVAL; |
2914 | 2951 | ||
2915 | /* unconditionally mask off the highest bit */ | 2952 | /* unconditionally mask off the highest bit */ |
2916 | highbit = fls(mask) - 1; | 2953 | bit = fls(mask) - 1; |
2917 | mask &= ~(1 << highbit); | 2954 | mask &= ~(1 << bit); |
2918 | 2955 | ||
2919 | /* Mask off all speeds higher than or equal to the current | 2956 | /* Mask off all speeds higher than or equal to the current |
2920 | * one. Force 1.5Gbps if current SPD is not available. | 2957 | * one. Force 1.5Gbps if current SPD is not available. |
@@ -2928,6 +2965,15 @@ int sata_down_spd_limit(struct ata_link *link) | |||
2928 | if (!mask) | 2965 | if (!mask) |
2929 | return -EINVAL; | 2966 | return -EINVAL; |
2930 | 2967 | ||
2968 | if (spd_limit) { | ||
2969 | if (mask & ((1 << spd_limit) - 1)) | ||
2970 | mask &= (1 << spd_limit) - 1; | ||
2971 | else { | ||
2972 | bit = ffs(mask) - 1; | ||
2973 | mask = 1 << bit; | ||
2974 | } | ||
2975 | } | ||
2976 | |||
2931 | link->sata_spd_limit = mask; | 2977 | link->sata_spd_limit = mask; |
2932 | 2978 | ||
2933 | ata_link_printk(link, KERN_WARNING, "limiting SATA link speed to %s\n", | 2979 | ata_link_printk(link, KERN_WARNING, "limiting SATA link speed to %s\n", |
@@ -4215,6 +4261,9 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { | |||
4215 | /* Devices that do not need bridging limits applied */ | 4261 | /* Devices that do not need bridging limits applied */ |
4216 | { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, }, | 4262 | { "MTRON MSP-SATA*", NULL, ATA_HORKAGE_BRIDGE_OK, }, |
4217 | 4263 | ||
4264 | /* Devices which aren't very happy with higher link speeds */ | ||
4265 | { "WD My Book", NULL, ATA_HORKAGE_1_5_GBPS, }, | ||
4266 | |||
4218 | /* End Marker */ | 4267 | /* End Marker */ |
4219 | { } | 4268 | { } |
4220 | }; | 4269 | }; |
@@ -4709,8 +4758,7 @@ void swap_buf_le16(u16 *buf, unsigned int buf_words) | |||
4709 | 4758 | ||
4710 | /** | 4759 | /** |
4711 | * ata_qc_new - Request an available ATA command, for queueing | 4760 | * ata_qc_new - Request an available ATA command, for queueing |
4712 | * @ap: Port associated with device @dev | 4761 | * @ap: target port |
4713 | * @dev: Device from whom we request an available command structure | ||
4714 | * | 4762 | * |
4715 | * LOCKING: | 4763 | * LOCKING: |
4716 | * None. | 4764 | * None. |
@@ -5175,7 +5223,7 @@ bool ata_phys_link_online(struct ata_link *link) | |||
5175 | u32 sstatus; | 5223 | u32 sstatus; |
5176 | 5224 | ||
5177 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && | 5225 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && |
5178 | (sstatus & 0xf) == 0x3) | 5226 | ata_sstatus_online(sstatus)) |
5179 | return true; | 5227 | return true; |
5180 | return false; | 5228 | return false; |
5181 | } | 5229 | } |
@@ -5199,7 +5247,7 @@ bool ata_phys_link_offline(struct ata_link *link) | |||
5199 | u32 sstatus; | 5247 | u32 sstatus; |
5200 | 5248 | ||
5201 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && | 5249 | if (sata_scr_read(link, SCR_STATUS, &sstatus) == 0 && |
5202 | (sstatus & 0xf) != 0x3) | 5250 | !ata_sstatus_online(sstatus)) |
5203 | return true; | 5251 | return true; |
5204 | return false; | 5252 | return false; |
5205 | } | 5253 | } |
@@ -5412,8 +5460,8 @@ void ata_dev_init(struct ata_device *dev) | |||
5412 | dev->horkage = 0; | 5460 | dev->horkage = 0; |
5413 | spin_unlock_irqrestore(ap->lock, flags); | 5461 | spin_unlock_irqrestore(ap->lock, flags); |
5414 | 5462 | ||
5415 | memset((void *)dev + ATA_DEVICE_CLEAR_OFFSET, 0, | 5463 | memset((void *)dev + ATA_DEVICE_CLEAR_BEGIN, 0, |
5416 | sizeof(*dev) - ATA_DEVICE_CLEAR_OFFSET); | 5464 | ATA_DEVICE_CLEAR_END - ATA_DEVICE_CLEAR_BEGIN); |
5417 | dev->pio_mask = UINT_MAX; | 5465 | dev->pio_mask = UINT_MAX; |
5418 | dev->mwdma_mask = UINT_MAX; | 5466 | dev->mwdma_mask = UINT_MAX; |
5419 | dev->udma_mask = UINT_MAX; | 5467 | dev->udma_mask = UINT_MAX; |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 8147a8386370..ce2ef0475339 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -82,6 +82,10 @@ enum { | |||
82 | ATA_EH_FASTDRAIN_INTERVAL = 3000, | 82 | ATA_EH_FASTDRAIN_INTERVAL = 3000, |
83 | 83 | ||
84 | ATA_EH_UA_TRIES = 5, | 84 | ATA_EH_UA_TRIES = 5, |
85 | |||
86 | /* probe speed down parameters, see ata_eh_schedule_probe() */ | ||
87 | ATA_EH_PROBE_TRIAL_INTERVAL = 60000, /* 1 min */ | ||
88 | ATA_EH_PROBE_TRIALS = 2, | ||
85 | }; | 89 | }; |
86 | 90 | ||
87 | /* The following table determines how we sequence resets. Each entry | 91 | /* The following table determines how we sequence resets. Each entry |
@@ -1176,6 +1180,32 @@ void ata_eh_qc_retry(struct ata_queued_cmd *qc) | |||
1176 | } | 1180 | } |
1177 | 1181 | ||
1178 | /** | 1182 | /** |
1183 | * ata_dev_disable - disable ATA device | ||
1184 | * @dev: ATA device to disable | ||
1185 | * | ||
1186 | * Disable @dev. | ||
1187 | * | ||
1188 | * Locking: | ||
1189 | * EH context. | ||
1190 | */ | ||
1191 | void ata_dev_disable(struct ata_device *dev) | ||
1192 | { | ||
1193 | if (!ata_dev_enabled(dev)) | ||
1194 | return; | ||
1195 | |||
1196 | if (ata_msg_drv(dev->link->ap)) | ||
1197 | ata_dev_printk(dev, KERN_WARNING, "disabled\n"); | ||
1198 | ata_acpi_on_disable(dev); | ||
1199 | ata_down_xfermask_limit(dev, ATA_DNXFER_FORCE_PIO0 | ATA_DNXFER_QUIET); | ||
1200 | dev->class++; | ||
1201 | |||
1202 | /* From now till the next successful probe, ering is used to | ||
1203 | * track probe failures. Clear accumulated device error info. | ||
1204 | */ | ||
1205 | ata_ering_clear(&dev->ering); | ||
1206 | } | ||
1207 | |||
1208 | /** | ||
1179 | * ata_eh_detach_dev - detach ATA device | 1209 | * ata_eh_detach_dev - detach ATA device |
1180 | * @dev: ATA device to detach | 1210 | * @dev: ATA device to detach |
1181 | * | 1211 | * |
@@ -1849,7 +1879,7 @@ static unsigned int ata_eh_speed_down(struct ata_device *dev, | |||
1849 | /* speed down? */ | 1879 | /* speed down? */ |
1850 | if (verdict & ATA_EH_SPDN_SPEED_DOWN) { | 1880 | if (verdict & ATA_EH_SPDN_SPEED_DOWN) { |
1851 | /* speed down SATA link speed if possible */ | 1881 | /* speed down SATA link speed if possible */ |
1852 | if (sata_down_spd_limit(link) == 0) { | 1882 | if (sata_down_spd_limit(link, 0) == 0) { |
1853 | action |= ATA_EH_RESET; | 1883 | action |= ATA_EH_RESET; |
1854 | goto done; | 1884 | goto done; |
1855 | } | 1885 | } |
@@ -2601,11 +2631,11 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2601 | } | 2631 | } |
2602 | 2632 | ||
2603 | if (try == max_tries - 1) { | 2633 | if (try == max_tries - 1) { |
2604 | sata_down_spd_limit(link); | 2634 | sata_down_spd_limit(link, 0); |
2605 | if (slave) | 2635 | if (slave) |
2606 | sata_down_spd_limit(slave); | 2636 | sata_down_spd_limit(slave, 0); |
2607 | } else if (rc == -EPIPE) | 2637 | } else if (rc == -EPIPE) |
2608 | sata_down_spd_limit(failed_link); | 2638 | sata_down_spd_limit(failed_link, 0); |
2609 | 2639 | ||
2610 | if (hardreset) | 2640 | if (hardreset) |
2611 | reset = hardreset; | 2641 | reset = hardreset; |
@@ -2744,6 +2774,8 @@ static int ata_eh_revalidate_and_attach(struct ata_link *link, | |||
2744 | readid_flags, dev->id); | 2774 | readid_flags, dev->id); |
2745 | switch (rc) { | 2775 | switch (rc) { |
2746 | case 0: | 2776 | case 0: |
2777 | /* clear error info accumulated during probe */ | ||
2778 | ata_ering_clear(&dev->ering); | ||
2747 | new_mask |= 1 << dev->devno; | 2779 | new_mask |= 1 << dev->devno; |
2748 | break; | 2780 | break; |
2749 | case -ENOENT: | 2781 | case -ENOENT: |
@@ -2947,9 +2979,24 @@ static int ata_eh_skip_recovery(struct ata_link *link) | |||
2947 | return 1; | 2979 | return 1; |
2948 | } | 2980 | } |
2949 | 2981 | ||
2982 | static int ata_count_probe_trials_cb(struct ata_ering_entry *ent, void *void_arg) | ||
2983 | { | ||
2984 | u64 interval = msecs_to_jiffies(ATA_EH_PROBE_TRIAL_INTERVAL); | ||
2985 | u64 now = get_jiffies_64(); | ||
2986 | int *trials = void_arg; | ||
2987 | |||
2988 | if (ent->timestamp < now - min(now, interval)) | ||
2989 | return -1; | ||
2990 | |||
2991 | (*trials)++; | ||
2992 | return 0; | ||
2993 | } | ||
2994 | |||
2950 | static int ata_eh_schedule_probe(struct ata_device *dev) | 2995 | static int ata_eh_schedule_probe(struct ata_device *dev) |
2951 | { | 2996 | { |
2952 | struct ata_eh_context *ehc = &dev->link->eh_context; | 2997 | struct ata_eh_context *ehc = &dev->link->eh_context; |
2998 | struct ata_link *link = ata_dev_phys_link(dev); | ||
2999 | int trials = 0; | ||
2953 | 3000 | ||
2954 | if (!(ehc->i.probe_mask & (1 << dev->devno)) || | 3001 | if (!(ehc->i.probe_mask & (1 << dev->devno)) || |
2955 | (ehc->did_probe_mask & (1 << dev->devno))) | 3002 | (ehc->did_probe_mask & (1 << dev->devno))) |
@@ -2962,6 +3009,25 @@ static int ata_eh_schedule_probe(struct ata_device *dev) | |||
2962 | ehc->saved_xfer_mode[dev->devno] = 0; | 3009 | ehc->saved_xfer_mode[dev->devno] = 0; |
2963 | ehc->saved_ncq_enabled &= ~(1 << dev->devno); | 3010 | ehc->saved_ncq_enabled &= ~(1 << dev->devno); |
2964 | 3011 | ||
3012 | /* Record and count probe trials on the ering. The specific | ||
3013 | * error mask used is irrelevant. Because a successful device | ||
3014 | * detection clears the ering, this count accumulates only if | ||
3015 | * there are consecutive failed probes. | ||
3016 | * | ||
3017 | * If the count is equal to or higher than ATA_EH_PROBE_TRIALS | ||
3018 | * in the last ATA_EH_PROBE_TRIAL_INTERVAL, link speed is | ||
3019 | * forced to 1.5Gbps. | ||
3020 | * | ||
3021 | * This is to work around cases where failed link speed | ||
3022 | * negotiation results in device misdetection leading to | ||
3023 | * infinite DEVXCHG or PHRDY CHG events. | ||
3024 | */ | ||
3025 | ata_ering_record(&dev->ering, 0, AC_ERR_OTHER); | ||
3026 | ata_ering_map(&dev->ering, ata_count_probe_trials_cb, &trials); | ||
3027 | |||
3028 | if (trials > ATA_EH_PROBE_TRIALS) | ||
3029 | sata_down_spd_limit(link, 1); | ||
3030 | |||
2965 | return 1; | 3031 | return 1; |
2966 | } | 3032 | } |
2967 | 3033 | ||
@@ -2969,7 +3035,11 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err) | |||
2969 | { | 3035 | { |
2970 | struct ata_eh_context *ehc = &dev->link->eh_context; | 3036 | struct ata_eh_context *ehc = &dev->link->eh_context; |
2971 | 3037 | ||
2972 | ehc->tries[dev->devno]--; | 3038 | /* -EAGAIN from EH routine indicates retry without prejudice. |
3039 | * The requester is responsible for ensuring forward progress. | ||
3040 | */ | ||
3041 | if (err != -EAGAIN) | ||
3042 | ehc->tries[dev->devno]--; | ||
2973 | 3043 | ||
2974 | switch (err) { | 3044 | switch (err) { |
2975 | case -ENODEV: | 3045 | case -ENODEV: |
@@ -2979,12 +3049,13 @@ static int ata_eh_handle_dev_fail(struct ata_device *dev, int err) | |||
2979 | /* give it just one more chance */ | 3049 | /* give it just one more chance */ |
2980 | ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); | 3050 | ehc->tries[dev->devno] = min(ehc->tries[dev->devno], 1); |
2981 | case -EIO: | 3051 | case -EIO: |
2982 | if (ehc->tries[dev->devno] == 1 && dev->pio_mode > XFER_PIO_0) { | 3052 | if (ehc->tries[dev->devno] == 1) { |
2983 | /* This is the last chance, better to slow | 3053 | /* This is the last chance, better to slow |
2984 | * down than lose it. | 3054 | * down than lose it. |
2985 | */ | 3055 | */ |
2986 | sata_down_spd_limit(ata_dev_phys_link(dev)); | 3056 | sata_down_spd_limit(ata_dev_phys_link(dev), 0); |
2987 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); | 3057 | if (dev->pio_mode > XFER_PIO_0) |
3058 | ata_down_xfermask_limit(dev, ATA_DNXFER_PIO); | ||
2988 | } | 3059 | } |
2989 | } | 3060 | } |
2990 | 3061 | ||
diff --git a/drivers/ata/libata-pmp.c b/drivers/ata/libata-pmp.c index 98ca07a2db87..619f2c33950e 100644 --- a/drivers/ata/libata-pmp.c +++ b/drivers/ata/libata-pmp.c | |||
@@ -729,7 +729,7 @@ static int sata_pmp_eh_recover_pmp(struct ata_port *ap, | |||
729 | if (tries) { | 729 | if (tries) { |
730 | /* consecutive revalidation failures? speed down */ | 730 | /* consecutive revalidation failures? speed down */ |
731 | if (reval_failed) | 731 | if (reval_failed) |
732 | sata_down_spd_limit(link); | 732 | sata_down_spd_limit(link, 0); |
733 | else | 733 | else |
734 | reval_failed = 1; | 734 | reval_failed = 1; |
735 | 735 | ||
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3c4c5ae277ba..b9747fa59e54 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -415,6 +415,7 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, | |||
415 | 415 | ||
416 | /** | 416 | /** |
417 | * ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl | 417 | * ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl |
418 | * @ap: target port | ||
418 | * @sdev: SCSI device to get identify data for | 419 | * @sdev: SCSI device to get identify data for |
419 | * @arg: User buffer area for identify data | 420 | * @arg: User buffer area for identify data |
420 | * | 421 | * |
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index fe2839e58774..cea8014cd87e 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h | |||
@@ -79,7 +79,6 @@ extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev, | |||
79 | u64 block, u32 n_block, unsigned int tf_flags, | 79 | u64 block, u32 n_block, unsigned int tf_flags, |
80 | unsigned int tag); | 80 | unsigned int tag); |
81 | extern u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev); | 81 | extern u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev); |
82 | extern void ata_dev_disable(struct ata_device *dev); | ||
83 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, | 82 | extern void ata_pio_queue_task(struct ata_port *ap, void *data, |
84 | unsigned long delay); | 83 | unsigned long delay); |
85 | extern void ata_port_flush_task(struct ata_port *ap); | 84 | extern void ata_port_flush_task(struct ata_port *ap); |
@@ -100,7 +99,7 @@ extern int ata_dev_reread_id(struct ata_device *dev, unsigned int readid_flags); | |||
100 | extern int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class, | 99 | extern int ata_dev_revalidate(struct ata_device *dev, unsigned int new_class, |
101 | unsigned int readid_flags); | 100 | unsigned int readid_flags); |
102 | extern int ata_dev_configure(struct ata_device *dev); | 101 | extern int ata_dev_configure(struct ata_device *dev); |
103 | extern int sata_down_spd_limit(struct ata_link *link); | 102 | extern int sata_down_spd_limit(struct ata_link *link, u32 spd_limit); |
104 | extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel); | 103 | extern int ata_down_xfermask_limit(struct ata_device *dev, unsigned int sel); |
105 | extern void ata_sg_clean(struct ata_queued_cmd *qc); | 104 | extern void ata_sg_clean(struct ata_queued_cmd *qc); |
106 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 105 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
@@ -160,6 +159,7 @@ extern void ata_scsi_error(struct Scsi_Host *host); | |||
160 | extern void ata_port_wait_eh(struct ata_port *ap); | 159 | extern void ata_port_wait_eh(struct ata_port *ap); |
161 | extern void ata_eh_fastdrain_timerfn(unsigned long arg); | 160 | extern void ata_eh_fastdrain_timerfn(unsigned long arg); |
162 | extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); | 161 | extern void ata_qc_schedule_eh(struct ata_queued_cmd *qc); |
162 | extern void ata_dev_disable(struct ata_device *dev); | ||
163 | extern void ata_eh_detach_dev(struct ata_device *dev); | 163 | extern void ata_eh_detach_dev(struct ata_device *dev); |
164 | extern void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev, | 164 | extern void ata_eh_about_to_do(struct ata_link *link, struct ata_device *dev, |
165 | unsigned int action); | 165 | unsigned int action); |
diff --git a/drivers/ata/pata_qdi.c b/drivers/ata/pata_qdi.c index 3080f371222c..f1b26f7c8e4d 100644 --- a/drivers/ata/pata_qdi.c +++ b/drivers/ata/pata_qdi.c | |||
@@ -12,7 +12,7 @@ | |||
12 | * | 12 | * |
13 | * Probe code based on drivers/ide/legacy/qd65xx.c | 13 | * Probe code based on drivers/ide/legacy/qd65xx.c |
14 | * Rewritten from the work of Colten Edwards <pje120@cs.usask.ca> by | 14 | * Rewritten from the work of Colten Edwards <pje120@cs.usask.ca> by |
15 | * Samuel Thibault <samuel.thibault@fnac.net> | 15 | * Samuel Thibault <samuel.thibault@ens-lyon.org> |
16 | */ | 16 | */ |
17 | 17 | ||
18 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index f2d8a020ea53..4ae1a4138b47 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -663,8 +663,8 @@ static const struct pci_device_id mv_pci_tbl[] = { | |||
663 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, | 663 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, |
664 | /* RocketRAID 1720/174x have different identifiers */ | 664 | /* RocketRAID 1720/174x have different identifiers */ |
665 | { PCI_VDEVICE(TTI, 0x1720), chip_6042 }, | 665 | { PCI_VDEVICE(TTI, 0x1720), chip_6042 }, |
666 | { PCI_VDEVICE(TTI, 0x1740), chip_508x }, | 666 | { PCI_VDEVICE(TTI, 0x1740), chip_6042 }, |
667 | { PCI_VDEVICE(TTI, 0x1742), chip_508x }, | 667 | { PCI_VDEVICE(TTI, 0x1742), chip_6042 }, |
668 | 668 | ||
669 | { PCI_VDEVICE(MARVELL, 0x6040), chip_604x }, | 669 | { PCI_VDEVICE(MARVELL, 0x6040), chip_604x }, |
670 | { PCI_VDEVICE(MARVELL, 0x6041), chip_604x }, | 670 | { PCI_VDEVICE(MARVELL, 0x6041), chip_604x }, |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index c49ad0e61b6f..444af0415ca1 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -436,11 +436,16 @@ static struct ata_port_operations nv_nf2_ops = { | |||
436 | .hardreset = nv_noclassify_hardreset, | 436 | .hardreset = nv_noclassify_hardreset, |
437 | }; | 437 | }; |
438 | 438 | ||
439 | /* CK804 finally gets hardreset right */ | 439 | /* For initial probing after boot and hot plugging, hardreset mostly |
440 | * works fine on CK804 but curiously, reprobing on the initial port by | ||
441 | * rescanning or rmmod/insmod fails to acquire the initial D2H Reg FIS | ||
442 | * in somewhat undeterministic way. Use noclassify hardreset. | ||
443 | */ | ||
440 | static struct ata_port_operations nv_ck804_ops = { | 444 | static struct ata_port_operations nv_ck804_ops = { |
441 | .inherits = &nv_common_ops, | 445 | .inherits = &nv_common_ops, |
442 | .freeze = nv_ck804_freeze, | 446 | .freeze = nv_ck804_freeze, |
443 | .thaw = nv_ck804_thaw, | 447 | .thaw = nv_ck804_thaw, |
448 | .hardreset = nv_noclassify_hardreset, | ||
444 | .host_stop = nv_ck804_host_stop, | 449 | .host_stop = nv_ck804_host_stop, |
445 | }; | 450 | }; |
446 | 451 | ||
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index 9f029595f454..d0091609e210 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
@@ -324,7 +324,7 @@ static void sil_fill_sg(struct ata_queued_cmd *qc) | |||
324 | 324 | ||
325 | prd->addr = cpu_to_le32(addr); | 325 | prd->addr = cpu_to_le32(addr); |
326 | prd->flags_len = cpu_to_le32(sg_len); | 326 | prd->flags_len = cpu_to_le32(sg_len); |
327 | VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", pi, addr, sg_len); | 327 | VPRINTK("PRD[%u] = (0x%X, 0x%X)\n", si, addr, sg_len); |
328 | 328 | ||
329 | last_prd = prd; | 329 | last_prd = prd; |
330 | prd++; | 330 | prd++; |
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index f5be8081cd81..735bbe2be51a 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -761,7 +761,7 @@ source "drivers/char/hw_random/Kconfig" | |||
761 | 761 | ||
762 | config NVRAM | 762 | config NVRAM |
763 | tristate "/dev/nvram support" | 763 | tristate "/dev/nvram support" |
764 | depends on ATARI || X86 || ARM || GENERIC_NVRAM | 764 | depends on ATARI || X86 || (ARM && RTC_DRV_CMOS) || GENERIC_NVRAM |
765 | ---help--- | 765 | ---help--- |
766 | If you say Y here and create a character special file /dev/nvram | 766 | If you say Y here and create a character special file /dev/nvram |
767 | with major number 10 and minor number 144 using mknod ("man mknod"), | 767 | with major number 10 and minor number 144 using mknod ("man mknod"), |
diff --git a/drivers/char/selection.c b/drivers/char/selection.c index f29fbe9b8ed7..cb8ca5698963 100644 --- a/drivers/char/selection.c +++ b/drivers/char/selection.c | |||
@@ -268,7 +268,7 @@ int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *t | |||
268 | 268 | ||
269 | /* Allocate a new buffer before freeing the old one ... */ | 269 | /* Allocate a new buffer before freeing the old one ... */ |
270 | multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */ | 270 | multiplier = use_unicode ? 3 : 1; /* chars can take up to 3 bytes */ |
271 | bp = kmalloc((sel_end-sel_start)/2*multiplier+1, GFP_KERNEL); | 271 | bp = kmalloc(((sel_end-sel_start)/2+1)*multiplier, GFP_KERNEL); |
272 | if (!bp) { | 272 | if (!bp) { |
273 | printk(KERN_WARNING "selection: kmalloc() failed\n"); | 273 | printk(KERN_WARNING "selection: kmalloc() failed\n"); |
274 | clear_selection(); | 274 | clear_selection(); |
diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index 55433849bfa6..33bd75347518 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <linux/device.h> | 28 | #include <linux/device.h> |
29 | #include <linux/dca.h> | 29 | #include <linux/dca.h> |
30 | 30 | ||
31 | #define DCA_VERSION "1.4" | 31 | #define DCA_VERSION "1.8" |
32 | 32 | ||
33 | MODULE_VERSION(DCA_VERSION); | 33 | MODULE_VERSION(DCA_VERSION); |
34 | MODULE_LICENSE("GPL"); | 34 | MODULE_LICENSE("GPL"); |
@@ -60,16 +60,17 @@ int dca_add_requester(struct device *dev) | |||
60 | { | 60 | { |
61 | struct dca_provider *dca; | 61 | struct dca_provider *dca; |
62 | int err, slot = -ENODEV; | 62 | int err, slot = -ENODEV; |
63 | unsigned long flags; | ||
63 | 64 | ||
64 | if (!dev) | 65 | if (!dev) |
65 | return -EFAULT; | 66 | return -EFAULT; |
66 | 67 | ||
67 | spin_lock(&dca_lock); | 68 | spin_lock_irqsave(&dca_lock, flags); |
68 | 69 | ||
69 | /* check if the requester has not been added already */ | 70 | /* check if the requester has not been added already */ |
70 | dca = dca_find_provider_by_dev(dev); | 71 | dca = dca_find_provider_by_dev(dev); |
71 | if (dca) { | 72 | if (dca) { |
72 | spin_unlock(&dca_lock); | 73 | spin_unlock_irqrestore(&dca_lock, flags); |
73 | return -EEXIST; | 74 | return -EEXIST; |
74 | } | 75 | } |
75 | 76 | ||
@@ -78,19 +79,21 @@ int dca_add_requester(struct device *dev) | |||
78 | if (slot >= 0) | 79 | if (slot >= 0) |
79 | break; | 80 | break; |
80 | } | 81 | } |
81 | if (slot < 0) { | 82 | |
82 | spin_unlock(&dca_lock); | 83 | spin_unlock_irqrestore(&dca_lock, flags); |
84 | |||
85 | if (slot < 0) | ||
83 | return slot; | 86 | return slot; |
84 | } | ||
85 | 87 | ||
86 | err = dca_sysfs_add_req(dca, dev, slot); | 88 | err = dca_sysfs_add_req(dca, dev, slot); |
87 | if (err) { | 89 | if (err) { |
88 | dca->ops->remove_requester(dca, dev); | 90 | spin_lock_irqsave(&dca_lock, flags); |
89 | spin_unlock(&dca_lock); | 91 | if (dca == dca_find_provider_by_dev(dev)) |
92 | dca->ops->remove_requester(dca, dev); | ||
93 | spin_unlock_irqrestore(&dca_lock, flags); | ||
90 | return err; | 94 | return err; |
91 | } | 95 | } |
92 | 96 | ||
93 | spin_unlock(&dca_lock); | ||
94 | return 0; | 97 | return 0; |
95 | } | 98 | } |
96 | EXPORT_SYMBOL_GPL(dca_add_requester); | 99 | EXPORT_SYMBOL_GPL(dca_add_requester); |
@@ -103,25 +106,25 @@ int dca_remove_requester(struct device *dev) | |||
103 | { | 106 | { |
104 | struct dca_provider *dca; | 107 | struct dca_provider *dca; |
105 | int slot; | 108 | int slot; |
109 | unsigned long flags; | ||
106 | 110 | ||
107 | if (!dev) | 111 | if (!dev) |
108 | return -EFAULT; | 112 | return -EFAULT; |
109 | 113 | ||
110 | spin_lock(&dca_lock); | 114 | spin_lock_irqsave(&dca_lock, flags); |
111 | dca = dca_find_provider_by_dev(dev); | 115 | dca = dca_find_provider_by_dev(dev); |
112 | if (!dca) { | 116 | if (!dca) { |
113 | spin_unlock(&dca_lock); | 117 | spin_unlock_irqrestore(&dca_lock, flags); |
114 | return -ENODEV; | 118 | return -ENODEV; |
115 | } | 119 | } |
116 | slot = dca->ops->remove_requester(dca, dev); | 120 | slot = dca->ops->remove_requester(dca, dev); |
117 | if (slot < 0) { | 121 | spin_unlock_irqrestore(&dca_lock, flags); |
118 | spin_unlock(&dca_lock); | 122 | |
123 | if (slot < 0) | ||
119 | return slot; | 124 | return slot; |
120 | } | ||
121 | 125 | ||
122 | dca_sysfs_remove_req(dca, slot); | 126 | dca_sysfs_remove_req(dca, slot); |
123 | 127 | ||
124 | spin_unlock(&dca_lock); | ||
125 | return 0; | 128 | return 0; |
126 | } | 129 | } |
127 | EXPORT_SYMBOL_GPL(dca_remove_requester); | 130 | EXPORT_SYMBOL_GPL(dca_remove_requester); |
@@ -135,17 +138,18 @@ u8 dca_common_get_tag(struct device *dev, int cpu) | |||
135 | { | 138 | { |
136 | struct dca_provider *dca; | 139 | struct dca_provider *dca; |
137 | u8 tag; | 140 | u8 tag; |
141 | unsigned long flags; | ||
138 | 142 | ||
139 | spin_lock(&dca_lock); | 143 | spin_lock_irqsave(&dca_lock, flags); |
140 | 144 | ||
141 | dca = dca_find_provider_by_dev(dev); | 145 | dca = dca_find_provider_by_dev(dev); |
142 | if (!dca) { | 146 | if (!dca) { |
143 | spin_unlock(&dca_lock); | 147 | spin_unlock_irqrestore(&dca_lock, flags); |
144 | return -ENODEV; | 148 | return -ENODEV; |
145 | } | 149 | } |
146 | tag = dca->ops->get_tag(dca, dev, cpu); | 150 | tag = dca->ops->get_tag(dca, dev, cpu); |
147 | 151 | ||
148 | spin_unlock(&dca_lock); | 152 | spin_unlock_irqrestore(&dca_lock, flags); |
149 | return tag; | 153 | return tag; |
150 | } | 154 | } |
151 | 155 | ||
@@ -217,11 +221,16 @@ static BLOCKING_NOTIFIER_HEAD(dca_provider_chain); | |||
217 | int register_dca_provider(struct dca_provider *dca, struct device *dev) | 221 | int register_dca_provider(struct dca_provider *dca, struct device *dev) |
218 | { | 222 | { |
219 | int err; | 223 | int err; |
224 | unsigned long flags; | ||
220 | 225 | ||
221 | err = dca_sysfs_add_provider(dca, dev); | 226 | err = dca_sysfs_add_provider(dca, dev); |
222 | if (err) | 227 | if (err) |
223 | return err; | 228 | return err; |
229 | |||
230 | spin_lock_irqsave(&dca_lock, flags); | ||
224 | list_add(&dca->node, &dca_providers); | 231 | list_add(&dca->node, &dca_providers); |
232 | spin_unlock_irqrestore(&dca_lock, flags); | ||
233 | |||
225 | blocking_notifier_call_chain(&dca_provider_chain, | 234 | blocking_notifier_call_chain(&dca_provider_chain, |
226 | DCA_PROVIDER_ADD, NULL); | 235 | DCA_PROVIDER_ADD, NULL); |
227 | return 0; | 236 | return 0; |
@@ -234,9 +243,15 @@ EXPORT_SYMBOL_GPL(register_dca_provider); | |||
234 | */ | 243 | */ |
235 | void unregister_dca_provider(struct dca_provider *dca) | 244 | void unregister_dca_provider(struct dca_provider *dca) |
236 | { | 245 | { |
246 | unsigned long flags; | ||
247 | |||
237 | blocking_notifier_call_chain(&dca_provider_chain, | 248 | blocking_notifier_call_chain(&dca_provider_chain, |
238 | DCA_PROVIDER_REMOVE, NULL); | 249 | DCA_PROVIDER_REMOVE, NULL); |
250 | |||
251 | spin_lock_irqsave(&dca_lock, flags); | ||
239 | list_del(&dca->node); | 252 | list_del(&dca->node); |
253 | spin_unlock_irqrestore(&dca_lock, flags); | ||
254 | |||
240 | dca_sysfs_remove_provider(dca); | 255 | dca_sysfs_remove_provider(dca); |
241 | } | 256 | } |
242 | EXPORT_SYMBOL_GPL(unregister_dca_provider); | 257 | EXPORT_SYMBOL_GPL(unregister_dca_provider); |
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 9da581452874..6915fb82d0b0 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c | |||
@@ -136,7 +136,7 @@ drm_gem_object_alloc(struct drm_device *dev, size_t size) | |||
136 | obj = kcalloc(1, sizeof(*obj), GFP_KERNEL); | 136 | obj = kcalloc(1, sizeof(*obj), GFP_KERNEL); |
137 | 137 | ||
138 | obj->dev = dev; | 138 | obj->dev = dev; |
139 | obj->filp = shmem_file_setup("drm mm object", size, 0); | 139 | obj->filp = shmem_file_setup("drm mm object", size, VM_NORESERVE); |
140 | if (IS_ERR(obj->filp)) { | 140 | if (IS_ERR(obj->filp)) { |
141 | kfree(obj); | 141 | kfree(obj); |
142 | return NULL; | 142 | return NULL; |
diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig index b1c6f68d98ce..3dad2299d9c5 100644 --- a/drivers/ide/Kconfig +++ b/drivers/ide/Kconfig | |||
@@ -465,6 +465,16 @@ config BLK_DEV_CS5535 | |||
465 | 465 | ||
466 | It is safe to say Y to this question. | 466 | It is safe to say Y to this question. |
467 | 467 | ||
468 | config BLK_DEV_CS5536 | ||
469 | tristate "CS5536 chipset support" | ||
470 | depends on X86_32 | ||
471 | select BLK_DEV_IDEDMA_PCI | ||
472 | help | ||
473 | This option enables support for the AMD CS5536 | ||
474 | companion chip used with the Geode LX processor family. | ||
475 | |||
476 | If unsure, say N. | ||
477 | |||
468 | config BLK_DEV_HPT366 | 478 | config BLK_DEV_HPT366 |
469 | tristate "HPT36X/37X chipset support" | 479 | tristate "HPT36X/37X chipset support" |
470 | select BLK_DEV_IDEDMA_PCI | 480 | select BLK_DEV_IDEDMA_PCI |
diff --git a/drivers/ide/Makefile b/drivers/ide/Makefile index c2b9c93f0095..d0e3d7d5b467 100644 --- a/drivers/ide/Makefile +++ b/drivers/ide/Makefile | |||
@@ -43,6 +43,7 @@ obj-$(CONFIG_BLK_DEV_CMD64X) += cmd64x.o | |||
43 | obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o | 43 | obj-$(CONFIG_BLK_DEV_CS5520) += cs5520.o |
44 | obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o | 44 | obj-$(CONFIG_BLK_DEV_CS5530) += cs5530.o |
45 | obj-$(CONFIG_BLK_DEV_CS5535) += cs5535.o | 45 | obj-$(CONFIG_BLK_DEV_CS5535) += cs5535.o |
46 | obj-$(CONFIG_BLK_DEV_CS5536) += cs5536.o | ||
46 | obj-$(CONFIG_BLK_DEV_SC1200) += sc1200.o | 47 | obj-$(CONFIG_BLK_DEV_SC1200) += sc1200.o |
47 | obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o | 48 | obj-$(CONFIG_BLK_DEV_CY82C693) += cy82c693.o |
48 | obj-$(CONFIG_BLK_DEV_DELKIN) += delkin_cb.o | 49 | obj-$(CONFIG_BLK_DEV_DELKIN) += delkin_cb.o |
diff --git a/drivers/ide/cs5536.c b/drivers/ide/cs5536.c new file mode 100644 index 000000000000..7a62db719a46 --- /dev/null +++ b/drivers/ide/cs5536.c | |||
@@ -0,0 +1,308 @@ | |||
1 | /* | ||
2 | * CS5536 PATA support | ||
3 | * (C) 2007 Martin K. Petersen <mkp@mkp.net> | ||
4 | * (C) 2009 Bartlomiej Zolnierkiewicz | ||
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 | * This program is distributed in the hope that it will be useful, | ||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | * GNU General Public License for more details. | ||
14 | * | ||
15 | * You should have received a copy of the GNU General Public License | ||
16 | * along with this program; if not, write to the Free Software | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | * | ||
19 | * Documentation: | ||
20 | * Available from AMD web site. | ||
21 | * | ||
22 | * The IDE timing registers for the CS5536 live in the Geode Machine | ||
23 | * Specific Register file and not PCI config space. Most BIOSes | ||
24 | * virtualize the PCI registers so the chip looks like a standard IDE | ||
25 | * controller. Unfortunately not all implementations get this right. | ||
26 | * In particular some have problems with unaligned accesses to the | ||
27 | * virtualized PCI registers. This driver always does full dword | ||
28 | * writes to work around the issue. Also, in case of a bad BIOS this | ||
29 | * driver can be loaded with the "msr=1" parameter which forces using | ||
30 | * the Machine Specific Registers to configure the device. | ||
31 | */ | ||
32 | |||
33 | #include <linux/kernel.h> | ||
34 | #include <linux/module.h> | ||
35 | #include <linux/pci.h> | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/ide.h> | ||
38 | #include <asm/msr.h> | ||
39 | |||
40 | #define DRV_NAME "cs5536" | ||
41 | |||
42 | enum { | ||
43 | MSR_IDE_CFG = 0x51300010, | ||
44 | PCI_IDE_CFG = 0x40, | ||
45 | |||
46 | CFG = 0, | ||
47 | DTC = 2, | ||
48 | CAST = 3, | ||
49 | ETC = 4, | ||
50 | |||
51 | IDE_CFG_CHANEN = (1 << 1), | ||
52 | IDE_CFG_CABLE = (1 << 17) | (1 << 16), | ||
53 | |||
54 | IDE_D0_SHIFT = 24, | ||
55 | IDE_D1_SHIFT = 16, | ||
56 | IDE_DRV_MASK = 0xff, | ||
57 | |||
58 | IDE_CAST_D0_SHIFT = 6, | ||
59 | IDE_CAST_D1_SHIFT = 4, | ||
60 | IDE_CAST_DRV_MASK = 0x3, | ||
61 | |||
62 | IDE_CAST_CMD_SHIFT = 24, | ||
63 | IDE_CAST_CMD_MASK = 0xff, | ||
64 | |||
65 | IDE_ETC_UDMA_MASK = 0xc0, | ||
66 | }; | ||
67 | |||
68 | static int use_msr; | ||
69 | |||
70 | static int cs5536_read(struct pci_dev *pdev, int reg, u32 *val) | ||
71 | { | ||
72 | if (unlikely(use_msr)) { | ||
73 | u32 dummy; | ||
74 | |||
75 | rdmsr(MSR_IDE_CFG + reg, *val, dummy); | ||
76 | return 0; | ||
77 | } | ||
78 | |||
79 | return pci_read_config_dword(pdev, PCI_IDE_CFG + reg * 4, val); | ||
80 | } | ||
81 | |||
82 | static int cs5536_write(struct pci_dev *pdev, int reg, int val) | ||
83 | { | ||
84 | if (unlikely(use_msr)) { | ||
85 | wrmsr(MSR_IDE_CFG + reg, val, 0); | ||
86 | return 0; | ||
87 | } | ||
88 | |||
89 | return pci_write_config_dword(pdev, PCI_IDE_CFG + reg * 4, val); | ||
90 | } | ||
91 | |||
92 | static void cs5536_program_dtc(ide_drive_t *drive, u8 tim) | ||
93 | { | ||
94 | struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); | ||
95 | int dshift = (drive->dn & 1) ? IDE_D1_SHIFT : IDE_D0_SHIFT; | ||
96 | u32 dtc; | ||
97 | |||
98 | cs5536_read(pdev, DTC, &dtc); | ||
99 | dtc &= ~(IDE_DRV_MASK << dshift); | ||
100 | dtc |= tim << dshift; | ||
101 | cs5536_write(pdev, DTC, dtc); | ||
102 | } | ||
103 | |||
104 | /** | ||
105 | * cs5536_cable_detect - detect cable type | ||
106 | * @hwif: Port to detect on | ||
107 | * | ||
108 | * Perform cable detection for ATA66 capable cable. | ||
109 | * | ||
110 | * Returns a cable type. | ||
111 | */ | ||
112 | |||
113 | static u8 cs5536_cable_detect(ide_hwif_t *hwif) | ||
114 | { | ||
115 | struct pci_dev *pdev = to_pci_dev(hwif->dev); | ||
116 | u32 cfg; | ||
117 | |||
118 | cs5536_read(pdev, CFG, &cfg); | ||
119 | |||
120 | if (cfg & IDE_CFG_CABLE) | ||
121 | return ATA_CBL_PATA80; | ||
122 | else | ||
123 | return ATA_CBL_PATA40; | ||
124 | } | ||
125 | |||
126 | /** | ||
127 | * cs5536_set_pio_mode - PIO timing setup | ||
128 | * @drive: ATA device | ||
129 | * @pio: PIO mode number | ||
130 | */ | ||
131 | |||
132 | static void cs5536_set_pio_mode(ide_drive_t *drive, const u8 pio) | ||
133 | { | ||
134 | static const u8 drv_timings[5] = { | ||
135 | 0x98, 0x55, 0x32, 0x21, 0x20, | ||
136 | }; | ||
137 | |||
138 | static const u8 addr_timings[5] = { | ||
139 | 0x2, 0x1, 0x0, 0x0, 0x0, | ||
140 | }; | ||
141 | |||
142 | static const u8 cmd_timings[5] = { | ||
143 | 0x99, 0x92, 0x90, 0x22, 0x20, | ||
144 | }; | ||
145 | |||
146 | struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); | ||
147 | ide_drive_t *pair = ide_get_pair_dev(drive); | ||
148 | int cshift = (drive->dn & 1) ? IDE_CAST_D1_SHIFT : IDE_CAST_D0_SHIFT; | ||
149 | u32 cast; | ||
150 | u8 cmd_pio = pio; | ||
151 | |||
152 | if (pair) | ||
153 | cmd_pio = min(pio, ide_get_best_pio_mode(pair, 255, 4)); | ||
154 | |||
155 | drive->drive_data &= (IDE_DRV_MASK << 8); | ||
156 | drive->drive_data |= drv_timings[pio]; | ||
157 | |||
158 | cs5536_program_dtc(drive, drv_timings[pio]); | ||
159 | |||
160 | cs5536_read(pdev, CAST, &cast); | ||
161 | |||
162 | cast &= ~(IDE_CAST_DRV_MASK << cshift); | ||
163 | cast |= addr_timings[pio] << cshift; | ||
164 | |||
165 | cast &= ~(IDE_CAST_CMD_MASK << IDE_CAST_CMD_SHIFT); | ||
166 | cast |= cmd_timings[cmd_pio] << IDE_CAST_CMD_SHIFT; | ||
167 | |||
168 | cs5536_write(pdev, CAST, cast); | ||
169 | } | ||
170 | |||
171 | /** | ||
172 | * cs5536_set_dma_mode - DMA timing setup | ||
173 | * @drive: ATA device | ||
174 | * @mode: DMA mode | ||
175 | */ | ||
176 | |||
177 | static void cs5536_set_dma_mode(ide_drive_t *drive, const u8 mode) | ||
178 | { | ||
179 | static const u8 udma_timings[6] = { | ||
180 | 0xc2, 0xc1, 0xc0, 0xc4, 0xc5, 0xc6, | ||
181 | }; | ||
182 | |||
183 | static const u8 mwdma_timings[3] = { | ||
184 | 0x67, 0x21, 0x20, | ||
185 | }; | ||
186 | |||
187 | struct pci_dev *pdev = to_pci_dev(drive->hwif->dev); | ||
188 | int dshift = (drive->dn & 1) ? IDE_D1_SHIFT : IDE_D0_SHIFT; | ||
189 | u32 etc; | ||
190 | |||
191 | cs5536_read(pdev, ETC, &etc); | ||
192 | |||
193 | if (mode >= XFER_UDMA_0) { | ||
194 | etc &= ~(IDE_DRV_MASK << dshift); | ||
195 | etc |= udma_timings[mode - XFER_UDMA_0] << dshift; | ||
196 | } else { /* MWDMA */ | ||
197 | etc &= ~(IDE_ETC_UDMA_MASK << dshift); | ||
198 | drive->drive_data &= IDE_DRV_MASK; | ||
199 | drive->drive_data |= mwdma_timings[mode - XFER_MW_DMA_0] << 8; | ||
200 | } | ||
201 | |||
202 | cs5536_write(pdev, ETC, etc); | ||
203 | } | ||
204 | |||
205 | static void cs5536_dma_start(ide_drive_t *drive) | ||
206 | { | ||
207 | if (drive->current_speed < XFER_UDMA_0 && | ||
208 | (drive->drive_data >> 8) != (drive->drive_data & IDE_DRV_MASK)) | ||
209 | cs5536_program_dtc(drive, drive->drive_data >> 8); | ||
210 | |||
211 | ide_dma_start(drive); | ||
212 | } | ||
213 | |||
214 | static int cs5536_dma_end(ide_drive_t *drive) | ||
215 | { | ||
216 | int ret = ide_dma_end(drive); | ||
217 | |||
218 | if (drive->current_speed < XFER_UDMA_0 && | ||
219 | (drive->drive_data >> 8) != (drive->drive_data & IDE_DRV_MASK)) | ||
220 | cs5536_program_dtc(drive, drive->drive_data & IDE_DRV_MASK); | ||
221 | |||
222 | return ret; | ||
223 | } | ||
224 | |||
225 | static const struct ide_port_ops cs5536_port_ops = { | ||
226 | .set_pio_mode = cs5536_set_pio_mode, | ||
227 | .set_dma_mode = cs5536_set_dma_mode, | ||
228 | .cable_detect = cs5536_cable_detect, | ||
229 | }; | ||
230 | |||
231 | static const struct ide_dma_ops cs5536_dma_ops = { | ||
232 | .dma_host_set = ide_dma_host_set, | ||
233 | .dma_setup = ide_dma_setup, | ||
234 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
235 | .dma_start = cs5536_dma_start, | ||
236 | .dma_end = cs5536_dma_end, | ||
237 | .dma_test_irq = ide_dma_test_irq, | ||
238 | .dma_lost_irq = ide_dma_lost_irq, | ||
239 | .dma_timeout = ide_dma_timeout, | ||
240 | }; | ||
241 | |||
242 | static const struct ide_port_info cs5536_info = { | ||
243 | .name = DRV_NAME, | ||
244 | .port_ops = &cs5536_port_ops, | ||
245 | .dma_ops = &cs5536_dma_ops, | ||
246 | .host_flags = IDE_HFLAG_SINGLE, | ||
247 | .pio_mask = ATA_PIO4, | ||
248 | .mwdma_mask = ATA_MWDMA2, | ||
249 | .udma_mask = ATA_UDMA5, | ||
250 | }; | ||
251 | |||
252 | /** | ||
253 | * cs5536_init_one | ||
254 | * @dev: PCI device | ||
255 | * @id: Entry in match table | ||
256 | */ | ||
257 | |||
258 | static int cs5536_init_one(struct pci_dev *dev, const struct pci_device_id *id) | ||
259 | { | ||
260 | u32 cfg; | ||
261 | |||
262 | if (use_msr) | ||
263 | printk(KERN_INFO DRV_NAME ": Using MSR regs instead of PCI\n"); | ||
264 | |||
265 | cs5536_read(dev, CFG, &cfg); | ||
266 | |||
267 | if ((cfg & IDE_CFG_CHANEN) == 0) { | ||
268 | printk(KERN_ERR DRV_NAME ": disabled by BIOS\n"); | ||
269 | return -ENODEV; | ||
270 | } | ||
271 | |||
272 | return ide_pci_init_one(dev, &cs5536_info, NULL); | ||
273 | } | ||
274 | |||
275 | static const struct pci_device_id cs5536_pci_tbl[] = { | ||
276 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), }, | ||
277 | { }, | ||
278 | }; | ||
279 | |||
280 | static struct pci_driver cs5536_pci_driver = { | ||
281 | .name = DRV_NAME, | ||
282 | .id_table = cs5536_pci_tbl, | ||
283 | .probe = cs5536_init_one, | ||
284 | .remove = ide_pci_remove, | ||
285 | .suspend = ide_pci_suspend, | ||
286 | .resume = ide_pci_resume, | ||
287 | }; | ||
288 | |||
289 | static int __init cs5536_init(void) | ||
290 | { | ||
291 | return pci_register_driver(&cs5536_pci_driver); | ||
292 | } | ||
293 | |||
294 | static void __exit cs5536_exit(void) | ||
295 | { | ||
296 | pci_unregister_driver(&cs5536_pci_driver); | ||
297 | } | ||
298 | |||
299 | MODULE_AUTHOR("Martin K. Petersen, Bartlomiej Zolnierkiewicz"); | ||
300 | MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller"); | ||
301 | MODULE_LICENSE("GPL"); | ||
302 | MODULE_DEVICE_TABLE(pci, cs5536_pci_tbl); | ||
303 | |||
304 | module_param_named(msr, use_msr, int, 0644); | ||
305 | MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)"); | ||
306 | |||
307 | module_init(cs5536_init); | ||
308 | module_exit(cs5536_exit); | ||
diff --git a/drivers/ide/icside.c b/drivers/ide/icside.c index 97a35c667aee..415d7e24f2b6 100644 --- a/drivers/ide/icside.c +++ b/drivers/ide/icside.c | |||
@@ -534,7 +534,7 @@ icside_register_v6(struct icside_state *state, struct expansion_card *ec) | |||
534 | d.dma_ops = NULL; | 534 | d.dma_ops = NULL; |
535 | } | 535 | } |
536 | 536 | ||
537 | ret = ide_host_register(host, NULL, hws); | 537 | ret = ide_host_register(host, &d, hws); |
538 | if (ret) | 538 | if (ret) |
539 | goto err_free; | 539 | goto err_free; |
540 | 540 | ||
diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index d8f295bdad76..ec7d07fa570a 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c | |||
@@ -282,7 +282,7 @@ static int do_drive_get_GTF(ide_drive_t *drive, | |||
282 | port = hwif->channel ? drive->dn - 2: drive->dn; | 282 | port = hwif->channel ? drive->dn - 2: drive->dn; |
283 | 283 | ||
284 | DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n", | 284 | DEBPRINT("ENTER: %s at %s, port#: %d, hard_port#: %d\n", |
285 | hwif->name, dev->bus_id, port, hwif->channel); | 285 | hwif->name, dev_name(dev), port, hwif->channel); |
286 | 286 | ||
287 | if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) { | 287 | if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0) { |
288 | DEBPRINT("%s drive %d:%d not present\n", | 288 | DEBPRINT("%s drive %d:%d not present\n", |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index cae69372cf45..0bfeb0c79d6e 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -787,6 +787,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
787 | if (blk_fs_request(rq)) { | 787 | if (blk_fs_request(rq)) { |
788 | ide_end_request(drive, 1, rq->nr_sectors); | 788 | ide_end_request(drive, 1, rq->nr_sectors); |
789 | return ide_stopped; | 789 | return ide_stopped; |
790 | } else if (rq->cmd_type == REQ_TYPE_ATA_PC && !rq->bio) { | ||
791 | ide_end_request(drive, 1, 1); | ||
792 | return ide_stopped; | ||
790 | } | 793 | } |
791 | goto end_request; | 794 | goto end_request; |
792 | } | 795 | } |
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index cc163319dfbd..9ee51adf567f 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -418,11 +418,14 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq) | |||
418 | ide_hwif_t *hwif = drive->hwif; | 418 | ide_hwif_t *hwif = drive->hwif; |
419 | struct scatterlist *sg = hwif->sg_table; | 419 | struct scatterlist *sg = hwif->sg_table; |
420 | 420 | ||
421 | if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) { | 421 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { |
422 | hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); | ||
423 | } else { | ||
424 | sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); | 422 | sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); |
425 | hwif->sg_nents = 1; | 423 | hwif->sg_nents = 1; |
424 | } else if (!rq->bio) { | ||
425 | sg_init_one(sg, rq->data, rq->data_len); | ||
426 | hwif->sg_nents = 1; | ||
427 | } else { | ||
428 | hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); | ||
426 | } | 429 | } |
427 | } | 430 | } |
428 | 431 | ||
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 0db1ed9f5fc2..ce0818a993f6 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1467,6 +1467,30 @@ struct ide_host *ide_host_alloc(const struct ide_port_info *d, hw_regs_t **hws) | |||
1467 | } | 1467 | } |
1468 | EXPORT_SYMBOL_GPL(ide_host_alloc); | 1468 | EXPORT_SYMBOL_GPL(ide_host_alloc); |
1469 | 1469 | ||
1470 | static void ide_port_free(ide_hwif_t *hwif) | ||
1471 | { | ||
1472 | ide_port_free_devices(hwif); | ||
1473 | ide_free_port_slot(hwif->index); | ||
1474 | kfree(hwif); | ||
1475 | } | ||
1476 | |||
1477 | static void ide_disable_port(ide_hwif_t *hwif) | ||
1478 | { | ||
1479 | struct ide_host *host = hwif->host; | ||
1480 | int i; | ||
1481 | |||
1482 | printk(KERN_INFO "%s: disabling port\n", hwif->name); | ||
1483 | |||
1484 | for (i = 0; i < MAX_HOST_PORTS; i++) { | ||
1485 | if (host->ports[i] == hwif) { | ||
1486 | host->ports[i] = NULL; | ||
1487 | host->n_ports--; | ||
1488 | } | ||
1489 | } | ||
1490 | |||
1491 | ide_port_free(hwif); | ||
1492 | } | ||
1493 | |||
1470 | int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | 1494 | int ide_host_register(struct ide_host *host, const struct ide_port_info *d, |
1471 | hw_regs_t **hws) | 1495 | hw_regs_t **hws) |
1472 | { | 1496 | { |
@@ -1507,8 +1531,12 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1507 | hwif->present = 1; | 1531 | hwif->present = 1; |
1508 | 1532 | ||
1509 | if (hwif->chipset != ide_4drives || !hwif->mate || | 1533 | if (hwif->chipset != ide_4drives || !hwif->mate || |
1510 | !hwif->mate->present) | 1534 | !hwif->mate->present) { |
1511 | ide_register_port(hwif); | 1535 | if (ide_register_port(hwif)) { |
1536 | ide_disable_port(hwif); | ||
1537 | continue; | ||
1538 | } | ||
1539 | } | ||
1512 | 1540 | ||
1513 | if (hwif->present) | 1541 | if (hwif->present) |
1514 | ide_port_tune_devices(hwif); | 1542 | ide_port_tune_devices(hwif); |
@@ -1521,7 +1549,8 @@ int ide_host_register(struct ide_host *host, const struct ide_port_info *d, | |||
1521 | if (hwif_init(hwif) == 0) { | 1549 | if (hwif_init(hwif) == 0) { |
1522 | printk(KERN_INFO "%s: failed to initialize IDE " | 1550 | printk(KERN_INFO "%s: failed to initialize IDE " |
1523 | "interface\n", hwif->name); | 1551 | "interface\n", hwif->name); |
1524 | hwif->present = 0; | 1552 | device_unregister(&hwif->gendev); |
1553 | ide_disable_port(hwif); | ||
1525 | continue; | 1554 | continue; |
1526 | } | 1555 | } |
1527 | 1556 | ||
@@ -1660,12 +1689,8 @@ void ide_host_free(struct ide_host *host) | |||
1660 | int i; | 1689 | int i; |
1661 | 1690 | ||
1662 | ide_host_for_each_port(i, hwif, host) { | 1691 | ide_host_for_each_port(i, hwif, host) { |
1663 | if (hwif == NULL) | 1692 | if (hwif) |
1664 | continue; | 1693 | ide_port_free(hwif); |
1665 | |||
1666 | ide_port_free_devices(hwif); | ||
1667 | ide_free_port_slot(hwif->index); | ||
1668 | kfree(hwif); | ||
1669 | } | 1694 | } |
1670 | 1695 | ||
1671 | kfree(host); | 1696 | kfree(host); |
diff --git a/drivers/ide/qd65xx.c b/drivers/ide/qd65xx.c index 5b2e3af43c4b..08c4fa35e9b1 100644 --- a/drivers/ide/qd65xx.c +++ b/drivers/ide/qd65xx.c | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | /* | 17 | /* |
18 | * Rewritten from the work of Colten Edwards <pje120@cs.usask.ca> by | 18 | * Rewritten from the work of Colten Edwards <pje120@cs.usask.ca> by |
19 | * Samuel Thibault <samuel.thibault@fnac.net> | 19 | * Samuel Thibault <samuel.thibault@ens-lyon.org> |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
diff --git a/drivers/ide/qd65xx.h b/drivers/ide/qd65xx.h index 6636f9665d16..d7e67a1a1dcc 100644 --- a/drivers/ide/qd65xx.h +++ b/drivers/ide/qd65xx.h | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | /* | 5 | /* |
6 | * Authors: Petr Soucek <petr@ryston.cz> | 6 | * Authors: Petr Soucek <petr@ryston.cz> |
7 | * Samuel Thibault <samuel.thibault@fnac.net> | 7 | * Samuel Thibault <samuel.thibault@ens-lyon.org> |
8 | */ | 8 | */ |
9 | 9 | ||
10 | /* truncates a in [b,c] */ | 10 | /* truncates a in [b,c] */ |
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c index 882f6f07c476..40b0812a045c 100644 --- a/drivers/ide/tx4939ide.c +++ b/drivers/ide/tx4939ide.c | |||
@@ -261,9 +261,9 @@ static int tx4939ide_build_dmatable(ide_drive_t *drive, struct request *rq) | |||
261 | bcount = cur_len; | 261 | bcount = cur_len; |
262 | /* | 262 | /* |
263 | * This workaround for zero count seems required. | 263 | * This workaround for zero count seems required. |
264 | * (standard ide_build_dmatable do it too) | 264 | * (standard ide_build_dmatable does it too) |
265 | */ | 265 | */ |
266 | if ((bcount & 0xffff) == 0x0000) | 266 | if (bcount == 0x10000) |
267 | bcount = 0x8000; | 267 | bcount = 0x8000; |
268 | *table++ = bcount & 0xffff; | 268 | *table++ = bcount & 0xffff; |
269 | *table++ = cur_addr; | 269 | *table++ = cur_addr; |
diff --git a/drivers/ide/via82cxxx.c b/drivers/ide/via82cxxx.c index 703c3eeb20a8..6092fe3f409d 100644 --- a/drivers/ide/via82cxxx.c +++ b/drivers/ide/via82cxxx.c | |||
@@ -448,6 +448,11 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i | |||
448 | d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; | 448 | d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; |
449 | #endif | 449 | #endif |
450 | 450 | ||
451 | #ifdef CONFIG_AMIGAONE | ||
452 | if (machine_is(amigaone)) | ||
453 | d.host_flags |= IDE_HFLAG_FORCE_LEGACY_IRQS; | ||
454 | #endif | ||
455 | |||
451 | d.udma_mask = via_config->udma_mask; | 456 | d.udma_mask = via_config->udma_mask; |
452 | 457 | ||
453 | vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); | 458 | vdev = kzalloc(sizeof(*vdev), GFP_KERNEL); |
diff --git a/drivers/media/common/saa7146_video.c b/drivers/media/common/saa7146_video.c index 6098b626811f..47fee05eaefb 100644 --- a/drivers/media/common/saa7146_video.c +++ b/drivers/media/common/saa7146_video.c | |||
@@ -576,6 +576,7 @@ static int set_control(struct saa7146_fh *fh, struct v4l2_control *c) | |||
576 | vv->vflip = c->value; | 576 | vv->vflip = c->value; |
577 | break; | 577 | break; |
578 | default: { | 578 | default: { |
579 | mutex_unlock(&dev->lock); | ||
579 | return -EINVAL; | 580 | return -EINVAL; |
580 | } | 581 | } |
581 | } | 582 | } |
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c index 64379f2bf237..3ec28945c26f 100644 --- a/drivers/media/common/tuners/mxl5007t.c +++ b/drivers/media/common/tuners/mxl5007t.c | |||
@@ -657,7 +657,7 @@ static int mxl5007t_get_status(struct dvb_frontend *fe, u32 *status) | |||
657 | { | 657 | { |
658 | struct mxl5007t_state *state = fe->tuner_priv; | 658 | struct mxl5007t_state *state = fe->tuner_priv; |
659 | int rf_locked, ref_locked; | 659 | int rf_locked, ref_locked; |
660 | s32 rf_input_level; | 660 | s32 rf_input_level = 0; |
661 | int ret; | 661 | int ret; |
662 | 662 | ||
663 | if (fe->ops.i2c_gate_ctrl) | 663 | if (fe->ops.i2c_gate_ctrl) |
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c index 98ee16773ff2..7e3aeaa7370f 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.c | |||
@@ -93,6 +93,9 @@ struct dvb_ca_slot { | |||
93 | /* current state of the CAM */ | 93 | /* current state of the CAM */ |
94 | int slot_state; | 94 | int slot_state; |
95 | 95 | ||
96 | /* mutex used for serializing access to one CI slot */ | ||
97 | struct mutex slot_lock; | ||
98 | |||
96 | /* Number of CAMCHANGES that have occurred since last processing */ | 99 | /* Number of CAMCHANGES that have occurred since last processing */ |
97 | atomic_t camchange_count; | 100 | atomic_t camchange_count; |
98 | 101 | ||
@@ -711,14 +714,20 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 * b | |||
711 | dprintk("%s\n", __func__); | 714 | dprintk("%s\n", __func__); |
712 | 715 | ||
713 | 716 | ||
714 | // sanity check | 717 | /* sanity check */ |
715 | if (bytes_write > ca->slot_info[slot].link_buf_size) | 718 | if (bytes_write > ca->slot_info[slot].link_buf_size) |
716 | return -EINVAL; | 719 | return -EINVAL; |
717 | 720 | ||
718 | /* check if interface is actually waiting for us to read from it, or if a read is in progress */ | 721 | /* it is possible we are dealing with a single buffer implementation, |
722 | thus if there is data available for read or if there is even a read | ||
723 | already in progress, we do nothing but awake the kernel thread to | ||
724 | process the data if necessary. */ | ||
719 | if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0) | 725 | if ((status = ca->pub->read_cam_control(ca->pub, slot, CTRLIF_STATUS)) < 0) |
720 | goto exitnowrite; | 726 | goto exitnowrite; |
721 | if (status & (STATUSREG_DA | STATUSREG_RE)) { | 727 | if (status & (STATUSREG_DA | STATUSREG_RE)) { |
728 | if (status & STATUSREG_DA) | ||
729 | dvb_ca_en50221_thread_wakeup(ca); | ||
730 | |||
722 | status = -EAGAIN; | 731 | status = -EAGAIN; |
723 | goto exitnowrite; | 732 | goto exitnowrite; |
724 | } | 733 | } |
@@ -987,6 +996,8 @@ static int dvb_ca_en50221_thread(void *data) | |||
987 | /* go through all the slots processing them */ | 996 | /* go through all the slots processing them */ |
988 | for (slot = 0; slot < ca->slot_count; slot++) { | 997 | for (slot = 0; slot < ca->slot_count; slot++) { |
989 | 998 | ||
999 | mutex_lock(&ca->slot_info[slot].slot_lock); | ||
1000 | |||
990 | // check the cam status + deal with CAMCHANGEs | 1001 | // check the cam status + deal with CAMCHANGEs |
991 | while (dvb_ca_en50221_check_camstatus(ca, slot)) { | 1002 | while (dvb_ca_en50221_check_camstatus(ca, slot)) { |
992 | /* clear down an old CI slot if necessary */ | 1003 | /* clear down an old CI slot if necessary */ |
@@ -1122,7 +1133,7 @@ static int dvb_ca_en50221_thread(void *data) | |||
1122 | 1133 | ||
1123 | case DVB_CA_SLOTSTATE_RUNNING: | 1134 | case DVB_CA_SLOTSTATE_RUNNING: |
1124 | if (!ca->open) | 1135 | if (!ca->open) |
1125 | continue; | 1136 | break; |
1126 | 1137 | ||
1127 | // poll slots for data | 1138 | // poll slots for data |
1128 | pktcount = 0; | 1139 | pktcount = 0; |
@@ -1146,6 +1157,8 @@ static int dvb_ca_en50221_thread(void *data) | |||
1146 | } | 1157 | } |
1147 | break; | 1158 | break; |
1148 | } | 1159 | } |
1160 | |||
1161 | mutex_unlock(&ca->slot_info[slot].slot_lock); | ||
1149 | } | 1162 | } |
1150 | } | 1163 | } |
1151 | 1164 | ||
@@ -1181,6 +1194,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | |||
1181 | switch (cmd) { | 1194 | switch (cmd) { |
1182 | case CA_RESET: | 1195 | case CA_RESET: |
1183 | for (slot = 0; slot < ca->slot_count; slot++) { | 1196 | for (slot = 0; slot < ca->slot_count; slot++) { |
1197 | mutex_lock(&ca->slot_info[slot].slot_lock); | ||
1184 | if (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_NONE) { | 1198 | if (ca->slot_info[slot].slot_state != DVB_CA_SLOTSTATE_NONE) { |
1185 | dvb_ca_en50221_slot_shutdown(ca, slot); | 1199 | dvb_ca_en50221_slot_shutdown(ca, slot); |
1186 | if (ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE) | 1200 | if (ca->flags & DVB_CA_EN50221_FLAG_IRQ_CAMCHANGE) |
@@ -1188,6 +1202,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct inode *inode, struct file *file, | |||
1188 | slot, | 1202 | slot, |
1189 | DVB_CA_EN50221_CAMCHANGE_INSERTED); | 1203 | DVB_CA_EN50221_CAMCHANGE_INSERTED); |
1190 | } | 1204 | } |
1205 | mutex_unlock(&ca->slot_info[slot].slot_lock); | ||
1191 | } | 1206 | } |
1192 | ca->next_read_slot = 0; | 1207 | ca->next_read_slot = 0; |
1193 | dvb_ca_en50221_thread_wakeup(ca); | 1208 | dvb_ca_en50221_thread_wakeup(ca); |
@@ -1308,7 +1323,9 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, | |||
1308 | goto exit; | 1323 | goto exit; |
1309 | } | 1324 | } |
1310 | 1325 | ||
1326 | mutex_lock(&ca->slot_info[slot].slot_lock); | ||
1311 | status = dvb_ca_en50221_write_data(ca, slot, fragbuf, fraglen + 2); | 1327 | status = dvb_ca_en50221_write_data(ca, slot, fragbuf, fraglen + 2); |
1328 | mutex_unlock(&ca->slot_info[slot].slot_lock); | ||
1312 | if (status == (fraglen + 2)) { | 1329 | if (status == (fraglen + 2)) { |
1313 | written = 1; | 1330 | written = 1; |
1314 | break; | 1331 | break; |
@@ -1664,6 +1681,7 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, | |||
1664 | ca->slot_info[i].slot_state = DVB_CA_SLOTSTATE_NONE; | 1681 | ca->slot_info[i].slot_state = DVB_CA_SLOTSTATE_NONE; |
1665 | atomic_set(&ca->slot_info[i].camchange_count, 0); | 1682 | atomic_set(&ca->slot_info[i].camchange_count, 0); |
1666 | ca->slot_info[i].camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; | 1683 | ca->slot_info[i].camchange_type = DVB_CA_EN50221_CAMCHANGE_REMOVED; |
1684 | mutex_init(&ca->slot_info[i].slot_lock); | ||
1667 | } | 1685 | } |
1668 | 1686 | ||
1669 | if (signal_pending(current)) { | 1687 | if (signal_pending(current)) { |
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.h b/drivers/media/dvb/dvb-core/dvb_ca_en50221.h index 8467e63ddc0d..7df2e141187a 100644 --- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.h +++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.h | |||
@@ -45,8 +45,10 @@ struct dvb_ca_en50221 { | |||
45 | /* the module owning this structure */ | 45 | /* the module owning this structure */ |
46 | struct module* owner; | 46 | struct module* owner; |
47 | 47 | ||
48 | /* NOTE: the read_*, write_* and poll_slot_status functions must use locks as | 48 | /* NOTE: the read_*, write_* and poll_slot_status functions will be |
49 | * they may be called from several threads at once */ | 49 | * called for different slots concurrently and need to use locks where |
50 | * and if appropriate. There will be no concurrent access to one slot. | ||
51 | */ | ||
50 | 52 | ||
51 | /* functions for accessing attribute memory on the CAM */ | 53 | /* functions for accessing attribute memory on the CAM */ |
52 | int (*read_attribute_mem)(struct dvb_ca_en50221* ca, int slot, int address); | 54 | int (*read_attribute_mem)(struct dvb_ca_en50221* ca, int slot, int address); |
diff --git a/drivers/media/dvb/dvb-usb/af9005-fe.c b/drivers/media/dvb/dvb-usb/af9005-fe.c index b1a9c4cdec93..199ece0d4883 100644 --- a/drivers/media/dvb/dvb-usb/af9005-fe.c +++ b/drivers/media/dvb/dvb-usb/af9005-fe.c | |||
@@ -220,7 +220,7 @@ static int af9005_get_post_vit_ber(struct dvb_frontend *fe, | |||
220 | u16 * abort_count) | 220 | u16 * abort_count) |
221 | { | 221 | { |
222 | u32 loc_cw_count = 0, loc_err_count; | 222 | u32 loc_cw_count = 0, loc_err_count; |
223 | u16 loc_abort_count; | 223 | u16 loc_abort_count = 0; |
224 | int ret; | 224 | int ret; |
225 | 225 | ||
226 | ret = | 226 | ret = |
diff --git a/drivers/media/dvb/dvb-usb/af9015.c b/drivers/media/dvb/dvb-usb/af9015.c index e1e9aa5c6b84..6a97a40d3dfb 100644 --- a/drivers/media/dvb/dvb-usb/af9015.c +++ b/drivers/media/dvb/dvb-usb/af9015.c | |||
@@ -694,7 +694,12 @@ static int af9015_read_config(struct usb_device *udev) | |||
694 | 694 | ||
695 | /* IR remote controller */ | 695 | /* IR remote controller */ |
696 | req.addr = AF9015_EEPROM_IR_MODE; | 696 | req.addr = AF9015_EEPROM_IR_MODE; |
697 | ret = af9015_rw_udev(udev, &req); | 697 | /* first message will timeout often due to possible hw bug */ |
698 | for (i = 0; i < 4; i++) { | ||
699 | ret = af9015_rw_udev(udev, &req); | ||
700 | if (!ret) | ||
701 | break; | ||
702 | } | ||
698 | if (ret) | 703 | if (ret) |
699 | goto error; | 704 | goto error; |
700 | deb_info("%s: IR mode:%d\n", __func__, val); | 705 | deb_info("%s: IR mode:%d\n", __func__, val); |
@@ -835,18 +840,19 @@ static int af9015_read_config(struct usb_device *udev) | |||
835 | if (!dvb_usb_af9015_dual_mode) | 840 | if (!dvb_usb_af9015_dual_mode) |
836 | af9015_config.dual_mode = 0; | 841 | af9015_config.dual_mode = 0; |
837 | 842 | ||
838 | /* set buffer size according to USB port speed */ | 843 | /* Set adapter0 buffer size according to USB port speed, adapter1 buffer |
844 | size can be static because it is enabled only USB2.0 */ | ||
839 | for (i = 0; i < af9015_properties_count; i++) { | 845 | for (i = 0; i < af9015_properties_count; i++) { |
840 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ | 846 | /* USB1.1 set smaller buffersize and disable 2nd adapter */ |
841 | if (udev->speed == USB_SPEED_FULL) { | 847 | if (udev->speed == USB_SPEED_FULL) { |
842 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 848 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
843 | TS_USB11_MAX_PACKET_SIZE; | 849 | = TS_USB11_MAX_PACKET_SIZE; |
844 | /* disable 2nd adapter because we don't have | 850 | /* disable 2nd adapter because we don't have |
845 | PID-filters */ | 851 | PID-filters */ |
846 | af9015_config.dual_mode = 0; | 852 | af9015_config.dual_mode = 0; |
847 | } else { | 853 | } else { |
848 | af9015_properties[i].adapter->stream.u.bulk.buffersize = | 854 | af9015_properties[i].adapter[0].stream.u.bulk.buffersize |
849 | TS_USB20_MAX_PACKET_SIZE; | 855 | = TS_USB20_MAX_PACKET_SIZE; |
850 | } | 856 | } |
851 | } | 857 | } |
852 | 858 | ||
@@ -1254,6 +1260,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1254 | .type = USB_BULK, | 1260 | .type = USB_BULK, |
1255 | .count = 6, | 1261 | .count = 6, |
1256 | .endpoint = 0x85, | 1262 | .endpoint = 0x85, |
1263 | .u = { | ||
1264 | .bulk = { | ||
1265 | .buffersize = | ||
1266 | TS_USB20_MAX_PACKET_SIZE, | ||
1267 | } | ||
1268 | } | ||
1257 | }, | 1269 | }, |
1258 | } | 1270 | } |
1259 | }, | 1271 | }, |
@@ -1353,6 +1365,12 @@ static struct dvb_usb_device_properties af9015_properties[] = { | |||
1353 | .type = USB_BULK, | 1365 | .type = USB_BULK, |
1354 | .count = 6, | 1366 | .count = 6, |
1355 | .endpoint = 0x85, | 1367 | .endpoint = 0x85, |
1368 | .u = { | ||
1369 | .bulk = { | ||
1370 | .buffersize = | ||
1371 | TS_USB20_MAX_PACKET_SIZE, | ||
1372 | } | ||
1373 | } | ||
1356 | }, | 1374 | }, |
1357 | } | 1375 | } |
1358 | }, | 1376 | }, |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 391732788911..635d30a55078 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -1393,6 +1393,9 @@ struct usb_device_id dib0700_usb_id_table[] = { | |||
1393 | { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3000H) }, | 1393 | { USB_DEVICE(USB_VID_ASUS, USB_PID_ASUS_U3000H) }, |
1394 | /* 40 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E) }, | 1394 | /* 40 */{ USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E) }, |
1395 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E_SE) }, | 1395 | { USB_DEVICE(USB_VID_PINNACLE, USB_PID_PINNACLE_PCTV801E_SE) }, |
1396 | { USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_EXPRESS) }, | ||
1397 | { USB_DEVICE(USB_VID_TERRATEC, | ||
1398 | USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2) }, | ||
1396 | { 0 } /* Terminating entry */ | 1399 | { 0 } /* Terminating entry */ |
1397 | }; | 1400 | }; |
1398 | MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); | 1401 | MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table); |
@@ -1537,7 +1540,8 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1537 | { "DiBcom STK7700D reference design", | 1540 | { "DiBcom STK7700D reference design", |
1538 | { &dib0700_usb_id_table[14], NULL }, | 1541 | { &dib0700_usb_id_table[14], NULL }, |
1539 | { NULL }, | 1542 | { NULL }, |
1540 | } | 1543 | }, |
1544 | |||
1541 | }, | 1545 | }, |
1542 | 1546 | ||
1543 | .rc_interval = DEFAULT_RC_INTERVAL, | 1547 | .rc_interval = DEFAULT_RC_INTERVAL, |
@@ -1557,7 +1561,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1557 | }, | 1561 | }, |
1558 | }, | 1562 | }, |
1559 | 1563 | ||
1560 | .num_device_descs = 2, | 1564 | .num_device_descs = 3, |
1561 | .devices = { | 1565 | .devices = { |
1562 | { "ASUS My Cinema U3000 Mini DVBT Tuner", | 1566 | { "ASUS My Cinema U3000 Mini DVBT Tuner", |
1563 | { &dib0700_usb_id_table[23], NULL }, | 1567 | { &dib0700_usb_id_table[23], NULL }, |
@@ -1566,6 +1570,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1566 | { "Yuan EC372S", | 1570 | { "Yuan EC372S", |
1567 | { &dib0700_usb_id_table[31], NULL }, | 1571 | { &dib0700_usb_id_table[31], NULL }, |
1568 | { NULL }, | 1572 | { NULL }, |
1573 | }, | ||
1574 | { "Terratec Cinergy T Express", | ||
1575 | { &dib0700_usb_id_table[42], NULL }, | ||
1576 | { NULL }, | ||
1569 | } | 1577 | } |
1570 | }, | 1578 | }, |
1571 | 1579 | ||
@@ -1653,7 +1661,7 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1653 | } | 1661 | } |
1654 | }, | 1662 | }, |
1655 | 1663 | ||
1656 | .num_device_descs = 4, | 1664 | .num_device_descs = 5, |
1657 | .devices = { | 1665 | .devices = { |
1658 | { "DiBcom STK7070PD reference design", | 1666 | { "DiBcom STK7070PD reference design", |
1659 | { &dib0700_usb_id_table[17], NULL }, | 1667 | { &dib0700_usb_id_table[17], NULL }, |
@@ -1670,6 +1678,10 @@ struct dvb_usb_device_properties dib0700_devices[] = { | |||
1670 | { "Hauppauge Nova-TD-500 (84xxx)", | 1678 | { "Hauppauge Nova-TD-500 (84xxx)", |
1671 | { &dib0700_usb_id_table[36], NULL }, | 1679 | { &dib0700_usb_id_table[36], NULL }, |
1672 | { NULL }, | 1680 | { NULL }, |
1681 | }, | ||
1682 | { "Terratec Cinergy DT USB XS Diversity", | ||
1683 | { &dib0700_usb_id_table[43], NULL }, | ||
1684 | { NULL }, | ||
1673 | } | 1685 | } |
1674 | } | 1686 | } |
1675 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, | 1687 | }, { DIB0700_DEFAULT_DEVICE_PROPERTIES, |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h index a4fca3fca5ee..0db0c06ee6f2 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h +++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h | |||
@@ -162,8 +162,10 @@ | |||
162 | #define USB_PID_AVERMEDIA_A309 0xa309 | 162 | #define USB_PID_AVERMEDIA_A309 0xa309 |
163 | #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006 | 163 | #define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006 |
164 | #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a | 164 | #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a |
165 | #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2 0x0081 | ||
165 | #define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058 | 166 | #define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058 |
166 | #define USB_PID_TERRATEC_CINERGY_HT_EXPRESS 0x0060 | 167 | #define USB_PID_TERRATEC_CINERGY_HT_EXPRESS 0x0060 |
168 | #define USB_PID_TERRATEC_CINERGY_T_EXPRESS 0x0062 | ||
167 | #define USB_PID_TERRATEC_CINERGY_T_XXS 0x0078 | 169 | #define USB_PID_TERRATEC_CINERGY_T_XXS 0x0078 |
168 | #define USB_PID_PINNACLE_EXPRESSCARD_320CX 0x022e | 170 | #define USB_PID_PINNACLE_EXPRESSCARD_320CX 0x022e |
169 | #define USB_PID_PINNACLE_PCTV2000E 0x022c | 171 | #define USB_PID_PINNACLE_PCTV2000E 0x022c |
diff --git a/drivers/media/dvb/frontends/drx397xD.c b/drivers/media/dvb/frontends/drx397xD.c index ec4e08dbc699..1e81e713df63 100644 --- a/drivers/media/dvb/frontends/drx397xD.c +++ b/drivers/media/dvb/frontends/drx397xD.c | |||
@@ -646,7 +646,7 @@ static int drx_tune(struct drx397xD_state *s, | |||
646 | u32 edi = 0, ebx = 0, ebp = 0, edx = 0; | 646 | u32 edi = 0, ebx = 0, ebp = 0, edx = 0; |
647 | u16 v20 = 0, v1E = 0, v16 = 0, v14 = 0, v12 = 0, v10 = 0, v0E = 0; | 647 | u16 v20 = 0, v1E = 0, v16 = 0, v14 = 0, v12 = 0, v10 = 0, v0E = 0; |
648 | 648 | ||
649 | int rc, df_tuner; | 649 | int rc, df_tuner = 0; |
650 | int a, b, c, d; | 650 | int a, b, c, d; |
651 | pr_debug("%s %d\n", __func__, s->config.d60); | 651 | pr_debug("%s %d\n", __func__, s->config.d60); |
652 | 652 | ||
diff --git a/drivers/media/dvb/frontends/s5h1409.c b/drivers/media/dvb/frontends/s5h1409.c index cf4d8936bb83..3e08d985d6e5 100644 --- a/drivers/media/dvb/frontends/s5h1409.c +++ b/drivers/media/dvb/frontends/s5h1409.c | |||
@@ -545,9 +545,6 @@ static int s5h1409_set_frontend(struct dvb_frontend *fe, | |||
545 | 545 | ||
546 | s5h1409_enable_modulation(fe, p->u.vsb.modulation); | 546 | s5h1409_enable_modulation(fe, p->u.vsb.modulation); |
547 | 547 | ||
548 | /* Allow the demod to settle */ | ||
549 | msleep(100); | ||
550 | |||
551 | if (fe->ops.tuner_ops.set_params) { | 548 | if (fe->ops.tuner_ops.set_params) { |
552 | if (fe->ops.i2c_gate_ctrl) | 549 | if (fe->ops.i2c_gate_ctrl) |
553 | fe->ops.i2c_gate_ctrl(fe, 1); | 550 | fe->ops.i2c_gate_ctrl(fe, 1); |
@@ -562,6 +559,10 @@ static int s5h1409_set_frontend(struct dvb_frontend *fe, | |||
562 | s5h1409_set_qam_interleave_mode(fe); | 559 | s5h1409_set_qam_interleave_mode(fe); |
563 | } | 560 | } |
564 | 561 | ||
562 | /* Issue a reset to the demod so it knows to resync against the | ||
563 | newly tuned frequency */ | ||
564 | s5h1409_softreset(fe); | ||
565 | |||
565 | return 0; | 566 | return 0; |
566 | } | 567 | } |
567 | 568 | ||
diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c index 83dc7e12d5f0..a67d1775a43c 100644 --- a/drivers/media/dvb/frontends/stb0899_algo.c +++ b/drivers/media/dvb/frontends/stb0899_algo.c | |||
@@ -31,6 +31,8 @@ inline u32 stb0899_do_div(u64 n, u32 d) | |||
31 | return n; | 31 | return n; |
32 | } | 32 | } |
33 | 33 | ||
34 | #if 0 | ||
35 | /* These functions are currently unused */ | ||
34 | /* | 36 | /* |
35 | * stb0899_calc_srate | 37 | * stb0899_calc_srate |
36 | * Compute symbol rate | 38 | * Compute symbol rate |
@@ -63,6 +65,7 @@ static u32 stb0899_get_srate(struct stb0899_state *state) | |||
63 | 65 | ||
64 | return stb0899_calc_srate(internal->master_clk, sfr); | 66 | return stb0899_calc_srate(internal->master_clk, sfr); |
65 | } | 67 | } |
68 | #endif | ||
66 | 69 | ||
67 | /* | 70 | /* |
68 | * stb0899_set_srate | 71 | * stb0899_set_srate |
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c index 1638e1d9f538..83e9e7750c8c 100644 --- a/drivers/media/dvb/ttpci/budget.c +++ b/drivers/media/dvb/ttpci/budget.c | |||
@@ -470,6 +470,7 @@ static void frontend_init(struct budget *budget) | |||
470 | budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap); | 470 | budget->dvb_frontend = dvb_attach(l64781_attach, &grundig_29504_401_config, &budget->i2c_adap); |
471 | if (budget->dvb_frontend) { | 471 | if (budget->dvb_frontend) { |
472 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; | 472 | budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params; |
473 | budget->dvb_frontend->tuner_priv = NULL; | ||
473 | break; | 474 | break; |
474 | } | 475 | } |
475 | break; | 476 | break; |
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 0aa96df80fc2..d91e0638448f 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -1384,7 +1384,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) | |||
1384 | static int ttusb_dec_init_stb(struct ttusb_dec *dec) | 1384 | static int ttusb_dec_init_stb(struct ttusb_dec *dec) |
1385 | { | 1385 | { |
1386 | int result; | 1386 | int result; |
1387 | unsigned int mode, model, version; | 1387 | unsigned int mode = 0, model = 0, version = 0; |
1388 | 1388 | ||
1389 | dprintk("%s\n", __func__); | 1389 | dprintk("%s\n", __func__); |
1390 | 1390 | ||
diff --git a/drivers/media/radio/radio-mr800.c b/drivers/media/radio/radio-mr800.c index 0747dc8862b0..fdfc7bf86b9e 100644 --- a/drivers/media/radio/radio-mr800.c +++ b/drivers/media/radio/radio-mr800.c | |||
@@ -194,10 +194,10 @@ static int amradio_start(struct amradio_device *radio) | |||
194 | return retval; | 194 | return retval; |
195 | } | 195 | } |
196 | 196 | ||
197 | mutex_unlock(&radio->lock); | ||
198 | |||
199 | radio->muted = 0; | 197 | radio->muted = 0; |
200 | 198 | ||
199 | mutex_unlock(&radio->lock); | ||
200 | |||
201 | return retval; | 201 | return retval; |
202 | } | 202 | } |
203 | 203 | ||
@@ -230,10 +230,10 @@ static int amradio_stop(struct amradio_device *radio) | |||
230 | return retval; | 230 | return retval; |
231 | } | 231 | } |
232 | 232 | ||
233 | mutex_unlock(&radio->lock); | ||
234 | |||
235 | radio->muted = 1; | 233 | radio->muted = 1; |
236 | 234 | ||
235 | mutex_unlock(&radio->lock); | ||
236 | |||
237 | return retval; | 237 | return retval; |
238 | } | 238 | } |
239 | 239 | ||
@@ -284,10 +284,10 @@ static int amradio_setfreq(struct amradio_device *radio, int freq) | |||
284 | return retval; | 284 | return retval; |
285 | } | 285 | } |
286 | 286 | ||
287 | mutex_unlock(&radio->lock); | ||
288 | |||
289 | radio->stereo = 0; | 287 | radio->stereo = 0; |
290 | 288 | ||
289 | mutex_unlock(&radio->lock); | ||
290 | |||
291 | return retval; | 291 | return retval; |
292 | } | 292 | } |
293 | 293 | ||
diff --git a/drivers/media/video/cs5345.c b/drivers/media/video/cs5345.c index 14bebf8a116f..87e91072627a 100644 --- a/drivers/media/video/cs5345.c +++ b/drivers/media/video/cs5345.c | |||
@@ -18,7 +18,6 @@ | |||
18 | */ | 18 | */ |
19 | 19 | ||
20 | 20 | ||
21 | #include <linux/version.h> | ||
22 | #include <linux/module.h> | 21 | #include <linux/module.h> |
23 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
24 | #include <linux/i2c.h> | 23 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 8f1db57bd1dd..bfe25841dbf4 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c | |||
@@ -1586,7 +1586,8 @@ static int mpeg_open(struct file *file) | |||
1586 | lock_kernel(); | 1586 | lock_kernel(); |
1587 | list_for_each(list, &cx23885_devlist) { | 1587 | list_for_each(list, &cx23885_devlist) { |
1588 | h = list_entry(list, struct cx23885_dev, devlist); | 1588 | h = list_entry(list, struct cx23885_dev, devlist); |
1589 | if (h->v4l_device->minor == minor) { | 1589 | if (h->v4l_device && |
1590 | h->v4l_device->minor == minor) { | ||
1590 | dev = h; | 1591 | dev = h; |
1591 | break; | 1592 | break; |
1592 | } | 1593 | } |
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 2d81c4d04340..eaa11893bfe9 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c | |||
@@ -730,12 +730,13 @@ static int video_open(struct file *file) | |||
730 | lock_kernel(); | 730 | lock_kernel(); |
731 | list_for_each(list, &cx23885_devlist) { | 731 | list_for_each(list, &cx23885_devlist) { |
732 | h = list_entry(list, struct cx23885_dev, devlist); | 732 | h = list_entry(list, struct cx23885_dev, devlist); |
733 | if (h->video_dev->minor == minor) { | 733 | if (h->video_dev && |
734 | h->video_dev->minor == minor) { | ||
734 | dev = h; | 735 | dev = h; |
735 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; | 736 | type = V4L2_BUF_TYPE_VIDEO_CAPTURE; |
736 | } | 737 | } |
737 | if (h->vbi_dev && | 738 | if (h->vbi_dev && |
738 | h->vbi_dev->minor == minor) { | 739 | h->vbi_dev->minor == minor) { |
739 | dev = h; | 740 | dev = h; |
740 | type = V4L2_BUF_TYPE_VBI_CAPTURE; | 741 | type = V4L2_BUF_TYPE_VBI_CAPTURE; |
741 | } | 742 | } |
diff --git a/drivers/media/video/cx25840/cx25840-core.c b/drivers/media/video/cx25840/cx25840-core.c index 88f2fd32bfe3..25eb3bec9e5d 100644 --- a/drivers/media/video/cx25840/cx25840-core.c +++ b/drivers/media/video/cx25840/cx25840-core.c | |||
@@ -1382,6 +1382,14 @@ static int cx25840_log_status(struct v4l2_subdev *sd) | |||
1382 | 1382 | ||
1383 | static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) | 1383 | static int cx25840_command(struct i2c_client *client, unsigned cmd, void *arg) |
1384 | { | 1384 | { |
1385 | /* ignore this command */ | ||
1386 | if (cmd == TUNER_SET_TYPE_ADDR || cmd == TUNER_SET_CONFIG) | ||
1387 | return 0; | ||
1388 | |||
1389 | /* Old-style drivers rely on initialization on first use, so | ||
1390 | call the init whenever a command is issued to this driver. | ||
1391 | New-style drivers using v4l2_subdev should call init explicitly. */ | ||
1392 | cx25840_init(i2c_get_clientdata(client), 0); | ||
1385 | return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); | 1393 | return v4l2_subdev_command(i2c_get_clientdata(client), cmd, arg); |
1386 | } | 1394 | } |
1387 | 1395 | ||
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c index 613dfea4ff3e..aef5297534af 100644 --- a/drivers/media/video/cx88/cx88-dvb.c +++ b/drivers/media/video/cx88/cx88-dvb.c | |||
@@ -614,34 +614,41 @@ static struct stv0288_config tevii_tuner_earda_config = { | |||
614 | .set_ts_params = cx24116_set_ts_param, | 614 | .set_ts_params = cx24116_set_ts_param, |
615 | }; | 615 | }; |
616 | 616 | ||
617 | static int dvb_register(struct cx8802_dev *dev) | 617 | static int cx8802_alloc_frontends(struct cx8802_dev *dev) |
618 | { | 618 | { |
619 | struct cx88_core *core = dev->core; | 619 | struct cx88_core *core = dev->core; |
620 | struct videobuf_dvb_frontend *fe0, *fe1 = NULL; | 620 | struct videobuf_dvb_frontend *fe = NULL; |
621 | int mfe_shared = 0; /* bus not shared by default */ | ||
622 | int i; | 621 | int i; |
623 | 622 | ||
624 | if (0 != core->i2c_rc) { | ||
625 | printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); | ||
626 | goto frontend_detach; | ||
627 | } | ||
628 | |||
629 | if (!core->board.num_frontends) | ||
630 | return -EINVAL; | ||
631 | |||
632 | mutex_init(&dev->frontends.lock); | 623 | mutex_init(&dev->frontends.lock); |
633 | INIT_LIST_HEAD(&dev->frontends.felist); | 624 | INIT_LIST_HEAD(&dev->frontends.felist); |
634 | 625 | ||
626 | if (!core->board.num_frontends) | ||
627 | return -ENODEV; | ||
628 | |||
635 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, | 629 | printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, |
636 | core->board.num_frontends); | 630 | core->board.num_frontends); |
637 | for (i = 1; i <= core->board.num_frontends; i++) { | 631 | for (i = 1; i <= core->board.num_frontends; i++) { |
638 | fe0 = videobuf_dvb_alloc_frontend(&dev->frontends, i); | 632 | fe = videobuf_dvb_alloc_frontend(&dev->frontends, i); |
639 | if (!fe0) { | 633 | if (!fe) { |
640 | printk(KERN_ERR "%s() failed to alloc\n", __func__); | 634 | printk(KERN_ERR "%s() failed to alloc\n", __func__); |
641 | videobuf_dvb_dealloc_frontends(&dev->frontends); | 635 | videobuf_dvb_dealloc_frontends(&dev->frontends); |
642 | goto frontend_detach; | 636 | return -ENOMEM; |
643 | } | 637 | } |
644 | } | 638 | } |
639 | return 0; | ||
640 | } | ||
641 | |||
642 | static int dvb_register(struct cx8802_dev *dev) | ||
643 | { | ||
644 | struct cx88_core *core = dev->core; | ||
645 | struct videobuf_dvb_frontend *fe0, *fe1 = NULL; | ||
646 | int mfe_shared = 0; /* bus not shared by default */ | ||
647 | |||
648 | if (0 != core->i2c_rc) { | ||
649 | printk(KERN_ERR "%s/2: no i2c-bus available, cannot attach dvb drivers\n", core->name); | ||
650 | goto frontend_detach; | ||
651 | } | ||
645 | 652 | ||
646 | /* Get the first frontend */ | 653 | /* Get the first frontend */ |
647 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); | 654 | fe0 = videobuf_dvb_get_frontend(&dev->frontends, 1); |
@@ -1243,6 +1250,8 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) | |||
1243 | struct cx88_core *core = drv->core; | 1250 | struct cx88_core *core = drv->core; |
1244 | struct cx8802_dev *dev = drv->core->dvbdev; | 1251 | struct cx8802_dev *dev = drv->core->dvbdev; |
1245 | int err; | 1252 | int err; |
1253 | struct videobuf_dvb_frontend *fe; | ||
1254 | int i; | ||
1246 | 1255 | ||
1247 | dprintk( 1, "%s\n", __func__); | 1256 | dprintk( 1, "%s\n", __func__); |
1248 | dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", | 1257 | dprintk( 1, " ->being probed by Card=%d Name=%s, PCI %02x:%02x\n", |
@@ -1258,39 +1267,34 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv) | |||
1258 | /* If vp3054 isn't enabled, a stub will just return 0 */ | 1267 | /* If vp3054 isn't enabled, a stub will just return 0 */ |
1259 | err = vp3054_i2c_probe(dev); | 1268 | err = vp3054_i2c_probe(dev); |
1260 | if (0 != err) | 1269 | if (0 != err) |
1261 | goto fail_probe; | 1270 | goto fail_core; |
1262 | 1271 | ||
1263 | /* dvb stuff */ | 1272 | /* dvb stuff */ |
1264 | printk(KERN_INFO "%s/2: cx2388x based DVB/ATSC card\n", core->name); | 1273 | printk(KERN_INFO "%s/2: cx2388x based DVB/ATSC card\n", core->name); |
1265 | dev->ts_gen_cntrl = 0x0c; | 1274 | dev->ts_gen_cntrl = 0x0c; |
1266 | 1275 | ||
1276 | err = cx8802_alloc_frontends(dev); | ||
1277 | if (err) | ||
1278 | goto fail_core; | ||
1279 | |||
1267 | err = -ENODEV; | 1280 | err = -ENODEV; |
1268 | if (core->board.num_frontends) { | 1281 | for (i = 1; i <= core->board.num_frontends; i++) { |
1269 | struct videobuf_dvb_frontend *fe; | 1282 | fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); |
1270 | int i; | 1283 | if (fe == NULL) { |
1271 | 1284 | printk(KERN_ERR "%s() failed to get frontend(%d)\n", | |
1272 | for (i = 1; i <= core->board.num_frontends; i++) { | ||
1273 | fe = videobuf_dvb_get_frontend(&core->dvbdev->frontends, i); | ||
1274 | if (fe == NULL) { | ||
1275 | printk(KERN_ERR "%s() failed to get frontend(%d)\n", | ||
1276 | __func__, i); | 1285 | __func__, i); |
1277 | goto fail_probe; | 1286 | goto fail_probe; |
1278 | } | 1287 | } |
1279 | videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, | 1288 | videobuf_queue_sg_init(&fe->dvb.dvbq, &dvb_qops, |
1280 | &dev->pci->dev, &dev->slock, | 1289 | &dev->pci->dev, &dev->slock, |
1281 | V4L2_BUF_TYPE_VIDEO_CAPTURE, | 1290 | V4L2_BUF_TYPE_VIDEO_CAPTURE, |
1282 | V4L2_FIELD_TOP, | 1291 | V4L2_FIELD_TOP, |
1283 | sizeof(struct cx88_buffer), | 1292 | sizeof(struct cx88_buffer), |
1284 | dev); | 1293 | dev); |
1285 | /* init struct videobuf_dvb */ | 1294 | /* init struct videobuf_dvb */ |
1286 | fe->dvb.name = dev->core->name; | 1295 | fe->dvb.name = dev->core->name; |
1287 | } | ||
1288 | } else { | ||
1289 | /* no frontends allocated */ | ||
1290 | printk(KERN_ERR "%s/2 .num_frontends should be non-zero\n", | ||
1291 | core->name); | ||
1292 | goto fail_core; | ||
1293 | } | 1296 | } |
1297 | |||
1294 | err = dvb_register(dev); | 1298 | err = dvb_register(dev); |
1295 | if (err) | 1299 | if (err) |
1296 | /* frontends/adapter de-allocated in dvb_register */ | 1300 | /* frontends/adapter de-allocated in dvb_register */ |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index 60a8b3187f14..6025fdd23344 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -336,8 +336,8 @@ struct cx88_core { | |||
336 | /* config info -- dvb */ | 336 | /* config info -- dvb */ |
337 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) | 337 | #if defined(CONFIG_VIDEO_CX88_DVB) || defined(CONFIG_VIDEO_CX88_DVB_MODULE) |
338 | int (*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); | 338 | int (*prev_set_voltage)(struct dvb_frontend *fe, fe_sec_voltage_t voltage); |
339 | void (*gate_ctrl)(struct cx88_core *core, int open); | ||
340 | #endif | 339 | #endif |
340 | void (*gate_ctrl)(struct cx88_core *core, int open); | ||
341 | 341 | ||
342 | /* state info */ | 342 | /* state info */ |
343 | struct task_struct *kthread; | 343 | struct task_struct *kthread; |
diff --git a/drivers/media/video/em28xx/em28xx-audio.c b/drivers/media/video/em28xx/em28xx-audio.c index 94378ccb7505..5d882a44e3ee 100644 --- a/drivers/media/video/em28xx/em28xx-audio.c +++ b/drivers/media/video/em28xx/em28xx-audio.c | |||
@@ -62,9 +62,15 @@ static int em28xx_isoc_audio_deinit(struct em28xx *dev) | |||
62 | 62 | ||
63 | dprintk("Stopping isoc\n"); | 63 | dprintk("Stopping isoc\n"); |
64 | for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { | 64 | for (i = 0; i < EM28XX_AUDIO_BUFS; i++) { |
65 | usb_unlink_urb(dev->adev.urb[i]); | 65 | if (!irqs_disabled()) |
66 | usb_kill_urb(dev->adev.urb[i]); | ||
67 | else | ||
68 | usb_unlink_urb(dev->adev.urb[i]); | ||
66 | usb_free_urb(dev->adev.urb[i]); | 69 | usb_free_urb(dev->adev.urb[i]); |
67 | dev->adev.urb[i] = NULL; | 70 | dev->adev.urb[i] = NULL; |
71 | |||
72 | kfree(dev->adev.transfer_buffer[i]); | ||
73 | dev->adev.transfer_buffer[i] = NULL; | ||
68 | } | 74 | } |
69 | 75 | ||
70 | return 0; | 76 | return 0; |
@@ -389,11 +395,15 @@ static int snd_em28xx_capture_trigger(struct snd_pcm_substream *substream, | |||
389 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream | 395 | static snd_pcm_uframes_t snd_em28xx_capture_pointer(struct snd_pcm_substream |
390 | *substream) | 396 | *substream) |
391 | { | 397 | { |
392 | struct em28xx *dev; | 398 | unsigned long flags; |
393 | 399 | ||
400 | struct em28xx *dev; | ||
394 | snd_pcm_uframes_t hwptr_done; | 401 | snd_pcm_uframes_t hwptr_done; |
402 | |||
395 | dev = snd_pcm_substream_chip(substream); | 403 | dev = snd_pcm_substream_chip(substream); |
404 | spin_lock_irqsave(&dev->adev.slock, flags); | ||
396 | hwptr_done = dev->adev.hwptr_done_capture; | 405 | hwptr_done = dev->adev.hwptr_done_capture; |
406 | spin_unlock_irqrestore(&dev->adev.slock, flags); | ||
397 | 407 | ||
398 | return hwptr_done; | 408 | return hwptr_done; |
399 | } | 409 | } |
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index ef9bf008a924..3b3ca3f46d52 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -102,6 +102,18 @@ static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | |||
102 | /* Board - EM2870 Kworld 355u | 102 | /* Board - EM2870 Kworld 355u |
103 | Analog - No input analog */ | 103 | Analog - No input analog */ |
104 | 104 | ||
105 | static struct em28xx_reg_seq kworld_330u_analog[] = { | ||
106 | {EM28XX_R08_GPIO, 0x6d, ~EM_GPIO_4, 10}, | ||
107 | {EM2880_R04_GPO, 0x00, 0xff, 10}, | ||
108 | { -1, -1, -1, -1}, | ||
109 | }; | ||
110 | |||
111 | static struct em28xx_reg_seq kworld_330u_digital[] = { | ||
112 | {EM28XX_R08_GPIO, 0x6e, ~EM_GPIO_4, 10}, | ||
113 | {EM2880_R04_GPO, 0x08, 0xff, 10}, | ||
114 | { -1, -1, -1, -1}, | ||
115 | }; | ||
116 | |||
105 | /* Callback for the most boards */ | 117 | /* Callback for the most boards */ |
106 | static struct em28xx_reg_seq default_tuner_gpio[] = { | 118 | static struct em28xx_reg_seq default_tuner_gpio[] = { |
107 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, | 119 | {EM28XX_R08_GPIO, EM_GPIO_4, EM_GPIO_4, 10}, |
@@ -1177,29 +1189,33 @@ struct em28xx_board em28xx_boards[] = { | |||
1177 | .gpio = hauppauge_wintv_hvr_900_analog, | 1189 | .gpio = hauppauge_wintv_hvr_900_analog, |
1178 | } }, | 1190 | } }, |
1179 | }, | 1191 | }, |
1180 | [EM2883_BOARD_KWORLD_HYBRID_A316] = { | 1192 | [EM2883_BOARD_KWORLD_HYBRID_330U] = { |
1181 | .name = "Kworld PlusTV HD Hybrid 330", | 1193 | .name = "Kworld PlusTV HD Hybrid 330", |
1182 | .tuner_type = TUNER_XC2028, | 1194 | .tuner_type = TUNER_XC2028, |
1183 | .tuner_gpio = default_tuner_gpio, | 1195 | .tuner_gpio = default_tuner_gpio, |
1184 | .decoder = EM28XX_TVP5150, | 1196 | .decoder = EM28XX_TVP5150, |
1185 | .mts_firmware = 1, | 1197 | .mts_firmware = 1, |
1186 | .has_dvb = 1, | 1198 | .has_dvb = 1, |
1187 | .dvb_gpio = default_digital, | 1199 | .dvb_gpio = kworld_330u_digital, |
1200 | .xclk = EM28XX_XCLK_FREQUENCY_12MHZ, | ||
1201 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | EM28XX_I2C_EEPROM_ON_BOARD | EM28XX_I2C_EEPROM_KEY_VALID, | ||
1188 | .input = { { | 1202 | .input = { { |
1189 | .type = EM28XX_VMUX_TELEVISION, | 1203 | .type = EM28XX_VMUX_TELEVISION, |
1190 | .vmux = TVP5150_COMPOSITE0, | 1204 | .vmux = TVP5150_COMPOSITE0, |
1191 | .amux = EM28XX_AMUX_VIDEO, | 1205 | .amux = EM28XX_AMUX_VIDEO, |
1192 | .gpio = default_analog, | 1206 | .gpio = kworld_330u_analog, |
1207 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | ||
1193 | }, { | 1208 | }, { |
1194 | .type = EM28XX_VMUX_COMPOSITE1, | 1209 | .type = EM28XX_VMUX_COMPOSITE1, |
1195 | .vmux = TVP5150_COMPOSITE1, | 1210 | .vmux = TVP5150_COMPOSITE1, |
1196 | .amux = EM28XX_AMUX_LINE_IN, | 1211 | .amux = EM28XX_AMUX_LINE_IN, |
1197 | .gpio = hauppauge_wintv_hvr_900_analog, | 1212 | .gpio = kworld_330u_analog, |
1213 | .aout = EM28XX_AOUT_PCM_IN | EM28XX_AOUT_PCM_STEREO, | ||
1198 | }, { | 1214 | }, { |
1199 | .type = EM28XX_VMUX_SVIDEO, | 1215 | .type = EM28XX_VMUX_SVIDEO, |
1200 | .vmux = TVP5150_SVIDEO, | 1216 | .vmux = TVP5150_SVIDEO, |
1201 | .amux = EM28XX_AMUX_LINE_IN, | 1217 | .amux = EM28XX_AMUX_LINE_IN, |
1202 | .gpio = hauppauge_wintv_hvr_900_analog, | 1218 | .gpio = kworld_330u_analog, |
1203 | } }, | 1219 | } }, |
1204 | }, | 1220 | }, |
1205 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { | 1221 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
@@ -1249,7 +1265,7 @@ struct usb_device_id em28xx_id_table [] = { | |||
1249 | { USB_DEVICE(0xeb1a, 0xe310), | 1265 | { USB_DEVICE(0xeb1a, 0xe310), |
1250 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, | 1266 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD }, |
1251 | { USB_DEVICE(0xeb1a, 0xa316), | 1267 | { USB_DEVICE(0xeb1a, 0xa316), |
1252 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_A316 }, | 1268 | .driver_info = EM2883_BOARD_KWORLD_HYBRID_330U }, |
1253 | { USB_DEVICE(0xeb1a, 0xe320), | 1269 | { USB_DEVICE(0xeb1a, 0xe320), |
1254 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, | 1270 | .driver_info = EM2880_BOARD_MSI_DIGIVOX_AD_II }, |
1255 | { USB_DEVICE(0xeb1a, 0xe323), | 1271 | { USB_DEVICE(0xeb1a, 0xe323), |
@@ -1526,6 +1542,10 @@ static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) | |||
1526 | /* FIXME: Better to specify the needed IF */ | 1542 | /* FIXME: Better to specify the needed IF */ |
1527 | ctl->demod = XC3028_FE_DEFAULT; | 1543 | ctl->demod = XC3028_FE_DEFAULT; |
1528 | break; | 1544 | break; |
1545 | case EM2883_BOARD_KWORLD_HYBRID_330U: | ||
1546 | ctl->demod = XC3028_FE_CHINA; | ||
1547 | ctl->fname = XC2028_DEFAULT_FIRMWARE; | ||
1548 | break; | ||
1529 | default: | 1549 | default: |
1530 | ctl->demod = XC3028_FE_OREN538; | 1550 | ctl->demod = XC3028_FE_OREN538; |
1531 | } | 1551 | } |
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c index eb5fb05fab22..94fb1b639a2e 100644 --- a/drivers/media/video/em28xx/em28xx-core.c +++ b/drivers/media/video/em28xx/em28xx-core.c | |||
@@ -438,6 +438,10 @@ int em28xx_audio_analog_set(struct em28xx *dev) | |||
438 | if (dev->audio_mode.ac97 != EM28XX_NO_AC97) { | 438 | if (dev->audio_mode.ac97 != EM28XX_NO_AC97) { |
439 | int vol; | 439 | int vol; |
440 | 440 | ||
441 | em28xx_write_ac97(dev, AC97_POWER_DOWN_CTRL, 0x4200); | ||
442 | em28xx_write_ac97(dev, AC97_EXT_AUD_CTRL, 0x0031); | ||
443 | em28xx_write_ac97(dev, AC97_PCM_IN_SRATE, 0xbb80); | ||
444 | |||
441 | /* LSB: left channel - both channels with the same level */ | 445 | /* LSB: left channel - both channels with the same level */ |
442 | vol = (0x1f - dev->volume) | ((0x1f - dev->volume) << 8); | 446 | vol = (0x1f - dev->volume) | ((0x1f - dev->volume) << 8); |
443 | 447 | ||
@@ -454,6 +458,15 @@ int em28xx_audio_analog_set(struct em28xx *dev) | |||
454 | em28xx_warn("couldn't setup AC97 register %d\n", | 458 | em28xx_warn("couldn't setup AC97 register %d\n", |
455 | outputs[i].reg); | 459 | outputs[i].reg); |
456 | } | 460 | } |
461 | |||
462 | if (dev->ctl_aoutput & EM28XX_AOUT_PCM_IN) { | ||
463 | int sel = ac97_return_record_select(dev->ctl_aoutput); | ||
464 | |||
465 | /* Use the same input for both left and right channels */ | ||
466 | sel |= (sel << 8); | ||
467 | |||
468 | em28xx_write_ac97(dev, AC97_RECORD_SELECT, sel); | ||
469 | } | ||
457 | } | 470 | } |
458 | 471 | ||
459 | return ret; | 472 | return ret; |
@@ -847,8 +860,11 @@ void em28xx_uninit_isoc(struct em28xx *dev) | |||
847 | for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { | 860 | for (i = 0; i < dev->isoc_ctl.num_bufs; i++) { |
848 | urb = dev->isoc_ctl.urb[i]; | 861 | urb = dev->isoc_ctl.urb[i]; |
849 | if (urb) { | 862 | if (urb) { |
850 | usb_kill_urb(urb); | 863 | if (!irqs_disabled()) |
851 | usb_unlink_urb(urb); | 864 | usb_kill_urb(urb); |
865 | else | ||
866 | usb_unlink_urb(urb); | ||
867 | |||
852 | if (dev->isoc_ctl.transfer_buffer[i]) { | 868 | if (dev->isoc_ctl.transfer_buffer[i]) { |
853 | usb_buffer_free(dev->udev, | 869 | usb_buffer_free(dev->udev, |
854 | urb->transfer_buffer_length, | 870 | urb->transfer_buffer_length, |
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c index d38cb21834d9..9ad8527b3fda 100644 --- a/drivers/media/video/em28xx/em28xx-dvb.c +++ b/drivers/media/video/em28xx/em28xx-dvb.c | |||
@@ -28,6 +28,7 @@ | |||
28 | 28 | ||
29 | #include "lgdt330x.h" | 29 | #include "lgdt330x.h" |
30 | #include "zl10353.h" | 30 | #include "zl10353.h" |
31 | #include "s5h1409.h" | ||
31 | #ifdef EM28XX_DRX397XD_SUPPORT | 32 | #ifdef EM28XX_DRX397XD_SUPPORT |
32 | #include "drx397xD.h" | 33 | #include "drx397xD.h" |
33 | #endif | 34 | #endif |
@@ -232,6 +233,15 @@ static struct zl10353_config em28xx_zl10353_with_xc3028 = { | |||
232 | .if2 = 45600, | 233 | .if2 = 45600, |
233 | }; | 234 | }; |
234 | 235 | ||
236 | static struct s5h1409_config em28xx_s5h1409_with_xc3028 = { | ||
237 | .demod_address = 0x32 >> 1, | ||
238 | .output_mode = S5H1409_PARALLEL_OUTPUT, | ||
239 | .gpio = S5H1409_GPIO_OFF, | ||
240 | .inversion = S5H1409_INVERSION_OFF, | ||
241 | .status_mode = S5H1409_DEMODLOCKING, | ||
242 | .mpeg_timing = S5H1409_MPEGTIMING_CONTINOUS_NONINVERTING_CLOCK | ||
243 | }; | ||
244 | |||
235 | #ifdef EM28XX_DRX397XD_SUPPORT | 245 | #ifdef EM28XX_DRX397XD_SUPPORT |
236 | /* [TODO] djh - not sure yet what the device config needs to contain */ | 246 | /* [TODO] djh - not sure yet what the device config needs to contain */ |
237 | static struct drx397xD_config em28xx_drx397xD_with_xc3028 = { | 247 | static struct drx397xD_config em28xx_drx397xD_with_xc3028 = { |
@@ -412,7 +422,6 @@ static int dvb_init(struct em28xx *dev) | |||
412 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: | 422 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: |
413 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: | 423 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: |
414 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: | 424 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: |
415 | case EM2883_BOARD_KWORLD_HYBRID_A316: | ||
416 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: | 425 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: |
417 | dvb->frontend = dvb_attach(lgdt330x_attach, | 426 | dvb->frontend = dvb_attach(lgdt330x_attach, |
418 | &em2880_lgdt3303_dev, | 427 | &em2880_lgdt3303_dev, |
@@ -433,6 +442,15 @@ static int dvb_init(struct em28xx *dev) | |||
433 | goto out_free; | 442 | goto out_free; |
434 | } | 443 | } |
435 | break; | 444 | break; |
445 | case EM2883_BOARD_KWORLD_HYBRID_330U: | ||
446 | dvb->frontend = dvb_attach(s5h1409_attach, | ||
447 | &em28xx_s5h1409_with_xc3028, | ||
448 | &dev->i2c_adap); | ||
449 | if (attach_xc3028(0x61, dev) < 0) { | ||
450 | result = -EINVAL; | ||
451 | goto out_free; | ||
452 | } | ||
453 | break; | ||
436 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: | 454 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: |
437 | #ifdef EM28XX_DRX397XD_SUPPORT | 455 | #ifdef EM28XX_DRX397XD_SUPPORT |
438 | /* We don't have the config structure properly populated, so | 456 | /* We don't have the config structure properly populated, so |
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c index 416b691c33c1..8e61b2ca9167 100644 --- a/drivers/media/video/em28xx/em28xx-video.c +++ b/drivers/media/video/em28xx/em28xx-video.c | |||
@@ -886,10 +886,10 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) | |||
886 | if (0 == INPUT(i)->type) | 886 | if (0 == INPUT(i)->type) |
887 | return -EINVAL; | 887 | return -EINVAL; |
888 | 888 | ||
889 | mutex_lock(&dev->lock); | 889 | dev->ctl_input = i; |
890 | |||
891 | video_mux(dev, i); | ||
892 | 890 | ||
891 | mutex_lock(&dev->lock); | ||
892 | video_mux(dev, dev->ctl_input); | ||
893 | mutex_unlock(&dev->lock); | 893 | mutex_unlock(&dev->lock); |
894 | return 0; | 894 | return 0; |
895 | } | 895 | } |
@@ -939,6 +939,12 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a) | |||
939 | struct em28xx_fh *fh = priv; | 939 | struct em28xx_fh *fh = priv; |
940 | struct em28xx *dev = fh->dev; | 940 | struct em28xx *dev = fh->dev; |
941 | 941 | ||
942 | |||
943 | if (a->index >= MAX_EM28XX_INPUT) | ||
944 | return -EINVAL; | ||
945 | if (0 == INPUT(a->index)->type) | ||
946 | return -EINVAL; | ||
947 | |||
942 | mutex_lock(&dev->lock); | 948 | mutex_lock(&dev->lock); |
943 | 949 | ||
944 | dev->ctl_ainput = INPUT(a->index)->amux; | 950 | dev->ctl_ainput = INPUT(a->index)->amux; |
@@ -1950,6 +1956,7 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev, | |||
1950 | 1956 | ||
1951 | int em28xx_register_analog_devices(struct em28xx *dev) | 1957 | int em28xx_register_analog_devices(struct em28xx *dev) |
1952 | { | 1958 | { |
1959 | u8 val; | ||
1953 | int ret; | 1960 | int ret; |
1954 | 1961 | ||
1955 | printk(KERN_INFO "%s: v4l2 driver version %d.%d.%d\n", | 1962 | printk(KERN_INFO "%s: v4l2 driver version %d.%d.%d\n", |
@@ -1957,34 +1964,34 @@ int em28xx_register_analog_devices(struct em28xx *dev) | |||
1957 | (EM28XX_VERSION_CODE >> 16) & 0xff, | 1964 | (EM28XX_VERSION_CODE >> 16) & 0xff, |
1958 | (EM28XX_VERSION_CODE >> 8) & 0xff, EM28XX_VERSION_CODE & 0xff); | 1965 | (EM28XX_VERSION_CODE >> 8) & 0xff, EM28XX_VERSION_CODE & 0xff); |
1959 | 1966 | ||
1967 | /* set default norm */ | ||
1968 | dev->norm = em28xx_video_template.current_norm; | ||
1969 | dev->width = norm_maxw(dev); | ||
1970 | dev->height = norm_maxh(dev); | ||
1971 | dev->interlaced = EM28XX_INTERLACED_DEFAULT; | ||
1972 | dev->hscale = 0; | ||
1973 | dev->vscale = 0; | ||
1974 | dev->ctl_input = 0; | ||
1975 | |||
1960 | /* Analog specific initialization */ | 1976 | /* Analog specific initialization */ |
1961 | dev->format = &format[0]; | 1977 | dev->format = &format[0]; |
1962 | video_mux(dev, 0); | 1978 | video_mux(dev, dev->ctl_input); |
1979 | |||
1980 | /* Audio defaults */ | ||
1981 | dev->mute = 1; | ||
1982 | dev->volume = 0x1f; | ||
1963 | 1983 | ||
1964 | /* enable vbi capturing */ | 1984 | /* enable vbi capturing */ |
1965 | 1985 | ||
1966 | /* em28xx_write_reg(dev, EM28XX_R0E_AUDIOSRC, 0xc0); audio register */ | 1986 | /* em28xx_write_reg(dev, EM28XX_R0E_AUDIOSRC, 0xc0); audio register */ |
1967 | /* em28xx_write_reg(dev, EM28XX_R0F_XCLK, 0x80); clk register */ | 1987 | val = (u8)em28xx_read_reg(dev, EM28XX_R0F_XCLK); |
1988 | em28xx_write_reg(dev, EM28XX_R0F_XCLK, (EM28XX_XCLK_AUDIO_UNMUTE | val)); | ||
1968 | em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x51); | 1989 | em28xx_write_reg(dev, EM28XX_R11_VINCTRL, 0x51); |
1969 | 1990 | ||
1970 | dev->mute = 1; /* maybe not the right place... */ | ||
1971 | dev->volume = 0x1f; | ||
1972 | |||
1973 | em28xx_set_outfmt(dev); | 1991 | em28xx_set_outfmt(dev); |
1974 | em28xx_colorlevels_set_default(dev); | 1992 | em28xx_colorlevels_set_default(dev); |
1975 | em28xx_compression_disable(dev); | 1993 | em28xx_compression_disable(dev); |
1976 | 1994 | ||
1977 | /* set default norm */ | ||
1978 | dev->norm = em28xx_video_template.current_norm; | ||
1979 | dev->width = norm_maxw(dev); | ||
1980 | dev->height = norm_maxh(dev); | ||
1981 | dev->interlaced = EM28XX_INTERLACED_DEFAULT; | ||
1982 | dev->hscale = 0; | ||
1983 | dev->vscale = 0; | ||
1984 | |||
1985 | /* FIXME: This is a very bad hack! Not all devices have TV on input 2 */ | ||
1986 | dev->ctl_input = 2; | ||
1987 | |||
1988 | /* allocate and fill video video_device struct */ | 1995 | /* allocate and fill video video_device struct */ |
1989 | dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video"); | 1996 | dev->vdev = em28xx_vdev_init(dev, &em28xx_video_template, "video"); |
1990 | if (!dev->vdev) { | 1997 | if (!dev->vdev) { |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index 6c6b94aa05b2..dd2cd36fb1bb 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -94,7 +94,7 @@ | |||
94 | #define EM2882_BOARD_KWORLD_VS_DVBT 54 | 94 | #define EM2882_BOARD_KWORLD_VS_DVBT 54 |
95 | #define EM2882_BOARD_TERRATEC_HYBRID_XS 55 | 95 | #define EM2882_BOARD_TERRATEC_HYBRID_XS 55 |
96 | #define EM2882_BOARD_PINNACLE_HYBRID_PRO 56 | 96 | #define EM2882_BOARD_PINNACLE_HYBRID_PRO 56 |
97 | #define EM2883_BOARD_KWORLD_HYBRID_A316 57 | 97 | #define EM2883_BOARD_KWORLD_HYBRID_330U 57 |
98 | #define EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU 58 | 98 | #define EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU 58 |
99 | #define EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 60 | 99 | #define EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850 60 |
100 | #define EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2 61 | 100 | #define EM2820_BOARD_PROLINK_PLAYTV_BOX4_USB2 61 |
@@ -300,13 +300,32 @@ enum em28xx_amux { | |||
300 | }; | 300 | }; |
301 | 301 | ||
302 | enum em28xx_aout { | 302 | enum em28xx_aout { |
303 | /* AC97 outputs */ | ||
303 | EM28XX_AOUT_MASTER = 1 << 0, | 304 | EM28XX_AOUT_MASTER = 1 << 0, |
304 | EM28XX_AOUT_LINE = 1 << 1, | 305 | EM28XX_AOUT_LINE = 1 << 1, |
305 | EM28XX_AOUT_MONO = 1 << 2, | 306 | EM28XX_AOUT_MONO = 1 << 2, |
306 | EM28XX_AOUT_LFE = 1 << 3, | 307 | EM28XX_AOUT_LFE = 1 << 3, |
307 | EM28XX_AOUT_SURR = 1 << 4, | 308 | EM28XX_AOUT_SURR = 1 << 4, |
309 | |||
310 | /* PCM IN Mixer - used by AC97_RECORD_SELECT register */ | ||
311 | EM28XX_AOUT_PCM_IN = 1 << 7, | ||
312 | |||
313 | /* Bits 10-8 are used to indicate the PCM IN record select */ | ||
314 | EM28XX_AOUT_PCM_MIC_PCM = 0 << 8, | ||
315 | EM28XX_AOUT_PCM_CD = 1 << 8, | ||
316 | EM28XX_AOUT_PCM_VIDEO = 2 << 8, | ||
317 | EM28XX_AOUT_PCM_AUX = 3 << 8, | ||
318 | EM28XX_AOUT_PCM_LINE = 4 << 8, | ||
319 | EM28XX_AOUT_PCM_STEREO = 5 << 8, | ||
320 | EM28XX_AOUT_PCM_MONO = 6 << 8, | ||
321 | EM28XX_AOUT_PCM_PHONE = 7 << 8, | ||
308 | }; | 322 | }; |
309 | 323 | ||
324 | static inline int ac97_return_record_select(int a_out) | ||
325 | { | ||
326 | return (a_out & 0x700) >> 8; | ||
327 | } | ||
328 | |||
310 | struct em28xx_reg_seq { | 329 | struct em28xx_reg_seq { |
311 | int reg; | 330 | int reg; |
312 | unsigned char val, mask; | 331 | unsigned char val, mask; |
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index 5e36b9a4ae3e..2ed24527ecd6 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c | |||
@@ -423,7 +423,8 @@ static void destroy_urbs(struct gspca_dev *gspca_dev) | |||
423 | break; | 423 | break; |
424 | 424 | ||
425 | gspca_dev->urb[i] = NULL; | 425 | gspca_dev->urb[i] = NULL; |
426 | usb_kill_urb(urb); | 426 | if (!gspca_dev->present) |
427 | usb_kill_urb(urb); | ||
427 | if (urb->transfer_buffer != NULL) | 428 | if (urb->transfer_buffer != NULL) |
428 | usb_buffer_free(gspca_dev->dev, | 429 | usb_buffer_free(gspca_dev->dev, |
429 | urb->transfer_buffer_length, | 430 | urb->transfer_buffer_length, |
@@ -1950,7 +1951,6 @@ void gspca_disconnect(struct usb_interface *intf) | |||
1950 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); | 1951 | struct gspca_dev *gspca_dev = usb_get_intfdata(intf); |
1951 | 1952 | ||
1952 | gspca_dev->present = 0; | 1953 | gspca_dev->present = 0; |
1953 | gspca_dev->streaming = 0; | ||
1954 | 1954 | ||
1955 | usb_set_intfdata(intf, NULL); | 1955 | usb_set_intfdata(intf, NULL); |
1956 | 1956 | ||
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index e8e5921cdc34..c46c990987f9 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -949,8 +949,10 @@ static int __devinit ivtv_probe(struct pci_dev *dev, | |||
949 | itv->instance = atomic_inc_return(&ivtv_instance) - 1; | 949 | itv->instance = atomic_inc_return(&ivtv_instance) - 1; |
950 | 950 | ||
951 | retval = v4l2_device_register(&dev->dev, &itv->device); | 951 | retval = v4l2_device_register(&dev->dev, &itv->device); |
952 | if (retval) | 952 | if (retval) { |
953 | kfree(itv); | ||
953 | return retval; | 954 | return retval; |
955 | } | ||
954 | /* "ivtv + PCI ID" is a bit of a mouthful, so use | 956 | /* "ivtv + PCI ID" is a bit of a mouthful, so use |
955 | "ivtv + instance" instead. */ | 957 | "ivtv + instance" instead. */ |
956 | snprintf(itv->device.name, sizeof(itv->device.name), | 958 | snprintf(itv->device.name, sizeof(itv->device.name), |
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c index 39fbc970f43d..0d810189dd87 100644 --- a/drivers/media/video/pwc/pwc-if.c +++ b/drivers/media/video/pwc/pwc-if.c | |||
@@ -62,7 +62,6 @@ | |||
62 | #include <linux/poll.h> | 62 | #include <linux/poll.h> |
63 | #include <linux/slab.h> | 63 | #include <linux/slab.h> |
64 | #include <linux/vmalloc.h> | 64 | #include <linux/vmalloc.h> |
65 | #include <linux/version.h> | ||
66 | #include <asm/io.h> | 65 | #include <asm/io.h> |
67 | 66 | ||
68 | #include "pwc.h" | 67 | #include "pwc.h" |
diff --git a/drivers/media/video/saa7127.c b/drivers/media/video/saa7127.c index d6848f7a503b..05221d47dd4c 100644 --- a/drivers/media/video/saa7127.c +++ b/drivers/media/video/saa7127.c | |||
@@ -149,7 +149,7 @@ static const struct i2c_reg_value saa7127_init_config_common[] = { | |||
149 | { SAA7127_REG_COPYGEN_0, 0x77 }, | 149 | { SAA7127_REG_COPYGEN_0, 0x77 }, |
150 | { SAA7127_REG_COPYGEN_1, 0x41 }, | 150 | { SAA7127_REG_COPYGEN_1, 0x41 }, |
151 | { SAA7127_REG_COPYGEN_2, 0x00 }, /* Macrovision enable/disable */ | 151 | { SAA7127_REG_COPYGEN_2, 0x00 }, /* Macrovision enable/disable */ |
152 | { SAA7127_REG_OUTPUT_PORT_CONTROL, 0x9e }, | 152 | { SAA7127_REG_OUTPUT_PORT_CONTROL, 0xbf }, |
153 | { SAA7127_REG_GAIN_LUMINANCE_RGB, 0x00 }, | 153 | { SAA7127_REG_GAIN_LUMINANCE_RGB, 0x00 }, |
154 | { SAA7127_REG_GAIN_COLORDIFF_RGB, 0x00 }, | 154 | { SAA7127_REG_GAIN_COLORDIFF_RGB, 0x00 }, |
155 | { SAA7127_REG_INPUT_PORT_CONTROL_1, 0x80 }, /* for color bars */ | 155 | { SAA7127_REG_INPUT_PORT_CONTROL_1, 0x80 }, /* for color bars */ |
@@ -488,12 +488,18 @@ static int saa7127_set_output_type(struct v4l2_subdev *sd, int output) | |||
488 | break; | 488 | break; |
489 | 489 | ||
490 | case SAA7127_OUTPUT_TYPE_COMPOSITE: | 490 | case SAA7127_OUTPUT_TYPE_COMPOSITE: |
491 | state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ | 491 | if (state->ident == V4L2_IDENT_SAA7129) |
492 | state->reg_2d = 0x20; /* CVBS only */ | ||
493 | else | ||
494 | state->reg_2d = 0x08; /* 00001000 CVBS only, RGB DAC's off (high impedance mode) */ | ||
492 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ | 495 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ |
493 | break; | 496 | break; |
494 | 497 | ||
495 | case SAA7127_OUTPUT_TYPE_SVIDEO: | 498 | case SAA7127_OUTPUT_TYPE_SVIDEO: |
496 | state->reg_2d = 0xff; /* 11111111 croma -> R, luma -> CVBS + G + B */ | 499 | if (state->ident == V4L2_IDENT_SAA7129) |
500 | state->reg_2d = 0x18; /* Y + C */ | ||
501 | else | ||
502 | state->reg_2d = 0xff; /*11111111 croma -> R, luma -> CVBS + G + B */ | ||
497 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ | 503 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ |
498 | break; | 504 | break; |
499 | 505 | ||
@@ -508,7 +514,10 @@ static int saa7127_set_output_type(struct v4l2_subdev *sd, int output) | |||
508 | break; | 514 | break; |
509 | 515 | ||
510 | case SAA7127_OUTPUT_TYPE_BOTH: | 516 | case SAA7127_OUTPUT_TYPE_BOTH: |
511 | state->reg_2d = 0xbf; | 517 | if (state->ident == V4L2_IDENT_SAA7129) |
518 | state->reg_2d = 0x38; | ||
519 | else | ||
520 | state->reg_2d = 0xbf; | ||
512 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ | 521 | state->reg_3a = 0x13; /* by default switch YUV to RGB-matrix on */ |
513 | break; | 522 | break; |
514 | 523 | ||
@@ -731,24 +740,6 @@ static int saa7127_probe(struct i2c_client *client, | |||
731 | return -ENODEV; | 740 | return -ENODEV; |
732 | } | 741 | } |
733 | 742 | ||
734 | /* Configure Encoder */ | ||
735 | |||
736 | v4l2_dbg(1, debug, sd, "Configuring encoder\n"); | ||
737 | saa7127_write_inittab(sd, saa7127_init_config_common); | ||
738 | saa7127_set_std(sd, V4L2_STD_NTSC); | ||
739 | saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH); | ||
740 | saa7127_set_vps(sd, &vbi); | ||
741 | saa7127_set_wss(sd, &vbi); | ||
742 | saa7127_set_cc(sd, &vbi); | ||
743 | saa7127_set_xds(sd, &vbi); | ||
744 | if (test_image == 1) | ||
745 | /* The Encoder has an internal Colorbar generator */ | ||
746 | /* This can be used for debugging */ | ||
747 | saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE); | ||
748 | else | ||
749 | saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL); | ||
750 | saa7127_set_video_enable(sd, 1); | ||
751 | |||
752 | if (id->driver_data) { /* Chip type is already known */ | 743 | if (id->driver_data) { /* Chip type is already known */ |
753 | state->ident = id->driver_data; | 744 | state->ident = id->driver_data; |
754 | } else { /* Needs detection */ | 745 | } else { /* Needs detection */ |
@@ -770,6 +761,23 @@ static int saa7127_probe(struct i2c_client *client, | |||
770 | 761 | ||
771 | v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name, | 762 | v4l2_info(sd, "%s found @ 0x%x (%s)\n", client->name, |
772 | client->addr << 1, client->adapter->name); | 763 | client->addr << 1, client->adapter->name); |
764 | |||
765 | v4l2_dbg(1, debug, sd, "Configuring encoder\n"); | ||
766 | saa7127_write_inittab(sd, saa7127_init_config_common); | ||
767 | saa7127_set_std(sd, V4L2_STD_NTSC); | ||
768 | saa7127_set_output_type(sd, SAA7127_OUTPUT_TYPE_BOTH); | ||
769 | saa7127_set_vps(sd, &vbi); | ||
770 | saa7127_set_wss(sd, &vbi); | ||
771 | saa7127_set_cc(sd, &vbi); | ||
772 | saa7127_set_xds(sd, &vbi); | ||
773 | if (test_image == 1) | ||
774 | /* The Encoder has an internal Colorbar generator */ | ||
775 | /* This can be used for debugging */ | ||
776 | saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_TEST_IMAGE); | ||
777 | else | ||
778 | saa7127_set_input_type(sd, SAA7127_INPUT_TYPE_NORMAL); | ||
779 | saa7127_set_video_enable(sd, 1); | ||
780 | |||
773 | if (state->ident == V4L2_IDENT_SAA7129) | 781 | if (state->ident == V4L2_IDENT_SAA7129) |
774 | saa7127_write_inittab(sd, saa7129_init_config_extra); | 782 | saa7127_write_inittab(sd, saa7129_init_config_extra); |
775 | return 0; | 783 | return 0; |
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c index 26194a0ce927..c750d3dd57d2 100644 --- a/drivers/media/video/saa7134/saa7134-alsa.c +++ b/drivers/media/video/saa7134/saa7134-alsa.c | |||
@@ -1089,7 +1089,11 @@ static int saa7134_alsa_init(void) | |||
1089 | 1089 | ||
1090 | list_for_each(list,&saa7134_devlist) { | 1090 | list_for_each(list,&saa7134_devlist) { |
1091 | dev = list_entry(list, struct saa7134_dev, devlist); | 1091 | dev = list_entry(list, struct saa7134_dev, devlist); |
1092 | alsa_device_init(dev); | 1092 | if (dev->pci->device == PCI_DEVICE_ID_PHILIPS_SAA7130) |
1093 | printk(KERN_INFO "%s/alsa: %s doesn't support digital audio\n", | ||
1094 | dev->name, saa7134_boards[dev->board].name); | ||
1095 | else | ||
1096 | alsa_device_init(dev); | ||
1093 | } | 1097 | } |
1094 | 1098 | ||
1095 | if (dev == NULL) | 1099 | if (dev == NULL) |
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index dfbe08a9ad9b..99221d726edb 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -660,6 +660,10 @@ static int saa7134_hwinit1(struct saa7134_dev *dev) | |||
660 | 660 | ||
661 | saa_writel(SAA7134_IRQ1, 0); | 661 | saa_writel(SAA7134_IRQ1, 0); |
662 | saa_writel(SAA7134_IRQ2, 0); | 662 | saa_writel(SAA7134_IRQ2, 0); |
663 | |||
664 | /* Clear any stale IRQ reports */ | ||
665 | saa_writel(SAA7134_IRQ_REPORT, saa_readl(SAA7134_IRQ_REPORT)); | ||
666 | |||
663 | mutex_init(&dev->lock); | 667 | mutex_init(&dev->lock); |
664 | spin_lock_init(&dev->slock); | 668 | spin_lock_init(&dev->slock); |
665 | 669 | ||
diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c index 454ad1dd7507..88c5e942f751 100644 --- a/drivers/media/video/saa717x.c +++ b/drivers/media/video/saa717x.c | |||
@@ -30,7 +30,6 @@ | |||
30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 30 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/version.h> | ||
34 | #include <linux/module.h> | 33 | #include <linux/module.h> |
35 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
36 | #include <linux/sched.h> | 35 | #include <linux/sched.h> |
diff --git a/drivers/media/video/tda9875.c b/drivers/media/video/tda9875.c index 56f0c0eb500f..00c6cbe06ab0 100644 --- a/drivers/media/video/tda9875.c +++ b/drivers/media/video/tda9875.c | |||
@@ -242,7 +242,7 @@ static int tda9875_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | |||
242 | static int tda9875_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) | 242 | static int tda9875_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) |
243 | { | 243 | { |
244 | struct tda9875 *t = to_state(sd); | 244 | struct tda9875 *t = to_state(sd); |
245 | int chvol=0, volume, balance, left, right; | 245 | int chvol = 0, volume = 0, balance = 0, left, right; |
246 | 246 | ||
247 | switch (ctrl->id) { | 247 | switch (ctrl->id) { |
248 | case V4L2_CID_AUDIO_VOLUME: | 248 | case V4L2_CID_AUDIO_VOLUME: |
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index 3b0b84c2e451..78277abb733b 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c | |||
@@ -427,6 +427,9 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee, | |||
427 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; | 427 | const char *t_fmt_name2[8] = { " none", "", "", "", "", "", "", "" }; |
428 | 428 | ||
429 | memset(tvee, 0, sizeof(*tvee)); | 429 | memset(tvee, 0, sizeof(*tvee)); |
430 | tvee->tuner_type = TUNER_ABSENT; | ||
431 | tvee->tuner2_type = TUNER_ABSENT; | ||
432 | |||
430 | done = len = beenhere = 0; | 433 | done = len = beenhere = 0; |
431 | 434 | ||
432 | /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */ | 435 | /* Different eeprom start offsets for em28xx, cx2388x and cx23418 */ |
diff --git a/drivers/media/video/tvp514x.c b/drivers/media/video/tvp514x.c index ac9aa40d09f6..8e23aa53c29a 100644 --- a/drivers/media/video/tvp514x.c +++ b/drivers/media/video/tvp514x.c | |||
@@ -1401,7 +1401,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id) | |||
1401 | 1401 | ||
1402 | decoder->pdata = client->dev.platform_data; | 1402 | decoder->pdata = client->dev.platform_data; |
1403 | if (!decoder->pdata) { | 1403 | if (!decoder->pdata) { |
1404 | v4l_err(client, "No platform data\n!!"); | 1404 | v4l_err(client, "No platform data!!\n"); |
1405 | return -ENODEV; | 1405 | return -ENODEV; |
1406 | } | 1406 | } |
1407 | /* | 1407 | /* |
diff --git a/drivers/media/video/upd64031a.c b/drivers/media/video/upd64031a.c index 4f16effb530f..f4522bb08916 100644 --- a/drivers/media/video/upd64031a.c +++ b/drivers/media/video/upd64031a.c | |||
@@ -21,7 +21,6 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | 23 | ||
24 | #include <linux/version.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/upd64083.c b/drivers/media/video/upd64083.c index 4b712f69d1b7..a5fb74bf2407 100644 --- a/drivers/media/video/upd64083.c +++ b/drivers/media/video/upd64083.c | |||
@@ -21,7 +21,6 @@ | |||
21 | * 02110-1301, USA. | 21 | * 02110-1301, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/version.h> | ||
25 | #include <linux/module.h> | 24 | #include <linux/module.h> |
26 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
27 | #include <linux/i2c.h> | 26 | #include <linux/i2c.h> |
diff --git a/drivers/media/video/usbvision/usbvision-i2c.c b/drivers/media/video/usbvision/usbvision-i2c.c index 9907b9aff2b9..6b66ae4f430f 100644 --- a/drivers/media/video/usbvision/usbvision-i2c.c +++ b/drivers/media/video/usbvision/usbvision-i2c.c | |||
@@ -157,7 +157,7 @@ usbvision_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg msgs[], int num) | |||
157 | struct i2c_msg *pmsg; | 157 | struct i2c_msg *pmsg; |
158 | struct usb_usbvision *usbvision; | 158 | struct usb_usbvision *usbvision; |
159 | int i, ret; | 159 | int i, ret; |
160 | unsigned char addr; | 160 | unsigned char addr = 0; |
161 | 161 | ||
162 | usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); | 162 | usbvision = (struct usb_usbvision *)i2c_get_adapdata(i2c_adap); |
163 | 163 | ||
diff --git a/drivers/media/video/uvc/uvc_ctrl.c b/drivers/media/video/uvc/uvc_ctrl.c index 2208165aa6f0..d2576f6391c0 100644 --- a/drivers/media/video/uvc/uvc_ctrl.c +++ b/drivers/media/video/uvc/uvc_ctrl.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_ctrl.c -- USB Video Class driver - Controls | 2 | * uvc_ctrl.c -- USB Video Class driver - Controls |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 | 4 | * Copyright (C) 2005-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/uaccess.h> | 17 | #include <linux/uaccess.h> |
@@ -29,7 +28,7 @@ | |||
29 | #define UVC_CTRL_DATA_BACKUP 1 | 28 | #define UVC_CTRL_DATA_BACKUP 1 |
30 | 29 | ||
31 | /* ------------------------------------------------------------------------ | 30 | /* ------------------------------------------------------------------------ |
32 | * Control, formats, ... | 31 | * Controls |
33 | */ | 32 | */ |
34 | 33 | ||
35 | static struct uvc_control_info uvc_ctrls[] = { | 34 | static struct uvc_control_info uvc_ctrls[] = { |
@@ -635,7 +634,7 @@ static __s32 uvc_get_le_value(struct uvc_control_mapping *mapping, | |||
635 | mask = (1 << bits) - 1; | 634 | mask = (1 << bits) - 1; |
636 | } | 635 | } |
637 | 636 | ||
638 | /* Sign-extend the value if needed */ | 637 | /* Sign-extend the value if needed. */ |
639 | if (mapping->data_type == UVC_CTRL_DATA_TYPE_SIGNED) | 638 | if (mapping->data_type == UVC_CTRL_DATA_TYPE_SIGNED) |
640 | value |= -(value & (1 << (mapping->size - 1))); | 639 | value |= -(value & (1 << (mapping->size - 1))); |
641 | 640 | ||
diff --git a/drivers/media/video/uvc/uvc_driver.c b/drivers/media/video/uvc/uvc_driver.c index 89d8bd10a852..b12873265cc5 100644 --- a/drivers/media/video/uvc/uvc_driver.c +++ b/drivers/media/video/uvc/uvc_driver.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_driver.c -- USB Video Class driver | 2 | * uvc_driver.c -- USB Video Class driver |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 | 4 | * Copyright (C) 2005-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -24,7 +24,6 @@ | |||
24 | */ | 24 | */ |
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/version.h> | ||
28 | #include <linux/list.h> | 27 | #include <linux/list.h> |
29 | #include <linux/module.h> | 28 | #include <linux/module.h> |
30 | #include <linux/usb.h> | 29 | #include <linux/usb.h> |
@@ -49,7 +48,7 @@ static unsigned int uvc_quirks_param; | |||
49 | unsigned int uvc_trace_param; | 48 | unsigned int uvc_trace_param; |
50 | 49 | ||
51 | /* ------------------------------------------------------------------------ | 50 | /* ------------------------------------------------------------------------ |
52 | * Control, formats, ... | 51 | * Video formats |
53 | */ | 52 | */ |
54 | 53 | ||
55 | static struct uvc_format_desc uvc_fmts[] = { | 54 | static struct uvc_format_desc uvc_fmts[] = { |
@@ -474,7 +473,7 @@ static int uvc_parse_format(struct uvc_device *dev, | |||
474 | 473 | ||
475 | /* Several UVC chipsets screw up dwMaxVideoFrameBufferSize | 474 | /* Several UVC chipsets screw up dwMaxVideoFrameBufferSize |
476 | * completely. Observed behaviours range from setting the | 475 | * completely. Observed behaviours range from setting the |
477 | * value to 1.1x the actual frame size of hardwiring the | 476 | * value to 1.1x the actual frame size to hardwiring the |
478 | * 16 low bits to 0. This results in a higher than necessary | 477 | * 16 low bits to 0. This results in a higher than necessary |
479 | * memory usage as well as a wrong image size information. For | 478 | * memory usage as well as a wrong image size information. For |
480 | * uncompressed formats this can be fixed by computing the | 479 | * uncompressed formats this can be fixed by computing the |
@@ -487,7 +486,7 @@ static int uvc_parse_format(struct uvc_device *dev, | |||
487 | /* Some bogus devices report dwMinFrameInterval equal to | 486 | /* Some bogus devices report dwMinFrameInterval equal to |
488 | * dwMaxFrameInterval and have dwFrameIntervalStep set to | 487 | * dwMaxFrameInterval and have dwFrameIntervalStep set to |
489 | * zero. Setting all null intervals to 1 fixes the problem and | 488 | * zero. Setting all null intervals to 1 fixes the problem and |
490 | * some other divisions by zero which could happen. | 489 | * some other divisions by zero that could happen. |
491 | */ | 490 | */ |
492 | for (i = 0; i < n; ++i) { | 491 | for (i = 0; i < n; ++i) { |
493 | interval = get_unaligned_le32(&buffer[26+4*i]); | 492 | interval = get_unaligned_le32(&buffer[26+4*i]); |
@@ -1200,13 +1199,13 @@ static void uvc_unregister_video(struct uvc_device *dev) | |||
1200 | * Scan the UVC descriptors to locate a chain starting at an Output Terminal | 1199 | * Scan the UVC descriptors to locate a chain starting at an Output Terminal |
1201 | * and containing the following units: | 1200 | * and containing the following units: |
1202 | * | 1201 | * |
1203 | * - a USB Streaming Output Terminal | 1202 | * - one Output Terminal (USB Streaming or Display) |
1204 | * - zero or one Processing Unit | 1203 | * - zero or one Processing Unit |
1205 | * - zero, one or mode single-input Selector Units | 1204 | * - zero, one or mode single-input Selector Units |
1206 | * - zero or one multiple-input Selector Units, provided all inputs are | 1205 | * - zero or one multiple-input Selector Units, provided all inputs are |
1207 | * connected to input terminals | 1206 | * connected to input terminals |
1208 | * - zero, one or mode single-input Extension Units | 1207 | * - zero, one or mode single-input Extension Units |
1209 | * - one Camera Input Terminal, or one or more External terminals. | 1208 | * - one or more Input Terminals (Camera, External or USB Streaming) |
1210 | * | 1209 | * |
1211 | * A side forward scan is made on each detected entity to check for additional | 1210 | * A side forward scan is made on each detected entity to check for additional |
1212 | * extension units. | 1211 | * extension units. |
@@ -1531,10 +1530,6 @@ static int uvc_register_video(struct uvc_device *dev) | |||
1531 | 1530 | ||
1532 | /* Set the driver data before calling video_register_device, otherwise | 1531 | /* Set the driver data before calling video_register_device, otherwise |
1533 | * uvc_v4l2_open might race us. | 1532 | * uvc_v4l2_open might race us. |
1534 | * | ||
1535 | * FIXME: usb_set_intfdata hasn't been called so far. Is that a | ||
1536 | * problem ? Does any function which could be called here get | ||
1537 | * a pointer to the usb_interface ? | ||
1538 | */ | 1533 | */ |
1539 | dev->video.vdev = vdev; | 1534 | dev->video.vdev = vdev; |
1540 | video_set_drvdata(vdev, &dev->video); | 1535 | video_set_drvdata(vdev, &dev->video); |
@@ -1569,7 +1564,7 @@ void uvc_delete(struct kref *kref) | |||
1569 | struct uvc_device *dev = container_of(kref, struct uvc_device, kref); | 1564 | struct uvc_device *dev = container_of(kref, struct uvc_device, kref); |
1570 | struct list_head *p, *n; | 1565 | struct list_head *p, *n; |
1571 | 1566 | ||
1572 | /* Unregister the video device */ | 1567 | /* Unregister the video device. */ |
1573 | uvc_unregister_video(dev); | 1568 | uvc_unregister_video(dev); |
1574 | usb_put_intf(dev->intf); | 1569 | usb_put_intf(dev->intf); |
1575 | usb_put_dev(dev->udev); | 1570 | usb_put_dev(dev->udev); |
@@ -1612,7 +1607,7 @@ static int uvc_probe(struct usb_interface *intf, | |||
1612 | uvc_trace(UVC_TRACE_PROBE, "Probing generic UVC device %s\n", | 1607 | uvc_trace(UVC_TRACE_PROBE, "Probing generic UVC device %s\n", |
1613 | udev->devpath); | 1608 | udev->devpath); |
1614 | 1609 | ||
1615 | /* Allocate memory for the device and initialize it */ | 1610 | /* Allocate memory for the device and initialize it. */ |
1616 | if ((dev = kzalloc(sizeof *dev, GFP_KERNEL)) == NULL) | 1611 | if ((dev = kzalloc(sizeof *dev, GFP_KERNEL)) == NULL) |
1617 | return -ENOMEM; | 1612 | return -ENOMEM; |
1618 | 1613 | ||
@@ -1633,14 +1628,14 @@ static int uvc_probe(struct usb_interface *intf, | |||
1633 | le16_to_cpu(udev->descriptor.idVendor), | 1628 | le16_to_cpu(udev->descriptor.idVendor), |
1634 | le16_to_cpu(udev->descriptor.idProduct)); | 1629 | le16_to_cpu(udev->descriptor.idProduct)); |
1635 | 1630 | ||
1636 | /* Parse the Video Class control descriptor */ | 1631 | /* Parse the Video Class control descriptor. */ |
1637 | if (uvc_parse_control(dev) < 0) { | 1632 | if (uvc_parse_control(dev) < 0) { |
1638 | uvc_trace(UVC_TRACE_PROBE, "Unable to parse UVC " | 1633 | uvc_trace(UVC_TRACE_PROBE, "Unable to parse UVC " |
1639 | "descriptors.\n"); | 1634 | "descriptors.\n"); |
1640 | goto error; | 1635 | goto error; |
1641 | } | 1636 | } |
1642 | 1637 | ||
1643 | uvc_printk(KERN_INFO, "Found UVC %u.%02u device %s (%04x:%04x)\n", | 1638 | uvc_printk(KERN_INFO, "Found UVC %u.%02x device %s (%04x:%04x)\n", |
1644 | dev->uvc_version >> 8, dev->uvc_version & 0xff, | 1639 | dev->uvc_version >> 8, dev->uvc_version & 0xff, |
1645 | udev->product ? udev->product : "<unnamed>", | 1640 | udev->product ? udev->product : "<unnamed>", |
1646 | le16_to_cpu(udev->descriptor.idVendor), | 1641 | le16_to_cpu(udev->descriptor.idVendor), |
@@ -1653,18 +1648,18 @@ static int uvc_probe(struct usb_interface *intf, | |||
1653 | "linux-uvc-devel mailing list.\n"); | 1648 | "linux-uvc-devel mailing list.\n"); |
1654 | } | 1649 | } |
1655 | 1650 | ||
1656 | /* Initialize controls */ | 1651 | /* Initialize controls. */ |
1657 | if (uvc_ctrl_init_device(dev) < 0) | 1652 | if (uvc_ctrl_init_device(dev) < 0) |
1658 | goto error; | 1653 | goto error; |
1659 | 1654 | ||
1660 | /* Register the video devices */ | 1655 | /* Register the video devices. */ |
1661 | if (uvc_register_video(dev) < 0) | 1656 | if (uvc_register_video(dev) < 0) |
1662 | goto error; | 1657 | goto error; |
1663 | 1658 | ||
1664 | /* Save our data pointer in the interface data */ | 1659 | /* Save our data pointer in the interface data. */ |
1665 | usb_set_intfdata(intf, dev); | 1660 | usb_set_intfdata(intf, dev); |
1666 | 1661 | ||
1667 | /* Initialize the interrupt URB */ | 1662 | /* Initialize the interrupt URB. */ |
1668 | if ((ret = uvc_status_init(dev)) < 0) { | 1663 | if ((ret = uvc_status_init(dev)) < 0) { |
1669 | uvc_printk(KERN_INFO, "Unable to initialize the status " | 1664 | uvc_printk(KERN_INFO, "Unable to initialize the status " |
1670 | "endpoint (%d), status interrupt will not be " | 1665 | "endpoint (%d), status interrupt will not be " |
@@ -1839,24 +1834,24 @@ static struct usb_device_id uvc_ids[] = { | |||
1839 | .bInterfaceSubClass = 1, | 1834 | .bInterfaceSubClass = 1, |
1840 | .bInterfaceProtocol = 0 }, | 1835 | .bInterfaceProtocol = 0 }, |
1841 | /* Apple Built-In iSight */ | 1836 | /* Apple Built-In iSight */ |
1842 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 1837 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
1843 | | USB_DEVICE_ID_MATCH_INT_INFO, | 1838 | | USB_DEVICE_ID_MATCH_INT_INFO, |
1844 | .idVendor = 0x05ac, | 1839 | .idVendor = 0x05ac, |
1845 | .idProduct = 0x8501, | 1840 | .idProduct = 0x8501, |
1846 | .bInterfaceClass = USB_CLASS_VIDEO, | 1841 | .bInterfaceClass = USB_CLASS_VIDEO, |
1847 | .bInterfaceSubClass = 1, | 1842 | .bInterfaceSubClass = 1, |
1848 | .bInterfaceProtocol = 0, | 1843 | .bInterfaceProtocol = 0, |
1849 | .driver_info = UVC_QUIRK_PROBE_MINMAX | 1844 | .driver_info = UVC_QUIRK_PROBE_MINMAX |
1850 | | UVC_QUIRK_BUILTIN_ISIGHT }, | 1845 | | UVC_QUIRK_BUILTIN_ISIGHT }, |
1851 | /* Genesys Logic USB 2.0 PC Camera */ | 1846 | /* Genesys Logic USB 2.0 PC Camera */ |
1852 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 1847 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
1853 | | USB_DEVICE_ID_MATCH_INT_INFO, | 1848 | | USB_DEVICE_ID_MATCH_INT_INFO, |
1854 | .idVendor = 0x05e3, | 1849 | .idVendor = 0x05e3, |
1855 | .idProduct = 0x0505, | 1850 | .idProduct = 0x0505, |
1856 | .bInterfaceClass = USB_CLASS_VIDEO, | 1851 | .bInterfaceClass = USB_CLASS_VIDEO, |
1857 | .bInterfaceSubClass = 1, | 1852 | .bInterfaceSubClass = 1, |
1858 | .bInterfaceProtocol = 0, | 1853 | .bInterfaceProtocol = 0, |
1859 | .driver_info = UVC_QUIRK_STREAM_NO_FID }, | 1854 | .driver_info = UVC_QUIRK_STREAM_NO_FID }, |
1860 | /* MT6227 */ | 1855 | /* MT6227 */ |
1861 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE | 1856 | { .match_flags = USB_DEVICE_ID_MATCH_DEVICE |
1862 | | USB_DEVICE_ID_MATCH_INT_INFO, | 1857 | | USB_DEVICE_ID_MATCH_INT_INFO, |
diff --git a/drivers/media/video/uvc/uvc_isight.c b/drivers/media/video/uvc/uvc_isight.c index 37bdefdbead5..436f462685a0 100644 --- a/drivers/media/video/uvc/uvc_isight.c +++ b/drivers/media/video/uvc/uvc_isight.c | |||
@@ -3,6 +3,8 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2006-2007 | 4 | * Copyright (C) 2006-2007 |
5 | * Ivan N. Zlatev <contact@i-nz.net> | 5 | * Ivan N. Zlatev <contact@i-nz.net> |
6 | * Copyright (C) 2008-2009 | ||
7 | * Laurent Pinchart <laurent.pinchart@skynet.be> | ||
6 | * | 8 | * |
7 | * This program is free software; you can redistribute it and/or modify | 9 | * This program is free software; you can redistribute it and/or modify |
8 | * it under the terms of the GNU General Public License as published by | 10 | * it under the terms of the GNU General Public License as published by |
diff --git a/drivers/media/video/uvc/uvc_queue.c b/drivers/media/video/uvc/uvc_queue.c index 42546342e97d..0155752e4a5a 100644 --- a/drivers/media/video/uvc/uvc_queue.c +++ b/drivers/media/video/uvc/uvc_queue.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_queue.c -- USB Video Class driver - Buffers management | 2 | * uvc_queue.c -- USB Video Class driver - Buffers management |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 | 4 | * Copyright (C) 2005-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
17 | #include <linux/list.h> | 16 | #include <linux/list.h> |
18 | #include <linux/module.h> | 17 | #include <linux/module.h> |
@@ -37,22 +36,22 @@ | |||
37 | * to user space will return -EBUSY. | 36 | * to user space will return -EBUSY. |
38 | * | 37 | * |
39 | * Video buffers are managed using two queues. However, unlike most USB video | 38 | * Video buffers are managed using two queues. However, unlike most USB video |
40 | * drivers which use an in queue and an out queue, we use a main queue which | 39 | * drivers that use an in queue and an out queue, we use a main queue to hold |
41 | * holds all queued buffers (both 'empty' and 'done' buffers), and an irq | 40 | * all queued buffers (both 'empty' and 'done' buffers), and an irq queue to |
42 | * queue which holds empty buffers. This design (copied from video-buf) | 41 | * hold empty buffers. This design (copied from video-buf) minimizes locking |
43 | * minimizes locking in interrupt, as only one queue is shared between | 42 | * in interrupt, as only one queue is shared between interrupt and user |
44 | * interrupt and user contexts. | 43 | * contexts. |
45 | * | 44 | * |
46 | * Use cases | 45 | * Use cases |
47 | * --------- | 46 | * --------- |
48 | * | 47 | * |
49 | * Unless stated otherwise, all operations which modify the irq buffers queue | 48 | * Unless stated otherwise, all operations that modify the irq buffers queue |
50 | * are protected by the irq spinlock. | 49 | * are protected by the irq spinlock. |
51 | * | 50 | * |
52 | * 1. The user queues the buffers, starts streaming and dequeues a buffer. | 51 | * 1. The user queues the buffers, starts streaming and dequeues a buffer. |
53 | * | 52 | * |
54 | * The buffers are added to the main and irq queues. Both operations are | 53 | * The buffers are added to the main and irq queues. Both operations are |
55 | * protected by the queue lock, and the latert is protected by the irq | 54 | * protected by the queue lock, and the later is protected by the irq |
56 | * spinlock as well. | 55 | * spinlock as well. |
57 | * | 56 | * |
58 | * The completion handler fetches a buffer from the irq queue and fills it | 57 | * The completion handler fetches a buffer from the irq queue and fills it |
@@ -60,7 +59,7 @@ | |||
60 | * returns immediately. | 59 | * returns immediately. |
61 | * | 60 | * |
62 | * When the buffer is full, the completion handler removes it from the irq | 61 | * When the buffer is full, the completion handler removes it from the irq |
63 | * queue, marks it as ready (UVC_BUF_STATE_DONE) and wake its wait queue. | 62 | * queue, marks it as ready (UVC_BUF_STATE_DONE) and wakes its wait queue. |
64 | * At that point, any process waiting on the buffer will be woken up. If a | 63 | * At that point, any process waiting on the buffer will be woken up. If a |
65 | * process tries to dequeue a buffer after it has been marked ready, the | 64 | * process tries to dequeue a buffer after it has been marked ready, the |
66 | * dequeing will succeed immediately. | 65 | * dequeing will succeed immediately. |
@@ -91,8 +90,8 @@ void uvc_queue_init(struct uvc_video_queue *queue, enum v4l2_buf_type type) | |||
91 | /* | 90 | /* |
92 | * Allocate the video buffers. | 91 | * Allocate the video buffers. |
93 | * | 92 | * |
94 | * Pages are reserved to make sure they will not be swaped, as they will be | 93 | * Pages are reserved to make sure they will not be swapped, as they will be |
95 | * filled in URB completion handler. | 94 | * filled in the URB completion handler. |
96 | * | 95 | * |
97 | * Buffers will be individually mapped, so they must all be page aligned. | 96 | * Buffers will be individually mapped, so they must all be page aligned. |
98 | */ | 97 | */ |
@@ -210,8 +209,8 @@ int uvc_query_buffer(struct uvc_video_queue *queue, | |||
210 | __uvc_query_buffer(&queue->buffer[v4l2_buf->index], v4l2_buf); | 209 | __uvc_query_buffer(&queue->buffer[v4l2_buf->index], v4l2_buf); |
211 | 210 | ||
212 | done: | 211 | done: |
213 | mutex_unlock(&queue->mutex); | 212 | mutex_unlock(&queue->mutex); |
214 | return ret; | 213 | return ret; |
215 | } | 214 | } |
216 | 215 | ||
217 | /* | 216 | /* |
@@ -236,7 +235,7 @@ int uvc_queue_buffer(struct uvc_video_queue *queue, | |||
236 | } | 235 | } |
237 | 236 | ||
238 | mutex_lock(&queue->mutex); | 237 | mutex_lock(&queue->mutex); |
239 | if (v4l2_buf->index >= queue->count) { | 238 | if (v4l2_buf->index >= queue->count) { |
240 | uvc_trace(UVC_TRACE_CAPTURE, "[E] Out of range index.\n"); | 239 | uvc_trace(UVC_TRACE_CAPTURE, "[E] Out of range index.\n"); |
241 | ret = -EINVAL; | 240 | ret = -EINVAL; |
242 | goto done; | 241 | goto done; |
@@ -429,7 +428,7 @@ done: | |||
429 | * Cancel the video buffers queue. | 428 | * Cancel the video buffers queue. |
430 | * | 429 | * |
431 | * Cancelling the queue marks all buffers on the irq queue as erroneous, | 430 | * Cancelling the queue marks all buffers on the irq queue as erroneous, |
432 | * wakes them up and remove them from the queue. | 431 | * wakes them up and removes them from the queue. |
433 | * | 432 | * |
434 | * If the disconnect parameter is set, further calls to uvc_queue_buffer will | 433 | * If the disconnect parameter is set, further calls to uvc_queue_buffer will |
435 | * fail with -ENODEV. | 434 | * fail with -ENODEV. |
diff --git a/drivers/media/video/uvc/uvc_status.c b/drivers/media/video/uvc/uvc_status.c index 5d60b264d59a..c1e4ae27c613 100644 --- a/drivers/media/video/uvc/uvc_status.c +++ b/drivers/media/video/uvc/uvc_status.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_status.c -- USB Video Class driver - Status endpoint | 2 | * uvc_status.c -- USB Video Class driver - Status endpoint |
3 | * | 3 | * |
4 | * Copyright (C) 2007-2008 | 4 | * Copyright (C) 2007-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/input.h> | 15 | #include <linux/input.h> |
17 | #include <linux/usb.h> | 16 | #include <linux/usb.h> |
18 | #include <linux/usb/input.h> | 17 | #include <linux/usb/input.h> |
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index fa150fff2c10..d681519d0c8a 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_v4l2.c -- USB Video Class driver - V4L2 API | 2 | * uvc_v4l2.c -- USB Video Class driver - V4L2 API |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 | 4 | * Copyright (C) 2005-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -37,7 +37,7 @@ | |||
37 | * must be grouped (for instance the Red Balance, Blue Balance and Do White | 37 | * must be grouped (for instance the Red Balance, Blue Balance and Do White |
38 | * Balance V4L2 controls use the White Balance Component UVC control) or | 38 | * Balance V4L2 controls use the White Balance Component UVC control) or |
39 | * otherwise translated. The approach we take here is to use a translation | 39 | * otherwise translated. The approach we take here is to use a translation |
40 | * table for the controls which can be mapped directly, and handle the others | 40 | * table for the controls that can be mapped directly, and handle the others |
41 | * manually. | 41 | * manually. |
42 | */ | 42 | */ |
43 | static int uvc_v4l2_query_menu(struct uvc_video_device *video, | 43 | static int uvc_v4l2_query_menu(struct uvc_video_device *video, |
@@ -189,7 +189,7 @@ static int uvc_v4l2_try_format(struct uvc_video_device *video, | |||
189 | probe->dwMaxVideoFrameSize = | 189 | probe->dwMaxVideoFrameSize = |
190 | video->streaming->ctrl.dwMaxVideoFrameSize; | 190 | video->streaming->ctrl.dwMaxVideoFrameSize; |
191 | 191 | ||
192 | /* Probe the device */ | 192 | /* Probe the device. */ |
193 | if ((ret = uvc_probe_video(video, probe)) < 0) | 193 | if ((ret = uvc_probe_video(video, probe)) < 0) |
194 | goto done; | 194 | goto done; |
195 | 195 | ||
@@ -354,11 +354,11 @@ static int uvc_v4l2_set_streamparm(struct uvc_video_device *video, | |||
354 | * | 354 | * |
355 | * Each open instance of a UVC device can either be in a privileged or | 355 | * Each open instance of a UVC device can either be in a privileged or |
356 | * unprivileged state. Only a single instance can be in a privileged state at | 356 | * unprivileged state. Only a single instance can be in a privileged state at |
357 | * a given time. Trying to perform an operation which requires privileges will | 357 | * a given time. Trying to perform an operation that requires privileges will |
358 | * automatically acquire the required privileges if possible, or return -EBUSY | 358 | * automatically acquire the required privileges if possible, or return -EBUSY |
359 | * otherwise. Privileges are dismissed when closing the instance. | 359 | * otherwise. Privileges are dismissed when closing the instance. |
360 | * | 360 | * |
361 | * Operations which require privileges are: | 361 | * Operations that require privileges are: |
362 | * | 362 | * |
363 | * - VIDIOC_S_INPUT | 363 | * - VIDIOC_S_INPUT |
364 | * - VIDIOC_S_PARM | 364 | * - VIDIOC_S_PARM |
diff --git a/drivers/media/video/uvc/uvc_video.c b/drivers/media/video/uvc/uvc_video.c index e7c31995527f..9bc4705be78d 100644 --- a/drivers/media/video/uvc/uvc_video.c +++ b/drivers/media/video/uvc/uvc_video.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * uvc_video.c -- USB Video Class driver - Video handling | 2 | * uvc_video.c -- USB Video Class driver - Video handling |
3 | * | 3 | * |
4 | * Copyright (C) 2005-2008 | 4 | * Copyright (C) 2005-2009 |
5 | * Laurent Pinchart (laurent.pinchart@skynet.be) | 5 | * Laurent Pinchart (laurent.pinchart@skynet.be) |
6 | * | 6 | * |
7 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
@@ -12,7 +12,6 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/version.h> | ||
16 | #include <linux/list.h> | 15 | #include <linux/list.h> |
17 | #include <linux/module.h> | 16 | #include <linux/module.h> |
18 | #include <linux/usb.h> | 17 | #include <linux/usb.h> |
@@ -115,7 +114,7 @@ static int uvc_get_video_ctrl(struct uvc_video_device *video, | |||
115 | ctrl->wCompQuality = le16_to_cpup((__le16 *)data); | 114 | ctrl->wCompQuality = le16_to_cpup((__le16 *)data); |
116 | ret = 0; | 115 | ret = 0; |
117 | goto out; | 116 | goto out; |
118 | } else if (query == GET_DEF && probe == 1) { | 117 | } else if (query == GET_DEF && probe == 1 && ret != size) { |
119 | /* Many cameras don't support the GET_DEF request on their | 118 | /* Many cameras don't support the GET_DEF request on their |
120 | * video probe control. Warn once and return, the caller will | 119 | * video probe control. Warn once and return, the caller will |
121 | * fall back to GET_CUR. | 120 | * fall back to GET_CUR. |
@@ -160,7 +159,7 @@ static int uvc_get_video_ctrl(struct uvc_video_device *video, | |||
160 | } | 159 | } |
161 | 160 | ||
162 | /* Some broken devices return a null or wrong dwMaxVideoFrameSize. | 161 | /* Some broken devices return a null or wrong dwMaxVideoFrameSize. |
163 | * Try to get the value from the format and frame descriptor. | 162 | * Try to get the value from the format and frame descriptors. |
164 | */ | 163 | */ |
165 | uvc_fixup_buffer_size(video, ctrl); | 164 | uvc_fixup_buffer_size(video, ctrl); |
166 | ret = 0; | 165 | ret = 0; |
@@ -191,9 +190,6 @@ static int uvc_set_video_ctrl(struct uvc_video_device *video, | |||
191 | *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality); | 190 | *(__le16 *)&data[12] = cpu_to_le16(ctrl->wCompQuality); |
192 | *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize); | 191 | *(__le16 *)&data[14] = cpu_to_le16(ctrl->wCompWindowSize); |
193 | *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay); | 192 | *(__le16 *)&data[16] = cpu_to_le16(ctrl->wDelay); |
194 | /* Note: Some of the fields below are not required for IN devices (see | ||
195 | * UVC spec, 4.3.1.1), but we still copy them in case support for OUT | ||
196 | * devices is added in the future. */ | ||
197 | put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]); | 193 | put_unaligned_le32(ctrl->dwMaxVideoFrameSize, &data[18]); |
198 | put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]); | 194 | put_unaligned_le32(ctrl->dwMaxPayloadTransferSize, &data[22]); |
199 | 195 | ||
@@ -400,7 +396,7 @@ static int uvc_video_decode_start(struct uvc_video_device *video, | |||
400 | * | 396 | * |
401 | * Empty buffers (bytesused == 0) don't trigger end of frame detection | 397 | * Empty buffers (bytesused == 0) don't trigger end of frame detection |
402 | * as it doesn't make sense to return an empty buffer. This also | 398 | * as it doesn't make sense to return an empty buffer. This also |
403 | * avoids detecting and of frame conditions at FID toggling if the | 399 | * avoids detecting end of frame conditions at FID toggling if the |
404 | * previous payload had the EOF bit set. | 400 | * previous payload had the EOF bit set. |
405 | */ | 401 | */ |
406 | if (fid != video->last_fid && buf->buf.bytesused != 0) { | 402 | if (fid != video->last_fid && buf->buf.bytesused != 0) { |
@@ -453,6 +449,17 @@ static void uvc_video_decode_end(struct uvc_video_device *video, | |||
453 | } | 449 | } |
454 | } | 450 | } |
455 | 451 | ||
452 | /* Video payload encoding is handled by uvc_video_encode_header() and | ||
453 | * uvc_video_encode_data(). Only bulk transfers are currently supported. | ||
454 | * | ||
455 | * uvc_video_encode_header is called at the start of a payload. It adds header | ||
456 | * data to the transfer buffer and returns the header size. As the only known | ||
457 | * UVC output device transfers a whole frame in a single payload, the EOF bit | ||
458 | * is always set in the header. | ||
459 | * | ||
460 | * uvc_video_encode_data is called for every URB and copies the data from the | ||
461 | * video buffer to the transfer buffer. | ||
462 | */ | ||
456 | static int uvc_video_encode_header(struct uvc_video_device *video, | 463 | static int uvc_video_encode_header(struct uvc_video_device *video, |
457 | struct uvc_buffer *buf, __u8 *data, int len) | 464 | struct uvc_buffer *buf, __u8 *data, int len) |
458 | { | 465 | { |
@@ -953,7 +960,7 @@ int uvc_video_suspend(struct uvc_video_device *video) | |||
953 | } | 960 | } |
954 | 961 | ||
955 | /* | 962 | /* |
956 | * Reconfigure the video interface and restart streaming if it was enable | 963 | * Reconfigure the video interface and restart streaming if it was enabled |
957 | * before suspend. | 964 | * before suspend. |
958 | * | 965 | * |
959 | * If an error occurs, disable the video queue. This will wake all pending | 966 | * If an error occurs, disable the video queue. This will wake all pending |
@@ -985,8 +992,8 @@ int uvc_video_resume(struct uvc_video_device *video) | |||
985 | */ | 992 | */ |
986 | 993 | ||
987 | /* | 994 | /* |
988 | * Initialize the UVC video device by retrieving the default format and | 995 | * Initialize the UVC video device by switching to alternate setting 0 and |
989 | * committing it. | 996 | * retrieve the default format. |
990 | * | 997 | * |
991 | * Some cameras (namely the Fuji Finepix) set the format and frame | 998 | * Some cameras (namely the Fuji Finepix) set the format and frame |
992 | * indexes to zero. The UVC standard doesn't clearly make this a spec | 999 | * indexes to zero. The UVC standard doesn't clearly make this a spec |
@@ -1014,7 +1021,7 @@ int uvc_video_init(struct uvc_video_device *video) | |||
1014 | */ | 1021 | */ |
1015 | usb_set_interface(video->dev->udev, video->streaming->intfnum, 0); | 1022 | usb_set_interface(video->dev->udev, video->streaming->intfnum, 0); |
1016 | 1023 | ||
1017 | /* Some webcams don't suport GET_DEF request on the probe control. We | 1024 | /* Some webcams don't suport GET_DEF requests on the probe control. We |
1018 | * fall back to GET_CUR if GET_DEF fails. | 1025 | * fall back to GET_CUR if GET_DEF fails. |
1019 | */ | 1026 | */ |
1020 | if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 && | 1027 | if ((ret = uvc_get_video_ctrl(video, probe, 1, GET_DEF)) < 0 && |
diff --git a/drivers/media/video/uvc/uvcvideo.h b/drivers/media/video/uvc/uvcvideo.h index bcf4361dc1bc..027947ea9b6e 100644 --- a/drivers/media/video/uvc/uvcvideo.h +++ b/drivers/media/video/uvc/uvcvideo.h | |||
@@ -72,149 +72,149 @@ struct uvc_xu_control { | |||
72 | * UVC constants | 72 | * UVC constants |
73 | */ | 73 | */ |
74 | 74 | ||
75 | #define SC_UNDEFINED 0x00 | 75 | #define SC_UNDEFINED 0x00 |
76 | #define SC_VIDEOCONTROL 0x01 | 76 | #define SC_VIDEOCONTROL 0x01 |
77 | #define SC_VIDEOSTREAMING 0x02 | 77 | #define SC_VIDEOSTREAMING 0x02 |
78 | #define SC_VIDEO_INTERFACE_COLLECTION 0x03 | 78 | #define SC_VIDEO_INTERFACE_COLLECTION 0x03 |
79 | 79 | ||
80 | #define PC_PROTOCOL_UNDEFINED 0x00 | 80 | #define PC_PROTOCOL_UNDEFINED 0x00 |
81 | 81 | ||
82 | #define CS_UNDEFINED 0x20 | 82 | #define CS_UNDEFINED 0x20 |
83 | #define CS_DEVICE 0x21 | 83 | #define CS_DEVICE 0x21 |
84 | #define CS_CONFIGURATION 0x22 | 84 | #define CS_CONFIGURATION 0x22 |
85 | #define CS_STRING 0x23 | 85 | #define CS_STRING 0x23 |
86 | #define CS_INTERFACE 0x24 | 86 | #define CS_INTERFACE 0x24 |
87 | #define CS_ENDPOINT 0x25 | 87 | #define CS_ENDPOINT 0x25 |
88 | 88 | ||
89 | /* VideoControl class specific interface descriptor */ | 89 | /* VideoControl class specific interface descriptor */ |
90 | #define VC_DESCRIPTOR_UNDEFINED 0x00 | 90 | #define VC_DESCRIPTOR_UNDEFINED 0x00 |
91 | #define VC_HEADER 0x01 | 91 | #define VC_HEADER 0x01 |
92 | #define VC_INPUT_TERMINAL 0x02 | 92 | #define VC_INPUT_TERMINAL 0x02 |
93 | #define VC_OUTPUT_TERMINAL 0x03 | 93 | #define VC_OUTPUT_TERMINAL 0x03 |
94 | #define VC_SELECTOR_UNIT 0x04 | 94 | #define VC_SELECTOR_UNIT 0x04 |
95 | #define VC_PROCESSING_UNIT 0x05 | 95 | #define VC_PROCESSING_UNIT 0x05 |
96 | #define VC_EXTENSION_UNIT 0x06 | 96 | #define VC_EXTENSION_UNIT 0x06 |
97 | 97 | ||
98 | /* VideoStreaming class specific interface descriptor */ | 98 | /* VideoStreaming class specific interface descriptor */ |
99 | #define VS_UNDEFINED 0x00 | 99 | #define VS_UNDEFINED 0x00 |
100 | #define VS_INPUT_HEADER 0x01 | 100 | #define VS_INPUT_HEADER 0x01 |
101 | #define VS_OUTPUT_HEADER 0x02 | 101 | #define VS_OUTPUT_HEADER 0x02 |
102 | #define VS_STILL_IMAGE_FRAME 0x03 | 102 | #define VS_STILL_IMAGE_FRAME 0x03 |
103 | #define VS_FORMAT_UNCOMPRESSED 0x04 | 103 | #define VS_FORMAT_UNCOMPRESSED 0x04 |
104 | #define VS_FRAME_UNCOMPRESSED 0x05 | 104 | #define VS_FRAME_UNCOMPRESSED 0x05 |
105 | #define VS_FORMAT_MJPEG 0x06 | 105 | #define VS_FORMAT_MJPEG 0x06 |
106 | #define VS_FRAME_MJPEG 0x07 | 106 | #define VS_FRAME_MJPEG 0x07 |
107 | #define VS_FORMAT_MPEG2TS 0x0a | 107 | #define VS_FORMAT_MPEG2TS 0x0a |
108 | #define VS_FORMAT_DV 0x0c | 108 | #define VS_FORMAT_DV 0x0c |
109 | #define VS_COLORFORMAT 0x0d | 109 | #define VS_COLORFORMAT 0x0d |
110 | #define VS_FORMAT_FRAME_BASED 0x10 | 110 | #define VS_FORMAT_FRAME_BASED 0x10 |
111 | #define VS_FRAME_FRAME_BASED 0x11 | 111 | #define VS_FRAME_FRAME_BASED 0x11 |
112 | #define VS_FORMAT_STREAM_BASED 0x12 | 112 | #define VS_FORMAT_STREAM_BASED 0x12 |
113 | 113 | ||
114 | /* Endpoint type */ | 114 | /* Endpoint type */ |
115 | #define EP_UNDEFINED 0x00 | 115 | #define EP_UNDEFINED 0x00 |
116 | #define EP_GENERAL 0x01 | 116 | #define EP_GENERAL 0x01 |
117 | #define EP_ENDPOINT 0x02 | 117 | #define EP_ENDPOINT 0x02 |
118 | #define EP_INTERRUPT 0x03 | 118 | #define EP_INTERRUPT 0x03 |
119 | 119 | ||
120 | /* Request codes */ | 120 | /* Request codes */ |
121 | #define RC_UNDEFINED 0x00 | 121 | #define RC_UNDEFINED 0x00 |
122 | #define SET_CUR 0x01 | 122 | #define SET_CUR 0x01 |
123 | #define GET_CUR 0x81 | 123 | #define GET_CUR 0x81 |
124 | #define GET_MIN 0x82 | 124 | #define GET_MIN 0x82 |
125 | #define GET_MAX 0x83 | 125 | #define GET_MAX 0x83 |
126 | #define GET_RES 0x84 | 126 | #define GET_RES 0x84 |
127 | #define GET_LEN 0x85 | 127 | #define GET_LEN 0x85 |
128 | #define GET_INFO 0x86 | 128 | #define GET_INFO 0x86 |
129 | #define GET_DEF 0x87 | 129 | #define GET_DEF 0x87 |
130 | 130 | ||
131 | /* VideoControl interface controls */ | 131 | /* VideoControl interface controls */ |
132 | #define VC_CONTROL_UNDEFINED 0x00 | 132 | #define VC_CONTROL_UNDEFINED 0x00 |
133 | #define VC_VIDEO_POWER_MODE_CONTROL 0x01 | 133 | #define VC_VIDEO_POWER_MODE_CONTROL 0x01 |
134 | #define VC_REQUEST_ERROR_CODE_CONTROL 0x02 | 134 | #define VC_REQUEST_ERROR_CODE_CONTROL 0x02 |
135 | 135 | ||
136 | /* Terminal controls */ | 136 | /* Terminal controls */ |
137 | #define TE_CONTROL_UNDEFINED 0x00 | 137 | #define TE_CONTROL_UNDEFINED 0x00 |
138 | 138 | ||
139 | /* Selector Unit controls */ | 139 | /* Selector Unit controls */ |
140 | #define SU_CONTROL_UNDEFINED 0x00 | 140 | #define SU_CONTROL_UNDEFINED 0x00 |
141 | #define SU_INPUT_SELECT_CONTROL 0x01 | 141 | #define SU_INPUT_SELECT_CONTROL 0x01 |
142 | 142 | ||
143 | /* Camera Terminal controls */ | 143 | /* Camera Terminal controls */ |
144 | #define CT_CONTROL_UNDEFINED 0x00 | 144 | #define CT_CONTROL_UNDEFINED 0x00 |
145 | #define CT_SCANNING_MODE_CONTROL 0x01 | 145 | #define CT_SCANNING_MODE_CONTROL 0x01 |
146 | #define CT_AE_MODE_CONTROL 0x02 | 146 | #define CT_AE_MODE_CONTROL 0x02 |
147 | #define CT_AE_PRIORITY_CONTROL 0x03 | 147 | #define CT_AE_PRIORITY_CONTROL 0x03 |
148 | #define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 | 148 | #define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04 |
149 | #define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 | 149 | #define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05 |
150 | #define CT_FOCUS_ABSOLUTE_CONTROL 0x06 | 150 | #define CT_FOCUS_ABSOLUTE_CONTROL 0x06 |
151 | #define CT_FOCUS_RELATIVE_CONTROL 0x07 | 151 | #define CT_FOCUS_RELATIVE_CONTROL 0x07 |
152 | #define CT_FOCUS_AUTO_CONTROL 0x08 | 152 | #define CT_FOCUS_AUTO_CONTROL 0x08 |
153 | #define CT_IRIS_ABSOLUTE_CONTROL 0x09 | 153 | #define CT_IRIS_ABSOLUTE_CONTROL 0x09 |
154 | #define CT_IRIS_RELATIVE_CONTROL 0x0a | 154 | #define CT_IRIS_RELATIVE_CONTROL 0x0a |
155 | #define CT_ZOOM_ABSOLUTE_CONTROL 0x0b | 155 | #define CT_ZOOM_ABSOLUTE_CONTROL 0x0b |
156 | #define CT_ZOOM_RELATIVE_CONTROL 0x0c | 156 | #define CT_ZOOM_RELATIVE_CONTROL 0x0c |
157 | #define CT_PANTILT_ABSOLUTE_CONTROL 0x0d | 157 | #define CT_PANTILT_ABSOLUTE_CONTROL 0x0d |
158 | #define CT_PANTILT_RELATIVE_CONTROL 0x0e | 158 | #define CT_PANTILT_RELATIVE_CONTROL 0x0e |
159 | #define CT_ROLL_ABSOLUTE_CONTROL 0x0f | 159 | #define CT_ROLL_ABSOLUTE_CONTROL 0x0f |
160 | #define CT_ROLL_RELATIVE_CONTROL 0x10 | 160 | #define CT_ROLL_RELATIVE_CONTROL 0x10 |
161 | #define CT_PRIVACY_CONTROL 0x11 | 161 | #define CT_PRIVACY_CONTROL 0x11 |
162 | 162 | ||
163 | /* Processing Unit controls */ | 163 | /* Processing Unit controls */ |
164 | #define PU_CONTROL_UNDEFINED 0x00 | 164 | #define PU_CONTROL_UNDEFINED 0x00 |
165 | #define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 | 165 | #define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01 |
166 | #define PU_BRIGHTNESS_CONTROL 0x02 | 166 | #define PU_BRIGHTNESS_CONTROL 0x02 |
167 | #define PU_CONTRAST_CONTROL 0x03 | 167 | #define PU_CONTRAST_CONTROL 0x03 |
168 | #define PU_GAIN_CONTROL 0x04 | 168 | #define PU_GAIN_CONTROL 0x04 |
169 | #define PU_POWER_LINE_FREQUENCY_CONTROL 0x05 | 169 | #define PU_POWER_LINE_FREQUENCY_CONTROL 0x05 |
170 | #define PU_HUE_CONTROL 0x06 | 170 | #define PU_HUE_CONTROL 0x06 |
171 | #define PU_SATURATION_CONTROL 0x07 | 171 | #define PU_SATURATION_CONTROL 0x07 |
172 | #define PU_SHARPNESS_CONTROL 0x08 | 172 | #define PU_SHARPNESS_CONTROL 0x08 |
173 | #define PU_GAMMA_CONTROL 0x09 | 173 | #define PU_GAMMA_CONTROL 0x09 |
174 | #define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a | 174 | #define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0a |
175 | #define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b | 175 | #define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0b |
176 | #define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c | 176 | #define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0c |
177 | #define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d | 177 | #define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0d |
178 | #define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e | 178 | #define PU_DIGITAL_MULTIPLIER_CONTROL 0x0e |
179 | #define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f | 179 | #define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0f |
180 | #define PU_HUE_AUTO_CONTROL 0x10 | 180 | #define PU_HUE_AUTO_CONTROL 0x10 |
181 | #define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 | 181 | #define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11 |
182 | #define PU_ANALOG_LOCK_STATUS_CONTROL 0x12 | 182 | #define PU_ANALOG_LOCK_STATUS_CONTROL 0x12 |
183 | 183 | ||
184 | #define LXU_MOTOR_PANTILT_RELATIVE_CONTROL 0x01 | 184 | #define LXU_MOTOR_PANTILT_RELATIVE_CONTROL 0x01 |
185 | #define LXU_MOTOR_PANTILT_RESET_CONTROL 0x02 | 185 | #define LXU_MOTOR_PANTILT_RESET_CONTROL 0x02 |
186 | #define LXU_MOTOR_FOCUS_MOTOR_CONTROL 0x03 | 186 | #define LXU_MOTOR_FOCUS_MOTOR_CONTROL 0x03 |
187 | 187 | ||
188 | /* VideoStreaming interface controls */ | 188 | /* VideoStreaming interface controls */ |
189 | #define VS_CONTROL_UNDEFINED 0x00 | 189 | #define VS_CONTROL_UNDEFINED 0x00 |
190 | #define VS_PROBE_CONTROL 0x01 | 190 | #define VS_PROBE_CONTROL 0x01 |
191 | #define VS_COMMIT_CONTROL 0x02 | 191 | #define VS_COMMIT_CONTROL 0x02 |
192 | #define VS_STILL_PROBE_CONTROL 0x03 | 192 | #define VS_STILL_PROBE_CONTROL 0x03 |
193 | #define VS_STILL_COMMIT_CONTROL 0x04 | 193 | #define VS_STILL_COMMIT_CONTROL 0x04 |
194 | #define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 | 194 | #define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05 |
195 | #define VS_STREAM_ERROR_CODE_CONTROL 0x06 | 195 | #define VS_STREAM_ERROR_CODE_CONTROL 0x06 |
196 | #define VS_GENERATE_KEY_FRAME_CONTROL 0x07 | 196 | #define VS_GENERATE_KEY_FRAME_CONTROL 0x07 |
197 | #define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 | 197 | #define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08 |
198 | #define VS_SYNC_DELAY_CONTROL 0x09 | 198 | #define VS_SYNC_DELAY_CONTROL 0x09 |
199 | 199 | ||
200 | #define TT_VENDOR_SPECIFIC 0x0100 | 200 | #define TT_VENDOR_SPECIFIC 0x0100 |
201 | #define TT_STREAMING 0x0101 | 201 | #define TT_STREAMING 0x0101 |
202 | 202 | ||
203 | /* Input Terminal types */ | 203 | /* Input Terminal types */ |
204 | #define ITT_VENDOR_SPECIFIC 0x0200 | 204 | #define ITT_VENDOR_SPECIFIC 0x0200 |
205 | #define ITT_CAMERA 0x0201 | 205 | #define ITT_CAMERA 0x0201 |
206 | #define ITT_MEDIA_TRANSPORT_INPUT 0x0202 | 206 | #define ITT_MEDIA_TRANSPORT_INPUT 0x0202 |
207 | 207 | ||
208 | /* Output Terminal types */ | 208 | /* Output Terminal types */ |
209 | #define OTT_VENDOR_SPECIFIC 0x0300 | 209 | #define OTT_VENDOR_SPECIFIC 0x0300 |
210 | #define OTT_DISPLAY 0x0301 | 210 | #define OTT_DISPLAY 0x0301 |
211 | #define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 | 211 | #define OTT_MEDIA_TRANSPORT_OUTPUT 0x0302 |
212 | 212 | ||
213 | /* External Terminal types */ | 213 | /* External Terminal types */ |
214 | #define EXTERNAL_VENDOR_SPECIFIC 0x0400 | 214 | #define EXTERNAL_VENDOR_SPECIFIC 0x0400 |
215 | #define COMPOSITE_CONNECTOR 0x0401 | 215 | #define COMPOSITE_CONNECTOR 0x0401 |
216 | #define SVIDEO_CONNECTOR 0x0402 | 216 | #define SVIDEO_CONNECTOR 0x0402 |
217 | #define COMPONENT_CONNECTOR 0x0403 | 217 | #define COMPONENT_CONNECTOR 0x0403 |
218 | 218 | ||
219 | #define UVC_TERM_INPUT 0x0000 | 219 | #define UVC_TERM_INPUT 0x0000 |
220 | #define UVC_TERM_OUTPUT 0x8000 | 220 | #define UVC_TERM_OUTPUT 0x8000 |
@@ -541,11 +541,11 @@ struct uvc_streaming { | |||
541 | }; | 541 | }; |
542 | 542 | ||
543 | enum uvc_buffer_state { | 543 | enum uvc_buffer_state { |
544 | UVC_BUF_STATE_IDLE = 0, | 544 | UVC_BUF_STATE_IDLE = 0, |
545 | UVC_BUF_STATE_QUEUED = 1, | 545 | UVC_BUF_STATE_QUEUED = 1, |
546 | UVC_BUF_STATE_ACTIVE = 2, | 546 | UVC_BUF_STATE_ACTIVE = 2, |
547 | UVC_BUF_STATE_DONE = 3, | 547 | UVC_BUF_STATE_DONE = 3, |
548 | UVC_BUF_STATE_ERROR = 4, | 548 | UVC_BUF_STATE_ERROR = 4, |
549 | }; | 549 | }; |
550 | 550 | ||
551 | struct uvc_buffer { | 551 | struct uvc_buffer { |
diff --git a/drivers/media/video/v4l2-subdev.c b/drivers/media/video/v4l2-subdev.c index fbe9cc0d433a..21208805ea9b 100644 --- a/drivers/media/video/v4l2-subdev.c +++ b/drivers/media/video/v4l2-subdev.c | |||
@@ -28,13 +28,13 @@ int v4l2_subdev_command(struct v4l2_subdev *sd, unsigned cmd, void *arg) | |||
28 | { | 28 | { |
29 | switch (cmd) { | 29 | switch (cmd) { |
30 | case VIDIOC_QUERYCTRL: | 30 | case VIDIOC_QUERYCTRL: |
31 | return v4l2_subdev_call(sd, core, querymenu, arg); | 31 | return v4l2_subdev_call(sd, core, queryctrl, arg); |
32 | case VIDIOC_G_CTRL: | 32 | case VIDIOC_G_CTRL: |
33 | return v4l2_subdev_call(sd, core, g_ctrl, arg); | 33 | return v4l2_subdev_call(sd, core, g_ctrl, arg); |
34 | case VIDIOC_S_CTRL: | 34 | case VIDIOC_S_CTRL: |
35 | return v4l2_subdev_call(sd, core, s_ctrl, arg); | 35 | return v4l2_subdev_call(sd, core, s_ctrl, arg); |
36 | case VIDIOC_QUERYMENU: | 36 | case VIDIOC_QUERYMENU: |
37 | return v4l2_subdev_call(sd, core, queryctrl, arg); | 37 | return v4l2_subdev_call(sd, core, querymenu, arg); |
38 | case VIDIOC_LOG_STATUS: | 38 | case VIDIOC_LOG_STATUS: |
39 | return v4l2_subdev_call(sd, core, log_status); | 39 | return v4l2_subdev_call(sd, core, log_status); |
40 | case VIDIOC_DBG_G_CHIP_IDENT: | 40 | case VIDIOC_DBG_G_CHIP_IDENT: |
diff --git a/drivers/media/video/zoran/zoran.h b/drivers/media/video/zoran/zoran.h index 46b7ad477ceb..e873a916250f 100644 --- a/drivers/media/video/zoran/zoran.h +++ b/drivers/media/video/zoran/zoran.h | |||
@@ -349,7 +349,6 @@ struct card_info { | |||
349 | u16 i2c_decoder, i2c_encoder; /* I2C types */ | 349 | u16 i2c_decoder, i2c_encoder; /* I2C types */ |
350 | u16 video_vfe, video_codec; /* videocodec types */ | 350 | u16 video_vfe, video_codec; /* videocodec types */ |
351 | u16 audio_chip; /* audio type */ | 351 | u16 audio_chip; /* audio type */ |
352 | u16 vendor_id, device_id; /* subsystem vendor/device ID */ | ||
353 | 352 | ||
354 | int inputs; /* number of video inputs */ | 353 | int inputs; /* number of video inputs */ |
355 | struct input { | 354 | struct input { |
@@ -401,7 +400,6 @@ struct zoran { | |||
401 | char name[32]; /* name of this device */ | 400 | char name[32]; /* name of this device */ |
402 | struct pci_dev *pci_dev; /* PCI device */ | 401 | struct pci_dev *pci_dev; /* PCI device */ |
403 | unsigned char revision; /* revision of zr36057 */ | 402 | unsigned char revision; /* revision of zr36057 */ |
404 | unsigned int zr36057_adr; /* bus address of IO mem returned by PCI BIOS */ | ||
405 | unsigned char __iomem *zr36057_mem;/* pointer to mapped IO memory */ | 403 | unsigned char __iomem *zr36057_mem;/* pointer to mapped IO memory */ |
406 | 404 | ||
407 | spinlock_t spinlock; /* Spinlock */ | 405 | spinlock_t spinlock; /* Spinlock */ |
@@ -490,16 +488,10 @@ struct zoran { | |||
490 | wait_queue_head_t test_q; | 488 | wait_queue_head_t test_q; |
491 | }; | 489 | }; |
492 | 490 | ||
493 | /*The following should be done in more portable way. It depends on define | 491 | /* There was something called _ALPHA_BUZ that used the PCI address instead of |
494 | of _ALPHA_BUZ in the Makefile.*/ | 492 | * the kernel iomapped address for btread/btwrite. */ |
495 | |||
496 | #ifdef _ALPHA_BUZ | ||
497 | #define btwrite(dat,adr) writel((dat), zr->zr36057_adr+(adr)) | ||
498 | #define btread(adr) readl(zr->zr36057_adr+(adr)) | ||
499 | #else | ||
500 | #define btwrite(dat,adr) writel((dat), zr->zr36057_mem+(adr)) | 493 | #define btwrite(dat,adr) writel((dat), zr->zr36057_mem+(adr)) |
501 | #define btread(adr) readl(zr->zr36057_mem+(adr)) | 494 | #define btread(adr) readl(zr->zr36057_mem+(adr)) |
502 | #endif | ||
503 | 495 | ||
504 | #define btand(dat,adr) btwrite((dat) & btread(adr), adr) | 496 | #define btand(dat,adr) btwrite((dat) & btread(adr), adr) |
505 | #define btor(dat,adr) btwrite((dat) | btread(adr), adr) | 497 | #define btor(dat,adr) btwrite((dat) | btread(adr), adr) |
diff --git a/drivers/media/video/zoran/zoran_card.c b/drivers/media/video/zoran/zoran_card.c index 05f39195372e..5d2f090aa0f8 100644 --- a/drivers/media/video/zoran/zoran_card.c +++ b/drivers/media/video/zoran/zoran_card.c | |||
@@ -61,17 +61,17 @@ | |||
61 | 61 | ||
62 | extern const struct zoran_format zoran_formats[]; | 62 | extern const struct zoran_format zoran_formats[]; |
63 | 63 | ||
64 | static int card[BUZ_MAX] = { -1, -1, -1, -1 }; | 64 | static int card[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
65 | module_param_array(card, int, NULL, 0444); | 65 | module_param_array(card, int, NULL, 0444); |
66 | MODULE_PARM_DESC(card, "The type of card"); | 66 | MODULE_PARM_DESC(card, "Card type"); |
67 | 67 | ||
68 | static int encoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 68 | static int encoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
69 | module_param_array(encoder, int, NULL, 0444); | 69 | module_param_array(encoder, int, NULL, 0444); |
70 | MODULE_PARM_DESC(encoder, "i2c TV encoder"); | 70 | MODULE_PARM_DESC(encoder, "Video encoder chip"); |
71 | 71 | ||
72 | static int decoder[BUZ_MAX] = { -1, -1, -1, -1 }; | 72 | static int decoder[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
73 | module_param_array(decoder, int, NULL, 0444); | 73 | module_param_array(decoder, int, NULL, 0444); |
74 | MODULE_PARM_DESC(decoder, "i2c TV decoder"); | 74 | MODULE_PARM_DESC(decoder, "Video decoder chip"); |
75 | 75 | ||
76 | /* | 76 | /* |
77 | The video mem address of the video card. | 77 | The video mem address of the video card. |
@@ -104,9 +104,9 @@ module_param(default_norm, int, 0444); | |||
104 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); | 104 | MODULE_PARM_DESC(default_norm, "Default norm (0=PAL, 1=NTSC, 2=SECAM)"); |
105 | 105 | ||
106 | /* /dev/videoN, -1 for autodetect */ | 106 | /* /dev/videoN, -1 for autodetect */ |
107 | static int video_nr[BUZ_MAX] = {-1, -1, -1, -1}; | 107 | static int video_nr[BUZ_MAX] = { [0 ... (BUZ_MAX-1)] = -1 }; |
108 | module_param_array(video_nr, int, NULL, 0444); | 108 | module_param_array(video_nr, int, NULL, 0444); |
109 | MODULE_PARM_DESC(video_nr, "video device number (-1=Auto)"); | 109 | MODULE_PARM_DESC(video_nr, "Video device number (-1=Auto)"); |
110 | 110 | ||
111 | /* | 111 | /* |
112 | Number and size of grab buffers for Video 4 Linux | 112 | Number and size of grab buffers for Video 4 Linux |
@@ -153,9 +153,21 @@ MODULE_DESCRIPTION("Zoran-36057/36067 JPEG codec driver"); | |||
153 | MODULE_AUTHOR("Serguei Miridonov"); | 153 | MODULE_AUTHOR("Serguei Miridonov"); |
154 | MODULE_LICENSE("GPL"); | 154 | MODULE_LICENSE("GPL"); |
155 | 155 | ||
156 | #define ZR_DEVICE(subven, subdev, data) { \ | ||
157 | .vendor = PCI_VENDOR_ID_ZORAN, .device = PCI_DEVICE_ID_ZORAN_36057, \ | ||
158 | .subvendor = (subven), .subdevice = (subdev), .driver_data = (data) } | ||
159 | |||
160 | static struct pci_device_id zr36067_pci_tbl[] = { | ||
161 | ZR_DEVICE(PCI_VENDOR_ID_MIRO, PCI_DEVICE_ID_MIRO_DC10PLUS, DC10plus), | ||
162 | ZR_DEVICE(PCI_VENDOR_ID_MIRO, PCI_DEVICE_ID_MIRO_DC30PLUS, DC30plus), | ||
163 | ZR_DEVICE(PCI_VENDOR_ID_ELECTRONICDESIGNGMBH, PCI_DEVICE_ID_LML_33R10, LML33R10), | ||
164 | ZR_DEVICE(PCI_VENDOR_ID_IOMEGA, PCI_DEVICE_ID_IOMEGA_BUZ, BUZ), | ||
165 | ZR_DEVICE(PCI_ANY_ID, PCI_ANY_ID, NUM_CARDS), | ||
166 | {0} | ||
167 | }; | ||
168 | MODULE_DEVICE_TABLE(pci, zr36067_pci_tbl); | ||
156 | 169 | ||
157 | int zoran_num; /* number of Buzs in use */ | 170 | static unsigned int zoran_num; /* number of cards found */ |
158 | struct zoran *zoran[BUZ_MAX]; | ||
159 | 171 | ||
160 | /* videocodec bus functions ZR36060 */ | 172 | /* videocodec bus functions ZR36060 */ |
161 | static u32 | 173 | static u32 |
@@ -472,8 +484,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | |||
472 | }, { | 484 | }, { |
473 | .type = DC10plus, | 485 | .type = DC10plus, |
474 | .name = "DC10plus", | 486 | .name = "DC10plus", |
475 | .vendor_id = PCI_VENDOR_ID_MIRO, | ||
476 | .device_id = PCI_DEVICE_ID_MIRO_DC10PLUS, | ||
477 | .i2c_decoder = I2C_DRIVERID_SAA7110, | 487 | .i2c_decoder = I2C_DRIVERID_SAA7110, |
478 | .i2c_encoder = I2C_DRIVERID_ADV7175, | 488 | .i2c_encoder = I2C_DRIVERID_ADV7175, |
479 | .video_codec = CODEC_TYPE_ZR36060, | 489 | .video_codec = CODEC_TYPE_ZR36060, |
@@ -531,8 +541,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | |||
531 | }, { | 541 | }, { |
532 | .type = DC30plus, | 542 | .type = DC30plus, |
533 | .name = "DC30plus", | 543 | .name = "DC30plus", |
534 | .vendor_id = PCI_VENDOR_ID_MIRO, | ||
535 | .device_id = PCI_DEVICE_ID_MIRO_DC30PLUS, | ||
536 | .i2c_decoder = I2C_DRIVERID_VPX3220, | 544 | .i2c_decoder = I2C_DRIVERID_VPX3220, |
537 | .i2c_encoder = I2C_DRIVERID_ADV7175, | 545 | .i2c_encoder = I2C_DRIVERID_ADV7175, |
538 | .video_codec = CODEC_TYPE_ZR36050, | 546 | .video_codec = CODEC_TYPE_ZR36050, |
@@ -589,8 +597,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | |||
589 | }, { | 597 | }, { |
590 | .type = LML33R10, | 598 | .type = LML33R10, |
591 | .name = "LML33R10", | 599 | .name = "LML33R10", |
592 | .vendor_id = PCI_VENDOR_ID_ELECTRONICDESIGNGMBH, | ||
593 | .device_id = PCI_DEVICE_ID_LML_33R10, | ||
594 | .i2c_decoder = I2C_DRIVERID_SAA7114, | 600 | .i2c_decoder = I2C_DRIVERID_SAA7114, |
595 | .i2c_encoder = I2C_DRIVERID_ADV7170, | 601 | .i2c_encoder = I2C_DRIVERID_ADV7170, |
596 | .video_codec = CODEC_TYPE_ZR36060, | 602 | .video_codec = CODEC_TYPE_ZR36060, |
@@ -618,8 +624,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | |||
618 | }, { | 624 | }, { |
619 | .type = BUZ, | 625 | .type = BUZ, |
620 | .name = "Buz", | 626 | .name = "Buz", |
621 | .vendor_id = PCI_VENDOR_ID_IOMEGA, | ||
622 | .device_id = PCI_DEVICE_ID_IOMEGA_BUZ, | ||
623 | .i2c_decoder = I2C_DRIVERID_SAA7111A, | 627 | .i2c_decoder = I2C_DRIVERID_SAA7111A, |
624 | .i2c_encoder = I2C_DRIVERID_SAA7185B, | 628 | .i2c_encoder = I2C_DRIVERID_SAA7185B, |
625 | .video_codec = CODEC_TYPE_ZR36060, | 629 | .video_codec = CODEC_TYPE_ZR36060, |
@@ -649,8 +653,6 @@ static struct card_info zoran_cards[NUM_CARDS] __devinitdata = { | |||
649 | .name = "6-Eyes", | 653 | .name = "6-Eyes", |
650 | /* AverMedia chose not to brand the 6-Eyes. Thus it | 654 | /* AverMedia chose not to brand the 6-Eyes. Thus it |
651 | can't be autodetected, and requires card=x. */ | 655 | can't be autodetected, and requires card=x. */ |
652 | .vendor_id = -1, | ||
653 | .device_id = -1, | ||
654 | .i2c_decoder = I2C_DRIVERID_KS0127, | 656 | .i2c_decoder = I2C_DRIVERID_KS0127, |
655 | .i2c_encoder = I2C_DRIVERID_BT866, | 657 | .i2c_encoder = I2C_DRIVERID_BT866, |
656 | .video_codec = CODEC_TYPE_ZR36060, | 658 | .video_codec = CODEC_TYPE_ZR36060, |
@@ -1138,7 +1140,8 @@ zr36057_init (struct zoran *zr) | |||
1138 | strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); | 1140 | strcpy(zr->video_dev->name, ZR_DEVNAME(zr)); |
1139 | err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]); | 1141 | err = video_register_device(zr->video_dev, VFL_TYPE_GRABBER, video_nr[zr->id]); |
1140 | if (err < 0) | 1142 | if (err < 0) |
1141 | goto exit_unregister; | 1143 | goto exit_free; |
1144 | video_set_drvdata(zr->video_dev, zr); | ||
1142 | 1145 | ||
1143 | zoran_init_hardware(zr); | 1146 | zoran_init_hardware(zr); |
1144 | if (zr36067_debug > 2) | 1147 | if (zr36067_debug > 2) |
@@ -1153,19 +1156,19 @@ zr36057_init (struct zoran *zr) | |||
1153 | zr->initialized = 1; | 1156 | zr->initialized = 1; |
1154 | return 0; | 1157 | return 0; |
1155 | 1158 | ||
1156 | exit_unregister: | ||
1157 | zoran_unregister_i2c(zr); | ||
1158 | exit_free: | 1159 | exit_free: |
1159 | kfree(zr->stat_com); | 1160 | kfree(zr->stat_com); |
1160 | kfree(zr->video_dev); | 1161 | kfree(zr->video_dev); |
1161 | return err; | 1162 | return err; |
1162 | } | 1163 | } |
1163 | 1164 | ||
1164 | static void | 1165 | static void __devexit zoran_remove(struct pci_dev *pdev) |
1165 | zoran_release (struct zoran *zr) | ||
1166 | { | 1166 | { |
1167 | struct zoran *zr = pci_get_drvdata(pdev); | ||
1168 | |||
1167 | if (!zr->initialized) | 1169 | if (!zr->initialized) |
1168 | goto exit_free; | 1170 | goto exit_free; |
1171 | |||
1169 | /* unregister videocodec bus */ | 1172 | /* unregister videocodec bus */ |
1170 | if (zr->codec) { | 1173 | if (zr->codec) { |
1171 | struct videocodec_master *master = zr->codec->master_data; | 1174 | struct videocodec_master *master = zr->codec->master_data; |
@@ -1194,6 +1197,7 @@ zoran_release (struct zoran *zr) | |||
1194 | pci_disable_device(zr->pci_dev); | 1197 | pci_disable_device(zr->pci_dev); |
1195 | video_unregister_device(zr->video_dev); | 1198 | video_unregister_device(zr->video_dev); |
1196 | exit_free: | 1199 | exit_free: |
1200 | pci_set_drvdata(pdev, NULL); | ||
1197 | kfree(zr); | 1201 | kfree(zr); |
1198 | } | 1202 | } |
1199 | 1203 | ||
@@ -1256,338 +1260,329 @@ zoran_setup_videocodec (struct zoran *zr, | |||
1256 | * Scan for a Buz card (actually for the PCI controller ZR36057), | 1260 | * Scan for a Buz card (actually for the PCI controller ZR36057), |
1257 | * request the irq and map the io memory | 1261 | * request the irq and map the io memory |
1258 | */ | 1262 | */ |
1259 | static int __devinit | 1263 | static int __devinit zoran_probe(struct pci_dev *pdev, |
1260 | find_zr36057 (void) | 1264 | const struct pci_device_id *ent) |
1261 | { | 1265 | { |
1262 | unsigned char latency, need_latency; | 1266 | unsigned char latency, need_latency; |
1263 | struct zoran *zr; | 1267 | struct zoran *zr; |
1264 | struct pci_dev *dev = NULL; | ||
1265 | int result; | 1268 | int result; |
1266 | struct videocodec_master *master_vfe = NULL; | 1269 | struct videocodec_master *master_vfe = NULL; |
1267 | struct videocodec_master *master_codec = NULL; | 1270 | struct videocodec_master *master_codec = NULL; |
1268 | int card_num; | 1271 | int card_num; |
1269 | char *i2c_enc_name, *i2c_dec_name, *codec_name, *vfe_name; | 1272 | char *i2c_enc_name, *i2c_dec_name, *codec_name, *vfe_name; |
1273 | unsigned int nr; | ||
1270 | 1274 | ||
1271 | zoran_num = 0; | ||
1272 | while (zoran_num < BUZ_MAX && | ||
1273 | (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { | ||
1274 | card_num = card[zoran_num]; | ||
1275 | zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); | ||
1276 | if (!zr) { | ||
1277 | dprintk(1, | ||
1278 | KERN_ERR | ||
1279 | "%s: find_zr36057() - kzalloc failed\n", | ||
1280 | ZORAN_NAME); | ||
1281 | continue; | ||
1282 | } | ||
1283 | zr->pci_dev = dev; | ||
1284 | //zr->zr36057_mem = NULL; | ||
1285 | zr->id = zoran_num; | ||
1286 | snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); | ||
1287 | spin_lock_init(&zr->spinlock); | ||
1288 | mutex_init(&zr->resource_lock); | ||
1289 | if (pci_enable_device(dev)) | ||
1290 | goto zr_free_mem; | ||
1291 | zr->zr36057_adr = pci_resource_start(zr->pci_dev, 0); | ||
1292 | pci_read_config_byte(zr->pci_dev, PCI_CLASS_REVISION, | ||
1293 | &zr->revision); | ||
1294 | if (zr->revision < 2) { | ||
1295 | dprintk(1, | ||
1296 | KERN_INFO | ||
1297 | "%s: Zoran ZR36057 (rev %d) irq: %d, memory: 0x%08x.\n", | ||
1298 | ZR_DEVNAME(zr), zr->revision, zr->pci_dev->irq, | ||
1299 | zr->zr36057_adr); | ||
1300 | 1275 | ||
1301 | if (card_num == -1) { | 1276 | nr = zoran_num++; |
1302 | dprintk(1, | 1277 | if (nr >= BUZ_MAX) { |
1303 | KERN_ERR | 1278 | dprintk(1, |
1304 | "%s: find_zr36057() - no card specified, please use the card=X insmod option\n", | 1279 | KERN_ERR |
1305 | ZR_DEVNAME(zr)); | 1280 | "%s: driver limited to %d card(s) maximum\n", |
1306 | goto zr_free_mem; | 1281 | ZORAN_NAME, BUZ_MAX); |
1307 | } | 1282 | return -ENOENT; |
1308 | } else { | 1283 | } |
1309 | int i; | ||
1310 | unsigned short ss_vendor, ss_device; | ||
1311 | 1284 | ||
1312 | ss_vendor = zr->pci_dev->subsystem_vendor; | 1285 | zr = kzalloc(sizeof(struct zoran), GFP_KERNEL); |
1313 | ss_device = zr->pci_dev->subsystem_device; | 1286 | if (!zr) { |
1287 | dprintk(1, | ||
1288 | KERN_ERR | ||
1289 | "%s: find_zr36057() - kzalloc failed\n", | ||
1290 | ZORAN_NAME); | ||
1291 | return -ENOMEM; | ||
1292 | } | ||
1293 | zr->pci_dev = pdev; | ||
1294 | zr->id = nr; | ||
1295 | snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "MJPEG[%u]", zr->id); | ||
1296 | spin_lock_init(&zr->spinlock); | ||
1297 | mutex_init(&zr->resource_lock); | ||
1298 | if (pci_enable_device(pdev)) | ||
1299 | goto zr_free_mem; | ||
1300 | pci_read_config_byte(zr->pci_dev, PCI_CLASS_REVISION, &zr->revision); | ||
1301 | |||
1302 | dprintk(1, | ||
1303 | KERN_INFO | ||
1304 | "%s: Zoran ZR360%c7 (rev %d), irq: %d, memory: 0x%08llx\n", | ||
1305 | ZR_DEVNAME(zr), zr->revision < 2 ? '5' : '6', zr->revision, | ||
1306 | zr->pci_dev->irq, (uint64_t)pci_resource_start(zr->pci_dev, 0)); | ||
1307 | if (zr->revision >= 2) { | ||
1308 | dprintk(1, | ||
1309 | KERN_INFO | ||
1310 | "%s: Subsystem vendor=0x%04x id=0x%04x\n", | ||
1311 | ZR_DEVNAME(zr), zr->pci_dev->subsystem_vendor, | ||
1312 | zr->pci_dev->subsystem_device); | ||
1313 | } | ||
1314 | |||
1315 | /* Use auto-detected card type? */ | ||
1316 | if (card[nr] == -1) { | ||
1317 | if (zr->revision < 2) { | ||
1314 | dprintk(1, | 1318 | dprintk(1, |
1315 | KERN_INFO | 1319 | KERN_ERR |
1316 | "%s: Zoran ZR36067 (rev %d) irq: %d, memory: 0x%08x\n", | 1320 | "%s: No card type specified, please use the card=X module parameter\n", |
1317 | ZR_DEVNAME(zr), zr->revision, zr->pci_dev->irq, | 1321 | ZR_DEVNAME(zr)); |
1318 | zr->zr36057_adr); | ||
1319 | dprintk(1, | 1322 | dprintk(1, |
1320 | KERN_INFO | ||
1321 | "%s: subsystem vendor=0x%04x id=0x%04x\n", | ||
1322 | ZR_DEVNAME(zr), ss_vendor, ss_device); | ||
1323 | if (card_num == -1) { | ||
1324 | dprintk(3, | ||
1325 | KERN_DEBUG | ||
1326 | "%s: find_zr36057() - trying to autodetect card type\n", | ||
1327 | ZR_DEVNAME(zr)); | ||
1328 | for (i=0;i<NUM_CARDS;i++) { | ||
1329 | if (ss_vendor == zoran_cards[i].vendor_id && | ||
1330 | ss_device == zoran_cards[i].device_id) { | ||
1331 | dprintk(3, | ||
1332 | KERN_DEBUG | ||
1333 | "%s: find_zr36057() - card %s detected\n", | ||
1334 | ZR_DEVNAME(zr), | ||
1335 | zoran_cards[i].name); | ||
1336 | card_num = i; | ||
1337 | break; | ||
1338 | } | ||
1339 | } | ||
1340 | if (i == NUM_CARDS) { | ||
1341 | dprintk(1, | ||
1342 | KERN_ERR | ||
1343 | "%s: find_zr36057() - unknown card\n", | ||
1344 | ZR_DEVNAME(zr)); | ||
1345 | goto zr_free_mem; | ||
1346 | } | ||
1347 | } | ||
1348 | } | ||
1349 | |||
1350 | if (card_num < 0 || card_num >= NUM_CARDS) { | ||
1351 | dprintk(2, | ||
1352 | KERN_ERR | 1323 | KERN_ERR |
1353 | "%s: find_zr36057() - invalid cardnum %d\n", | 1324 | "%s: It is not possible to auto-detect ZR36057 based cards\n", |
1354 | ZR_DEVNAME(zr), card_num); | 1325 | ZR_DEVNAME(zr)); |
1355 | goto zr_free_mem; | 1326 | goto zr_free_mem; |
1356 | } | 1327 | } |
1357 | 1328 | ||
1358 | /* even though we make this a non pointer and thus | 1329 | card_num = ent->driver_data; |
1359 | * theoretically allow for making changes to this struct | 1330 | if (card_num >= NUM_CARDS) { |
1360 | * on a per-individual card basis at runtime, this is | ||
1361 | * strongly discouraged. This structure is intended to | ||
1362 | * keep general card information, no settings or anything */ | ||
1363 | zr->card = zoran_cards[card_num]; | ||
1364 | snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), | ||
1365 | "%s[%u]", zr->card.name, zr->id); | ||
1366 | |||
1367 | zr->zr36057_mem = ioremap_nocache(zr->zr36057_adr, 0x1000); | ||
1368 | if (!zr->zr36057_mem) { | ||
1369 | dprintk(1, | 1331 | dprintk(1, |
1370 | KERN_ERR | 1332 | KERN_ERR |
1371 | "%s: find_zr36057() - ioremap failed\n", | 1333 | "%s: Unknown card, try specifying card=X module parameter\n", |
1372 | ZR_DEVNAME(zr)); | 1334 | ZR_DEVNAME(zr)); |
1373 | goto zr_free_mem; | 1335 | goto zr_free_mem; |
1374 | } | 1336 | } |
1375 | 1337 | dprintk(3, | |
1376 | result = request_irq(zr->pci_dev->irq, | 1338 | KERN_DEBUG |
1377 | zoran_irq, | 1339 | "%s: %s() - card %s detected\n", |
1378 | IRQF_SHARED | IRQF_DISABLED, | 1340 | ZR_DEVNAME(zr), __func__, zoran_cards[card_num].name); |
1379 | ZR_DEVNAME(zr), | 1341 | } else { |
1380 | (void *) zr); | 1342 | card_num = card[nr]; |
1381 | if (result < 0) { | 1343 | if (card_num >= NUM_CARDS || card_num < 0) { |
1382 | if (result == -EINVAL) { | 1344 | dprintk(1, |
1383 | dprintk(1, | 1345 | KERN_ERR |
1384 | KERN_ERR | 1346 | "%s: User specified card type %d out of range (0 .. %d)\n", |
1385 | "%s: find_zr36057() - bad irq number or handler\n", | 1347 | ZR_DEVNAME(zr), card_num, NUM_CARDS - 1); |
1386 | ZR_DEVNAME(zr)); | 1348 | goto zr_free_mem; |
1387 | } else if (result == -EBUSY) { | ||
1388 | dprintk(1, | ||
1389 | KERN_ERR | ||
1390 | "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", | ||
1391 | ZR_DEVNAME(zr), zr->pci_dev->irq); | ||
1392 | } else { | ||
1393 | dprintk(1, | ||
1394 | KERN_ERR | ||
1395 | "%s: find_zr36057() - can't assign irq, error code %d\n", | ||
1396 | ZR_DEVNAME(zr), result); | ||
1397 | } | ||
1398 | goto zr_unmap; | ||
1399 | } | ||
1400 | |||
1401 | /* set PCI latency timer */ | ||
1402 | pci_read_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, | ||
1403 | &latency); | ||
1404 | need_latency = zr->revision > 1 ? 32 : 48; | ||
1405 | if (latency != need_latency) { | ||
1406 | dprintk(2, | ||
1407 | KERN_INFO | ||
1408 | "%s: Changing PCI latency from %d to %d.\n", | ||
1409 | ZR_DEVNAME(zr), latency, need_latency); | ||
1410 | pci_write_config_byte(zr->pci_dev, | ||
1411 | PCI_LATENCY_TIMER, | ||
1412 | need_latency); | ||
1413 | } | 1349 | } |
1350 | } | ||
1414 | 1351 | ||
1415 | zr36057_restart(zr); | 1352 | /* even though we make this a non pointer and thus |
1416 | /* i2c */ | 1353 | * theoretically allow for making changes to this struct |
1417 | dprintk(2, KERN_INFO "%s: Initializing i2c bus...\n", | 1354 | * on a per-individual card basis at runtime, this is |
1418 | ZR_DEVNAME(zr)); | 1355 | * strongly discouraged. This structure is intended to |
1356 | * keep general card information, no settings or anything */ | ||
1357 | zr->card = zoran_cards[card_num]; | ||
1358 | snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), | ||
1359 | "%s[%u]", zr->card.name, zr->id); | ||
1360 | |||
1361 | zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0); | ||
1362 | if (!zr->zr36057_mem) { | ||
1363 | dprintk(1, | ||
1364 | KERN_ERR | ||
1365 | "%s: %s() - ioremap failed\n", | ||
1366 | ZR_DEVNAME(zr), __func__); | ||
1367 | goto zr_free_mem; | ||
1368 | } | ||
1419 | 1369 | ||
1420 | /* i2c decoder */ | 1370 | result = request_irq(zr->pci_dev->irq, zoran_irq, |
1421 | if (decoder[zr->id] != -1) { | 1371 | IRQF_SHARED | IRQF_DISABLED, ZR_DEVNAME(zr), zr); |
1422 | i2c_dec_name = i2cid_to_modulename(decoder[zr->id]); | 1372 | if (result < 0) { |
1423 | zr->card.i2c_decoder = decoder[zr->id]; | 1373 | if (result == -EINVAL) { |
1424 | } else if (zr->card.i2c_decoder != 0) { | 1374 | dprintk(1, |
1425 | i2c_dec_name = | 1375 | KERN_ERR |
1426 | i2cid_to_modulename(zr->card.i2c_decoder); | 1376 | "%s: find_zr36057() - bad irq number or handler\n", |
1377 | ZR_DEVNAME(zr)); | ||
1378 | } else if (result == -EBUSY) { | ||
1379 | dprintk(1, | ||
1380 | KERN_ERR | ||
1381 | "%s: find_zr36057() - IRQ %d busy, change your PnP config in BIOS\n", | ||
1382 | ZR_DEVNAME(zr), zr->pci_dev->irq); | ||
1427 | } else { | 1383 | } else { |
1428 | i2c_dec_name = NULL; | 1384 | dprintk(1, |
1385 | KERN_ERR | ||
1386 | "%s: find_zr36057() - can't assign irq, error code %d\n", | ||
1387 | ZR_DEVNAME(zr), result); | ||
1429 | } | 1388 | } |
1389 | goto zr_unmap; | ||
1390 | } | ||
1430 | 1391 | ||
1431 | if (i2c_dec_name) { | 1392 | /* set PCI latency timer */ |
1432 | if ((result = request_module(i2c_dec_name)) < 0) { | 1393 | pci_read_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, |
1433 | dprintk(1, | 1394 | &latency); |
1434 | KERN_ERR | 1395 | need_latency = zr->revision > 1 ? 32 : 48; |
1435 | "%s: failed to load module %s: %d\n", | 1396 | if (latency != need_latency) { |
1436 | ZR_DEVNAME(zr), i2c_dec_name, result); | 1397 | dprintk(2, |
1437 | } | 1398 | KERN_INFO |
1438 | } | 1399 | "%s: Changing PCI latency from %d to %d\n", |
1400 | ZR_DEVNAME(zr), latency, need_latency); | ||
1401 | pci_write_config_byte(zr->pci_dev, PCI_LATENCY_TIMER, | ||
1402 | need_latency); | ||
1403 | } | ||
1439 | 1404 | ||
1440 | /* i2c encoder */ | 1405 | zr36057_restart(zr); |
1441 | if (encoder[zr->id] != -1) { | 1406 | /* i2c */ |
1442 | i2c_enc_name = i2cid_to_modulename(encoder[zr->id]); | 1407 | dprintk(2, KERN_INFO "%s: Initializing i2c bus...\n", |
1443 | zr->card.i2c_encoder = encoder[zr->id]; | 1408 | ZR_DEVNAME(zr)); |
1444 | } else if (zr->card.i2c_encoder != 0) { | 1409 | |
1445 | i2c_enc_name = | 1410 | /* i2c decoder */ |
1446 | i2cid_to_modulename(zr->card.i2c_encoder); | 1411 | if (decoder[zr->id] != -1) { |
1447 | } else { | 1412 | i2c_dec_name = i2cid_to_modulename(decoder[zr->id]); |
1448 | i2c_enc_name = NULL; | 1413 | zr->card.i2c_decoder = decoder[zr->id]; |
1449 | } | 1414 | } else if (zr->card.i2c_decoder != 0) { |
1415 | i2c_dec_name = i2cid_to_modulename(zr->card.i2c_decoder); | ||
1416 | } else { | ||
1417 | i2c_dec_name = NULL; | ||
1418 | } | ||
1450 | 1419 | ||
1451 | if (i2c_enc_name) { | 1420 | if (i2c_dec_name) { |
1452 | if ((result = request_module(i2c_enc_name)) < 0) { | 1421 | result = request_module(i2c_dec_name); |
1453 | dprintk(1, | 1422 | if (result < 0) { |
1454 | KERN_ERR | 1423 | dprintk(1, |
1455 | "%s: failed to load module %s: %d\n", | 1424 | KERN_ERR |
1456 | ZR_DEVNAME(zr), i2c_enc_name, result); | 1425 | "%s: failed to load module %s: %d\n", |
1457 | } | 1426 | ZR_DEVNAME(zr), i2c_dec_name, result); |
1458 | } | 1427 | } |
1428 | } | ||
1429 | |||
1430 | /* i2c encoder */ | ||
1431 | if (encoder[zr->id] != -1) { | ||
1432 | i2c_enc_name = i2cid_to_modulename(encoder[zr->id]); | ||
1433 | zr->card.i2c_encoder = encoder[zr->id]; | ||
1434 | } else if (zr->card.i2c_encoder != 0) { | ||
1435 | i2c_enc_name = i2cid_to_modulename(zr->card.i2c_encoder); | ||
1436 | } else { | ||
1437 | i2c_enc_name = NULL; | ||
1438 | } | ||
1459 | 1439 | ||
1460 | if (zoran_register_i2c(zr) < 0) { | 1440 | if (i2c_enc_name) { |
1441 | result = request_module(i2c_enc_name); | ||
1442 | if (result < 0) { | ||
1461 | dprintk(1, | 1443 | dprintk(1, |
1462 | KERN_ERR | 1444 | KERN_ERR |
1463 | "%s: find_zr36057() - can't initialize i2c bus\n", | 1445 | "%s: failed to load module %s: %d\n", |
1464 | ZR_DEVNAME(zr)); | 1446 | ZR_DEVNAME(zr), i2c_enc_name, result); |
1465 | goto zr_free_irq; | ||
1466 | } | 1447 | } |
1448 | } | ||
1467 | 1449 | ||
1468 | dprintk(2, | 1450 | if (zoran_register_i2c(zr) < 0) { |
1469 | KERN_INFO "%s: Initializing videocodec bus...\n", | 1451 | dprintk(1, |
1452 | KERN_ERR | ||
1453 | "%s: find_zr36057() - can't initialize i2c bus\n", | ||
1470 | ZR_DEVNAME(zr)); | 1454 | ZR_DEVNAME(zr)); |
1455 | goto zr_free_irq; | ||
1456 | } | ||
1471 | 1457 | ||
1472 | if (zr->card.video_codec != 0 && | 1458 | dprintk(2, |
1473 | (codec_name = | 1459 | KERN_INFO "%s: Initializing videocodec bus...\n", |
1474 | codecid_to_modulename(zr->card.video_codec)) != NULL) { | 1460 | ZR_DEVNAME(zr)); |
1475 | if ((result = request_module(codec_name)) < 0) { | 1461 | |
1462 | if (zr->card.video_codec) { | ||
1463 | codec_name = codecid_to_modulename(zr->card.video_codec); | ||
1464 | if (codec_name) { | ||
1465 | result = request_module(codec_name); | ||
1466 | if (result) { | ||
1476 | dprintk(1, | 1467 | dprintk(1, |
1477 | KERN_ERR | 1468 | KERN_ERR |
1478 | "%s: failed to load modules %s: %d\n", | 1469 | "%s: failed to load modules %s: %d\n", |
1479 | ZR_DEVNAME(zr), codec_name, result); | 1470 | ZR_DEVNAME(zr), codec_name, result); |
1480 | } | 1471 | } |
1481 | } | 1472 | } |
1482 | if (zr->card.video_vfe != 0 && | 1473 | } |
1483 | (vfe_name = | 1474 | if (zr->card.video_vfe) { |
1484 | codecid_to_modulename(zr->card.video_vfe)) != NULL) { | 1475 | vfe_name = codecid_to_modulename(zr->card.video_vfe); |
1485 | if ((result = request_module(vfe_name)) < 0) { | 1476 | if (vfe_name) { |
1477 | result = request_module(vfe_name); | ||
1478 | if (result < 0) { | ||
1486 | dprintk(1, | 1479 | dprintk(1, |
1487 | KERN_ERR | 1480 | KERN_ERR |
1488 | "%s: failed to load modules %s: %d\n", | 1481 | "%s: failed to load modules %s: %d\n", |
1489 | ZR_DEVNAME(zr), vfe_name, result); | 1482 | ZR_DEVNAME(zr), vfe_name, result); |
1490 | } | 1483 | } |
1491 | } | 1484 | } |
1485 | } | ||
1492 | 1486 | ||
1493 | /* reset JPEG codec */ | 1487 | /* reset JPEG codec */ |
1494 | jpeg_codec_sleep(zr, 1); | 1488 | jpeg_codec_sleep(zr, 1); |
1495 | jpeg_codec_reset(zr); | 1489 | jpeg_codec_reset(zr); |
1496 | /* video bus enabled */ | 1490 | /* video bus enabled */ |
1497 | /* display codec revision */ | 1491 | /* display codec revision */ |
1498 | if (zr->card.video_codec != 0) { | 1492 | if (zr->card.video_codec != 0) { |
1499 | master_codec = zoran_setup_videocodec(zr, | 1493 | master_codec = zoran_setup_videocodec(zr, zr->card.video_codec); |
1500 | zr->card.video_codec); | 1494 | if (!master_codec) |
1501 | if (!master_codec) | 1495 | goto zr_unreg_i2c; |
1502 | goto zr_unreg_i2c; | 1496 | zr->codec = videocodec_attach(master_codec); |
1503 | zr->codec = videocodec_attach(master_codec); | 1497 | if (!zr->codec) { |
1504 | if (!zr->codec) { | 1498 | dprintk(1, |
1505 | dprintk(1, | 1499 | KERN_ERR |
1506 | KERN_ERR | 1500 | "%s: find_zr36057() - no codec found\n", |
1507 | "%s: find_zr36057() - no codec found\n", | 1501 | ZR_DEVNAME(zr)); |
1508 | ZR_DEVNAME(zr)); | 1502 | goto zr_free_codec; |
1509 | goto zr_free_codec; | ||
1510 | } | ||
1511 | if (zr->codec->type != zr->card.video_codec) { | ||
1512 | dprintk(1, | ||
1513 | KERN_ERR | ||
1514 | "%s: find_zr36057() - wrong codec\n", | ||
1515 | ZR_DEVNAME(zr)); | ||
1516 | goto zr_detach_codec; | ||
1517 | } | ||
1518 | } | 1503 | } |
1519 | if (zr->card.video_vfe != 0) { | 1504 | if (zr->codec->type != zr->card.video_codec) { |
1520 | master_vfe = zoran_setup_videocodec(zr, | 1505 | dprintk(1, |
1521 | zr->card.video_vfe); | 1506 | KERN_ERR |
1522 | if (!master_vfe) | 1507 | "%s: find_zr36057() - wrong codec\n", |
1523 | goto zr_detach_codec; | 1508 | ZR_DEVNAME(zr)); |
1524 | zr->vfe = videocodec_attach(master_vfe); | 1509 | goto zr_detach_codec; |
1525 | if (!zr->vfe) { | 1510 | } |
1526 | dprintk(1, | 1511 | } |
1527 | KERN_ERR | 1512 | if (zr->card.video_vfe != 0) { |
1528 | "%s: find_zr36057() - no VFE found\n", | 1513 | master_vfe = zoran_setup_videocodec(zr, zr->card.video_vfe); |
1529 | ZR_DEVNAME(zr)); | 1514 | if (!master_vfe) |
1530 | goto zr_free_vfe; | 1515 | goto zr_detach_codec; |
1531 | } | 1516 | zr->vfe = videocodec_attach(master_vfe); |
1532 | if (zr->vfe->type != zr->card.video_vfe) { | 1517 | if (!zr->vfe) { |
1533 | dprintk(1, | 1518 | dprintk(1, |
1534 | KERN_ERR | 1519 | KERN_ERR |
1535 | "%s: find_zr36057() = wrong VFE\n", | 1520 | "%s: find_zr36057() - no VFE found\n", |
1536 | ZR_DEVNAME(zr)); | 1521 | ZR_DEVNAME(zr)); |
1537 | goto zr_detach_vfe; | 1522 | goto zr_free_vfe; |
1538 | } | 1523 | } |
1524 | if (zr->vfe->type != zr->card.video_vfe) { | ||
1525 | dprintk(1, | ||
1526 | KERN_ERR | ||
1527 | "%s: find_zr36057() = wrong VFE\n", | ||
1528 | ZR_DEVNAME(zr)); | ||
1529 | goto zr_detach_vfe; | ||
1539 | } | 1530 | } |
1540 | /* Success so keep the pci_dev referenced */ | ||
1541 | pci_dev_get(zr->pci_dev); | ||
1542 | zoran[zoran_num++] = zr; | ||
1543 | continue; | ||
1544 | |||
1545 | // Init errors | ||
1546 | zr_detach_vfe: | ||
1547 | videocodec_detach(zr->vfe); | ||
1548 | zr_free_vfe: | ||
1549 | kfree(master_vfe); | ||
1550 | zr_detach_codec: | ||
1551 | videocodec_detach(zr->codec); | ||
1552 | zr_free_codec: | ||
1553 | kfree(master_codec); | ||
1554 | zr_unreg_i2c: | ||
1555 | zoran_unregister_i2c(zr); | ||
1556 | zr_free_irq: | ||
1557 | btwrite(0, ZR36057_SPGPPCR); | ||
1558 | free_irq(zr->pci_dev->irq, zr); | ||
1559 | zr_unmap: | ||
1560 | iounmap(zr->zr36057_mem); | ||
1561 | zr_free_mem: | ||
1562 | kfree(zr); | ||
1563 | continue; | ||
1564 | } | 1531 | } |
1565 | if (dev) /* Clean up ref count on early exit */ | ||
1566 | pci_dev_put(dev); | ||
1567 | 1532 | ||
1568 | if (zoran_num == 0) { | 1533 | /* take care of Natoma chipset and a revision 1 zr36057 */ |
1569 | dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); | 1534 | if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { |
1535 | zr->jpg_buffers.need_contiguous = 1; | ||
1536 | dprintk(1, | ||
1537 | KERN_INFO | ||
1538 | "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", | ||
1539 | ZR_DEVNAME(zr)); | ||
1570 | } | 1540 | } |
1571 | return zoran_num; | 1541 | |
1542 | if (zr36057_init(zr) < 0) | ||
1543 | goto zr_detach_vfe; | ||
1544 | |||
1545 | zoran_proc_init(zr); | ||
1546 | |||
1547 | pci_set_drvdata(pdev, zr); | ||
1548 | |||
1549 | return 0; | ||
1550 | |||
1551 | zr_detach_vfe: | ||
1552 | videocodec_detach(zr->vfe); | ||
1553 | zr_free_vfe: | ||
1554 | kfree(master_vfe); | ||
1555 | zr_detach_codec: | ||
1556 | videocodec_detach(zr->codec); | ||
1557 | zr_free_codec: | ||
1558 | kfree(master_codec); | ||
1559 | zr_unreg_i2c: | ||
1560 | zoran_unregister_i2c(zr); | ||
1561 | zr_free_irq: | ||
1562 | btwrite(0, ZR36057_SPGPPCR); | ||
1563 | free_irq(zr->pci_dev->irq, zr); | ||
1564 | zr_unmap: | ||
1565 | iounmap(zr->zr36057_mem); | ||
1566 | zr_free_mem: | ||
1567 | kfree(zr); | ||
1568 | |||
1569 | return -ENODEV; | ||
1572 | } | 1570 | } |
1573 | 1571 | ||
1574 | static int __init | 1572 | static struct pci_driver zoran_driver = { |
1575 | init_dc10_cards (void) | 1573 | .name = "zr36067", |
1574 | .id_table = zr36067_pci_tbl, | ||
1575 | .probe = zoran_probe, | ||
1576 | .remove = zoran_remove, | ||
1577 | }; | ||
1578 | |||
1579 | static int __init zoran_init(void) | ||
1576 | { | 1580 | { |
1577 | int i; | 1581 | int res; |
1578 | 1582 | ||
1579 | memset(zoran, 0, sizeof(zoran)); | ||
1580 | printk(KERN_INFO "Zoran MJPEG board driver version %d.%d.%d\n", | 1583 | printk(KERN_INFO "Zoran MJPEG board driver version %d.%d.%d\n", |
1581 | MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION); | 1584 | MAJOR_VERSION, MINOR_VERSION, RELEASE_VERSION); |
1582 | 1585 | ||
1583 | /* Look for cards */ | ||
1584 | if (find_zr36057() < 0) { | ||
1585 | return -EIO; | ||
1586 | } | ||
1587 | if (zoran_num == 0) | ||
1588 | return -ENODEV; | ||
1589 | dprintk(1, KERN_INFO "%s: %d card(s) found\n", ZORAN_NAME, | ||
1590 | zoran_num); | ||
1591 | /* check the parameters we have been given, adjust if necessary */ | 1586 | /* check the parameters we have been given, adjust if necessary */ |
1592 | if (v4l_nbufs < 2) | 1587 | if (v4l_nbufs < 2) |
1593 | v4l_nbufs = 2; | 1588 | v4l_nbufs = 2; |
@@ -1629,37 +1624,22 @@ init_dc10_cards (void) | |||
1629 | ZORAN_NAME); | 1624 | ZORAN_NAME); |
1630 | } | 1625 | } |
1631 | 1626 | ||
1632 | /* take care of Natoma chipset and a revision 1 zr36057 */ | 1627 | res = pci_register_driver(&zoran_driver); |
1633 | for (i = 0; i < zoran_num; i++) { | 1628 | if (res) { |
1634 | struct zoran *zr = zoran[i]; | 1629 | dprintk(1, |
1635 | 1630 | KERN_ERR | |
1636 | if ((pci_pci_problems & PCIPCI_NATOMA) && zr->revision <= 1) { | 1631 | "%s: Unable to register ZR36057 driver\n", |
1637 | zr->jpg_buffers.need_contiguous = 1; | 1632 | ZORAN_NAME); |
1638 | dprintk(1, | 1633 | return res; |
1639 | KERN_INFO | ||
1640 | "%s: ZR36057/Natoma bug, max. buffer size is 128K\n", | ||
1641 | ZR_DEVNAME(zr)); | ||
1642 | } | ||
1643 | |||
1644 | if (zr36057_init(zr) < 0) { | ||
1645 | for (i = 0; i < zoran_num; i++) | ||
1646 | zoran_release(zoran[i]); | ||
1647 | return -EIO; | ||
1648 | } | ||
1649 | zoran_proc_init(zr); | ||
1650 | } | 1634 | } |
1651 | 1635 | ||
1652 | return 0; | 1636 | return 0; |
1653 | } | 1637 | } |
1654 | 1638 | ||
1655 | static void __exit | 1639 | static void __exit zoran_exit(void) |
1656 | unload_dc10_cards (void) | ||
1657 | { | 1640 | { |
1658 | int i; | 1641 | pci_unregister_driver(&zoran_driver); |
1659 | |||
1660 | for (i = 0; i < zoran_num; i++) | ||
1661 | zoran_release(zoran[i]); | ||
1662 | } | 1642 | } |
1663 | 1643 | ||
1664 | module_init(init_dc10_cards); | 1644 | module_init(zoran_init); |
1665 | module_exit(unload_dc10_cards); | 1645 | module_exit(zoran_exit); |
diff --git a/drivers/media/video/zoran/zoran_card.h b/drivers/media/video/zoran/zoran_card.h index e4dc9d29b404..4507bdc5e338 100644 --- a/drivers/media/video/zoran/zoran_card.h +++ b/drivers/media/video/zoran/zoran_card.h | |||
@@ -40,8 +40,6 @@ extern int zr36067_debug; | |||
40 | 40 | ||
41 | /* Anybody who uses more than four? */ | 41 | /* Anybody who uses more than four? */ |
42 | #define BUZ_MAX 4 | 42 | #define BUZ_MAX 4 |
43 | extern int zoran_num; | ||
44 | extern struct zoran *zoran[BUZ_MAX]; | ||
45 | 43 | ||
46 | extern struct video_device zoran_template; | 44 | extern struct video_device zoran_template; |
47 | 45 | ||
diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c index b58b9dda715c..120ef235e63d 100644 --- a/drivers/media/video/zoran/zoran_driver.c +++ b/drivers/media/video/zoran/zoran_driver.c | |||
@@ -1196,83 +1196,54 @@ zoran_close_end_session (struct file *file) | |||
1196 | * Open a zoran card. Right now the flags stuff is just playing | 1196 | * Open a zoran card. Right now the flags stuff is just playing |
1197 | */ | 1197 | */ |
1198 | 1198 | ||
1199 | static int | 1199 | static int zoran_open(struct file *file) |
1200 | zoran_open(struct file *file) | ||
1201 | { | 1200 | { |
1202 | unsigned int minor = video_devdata(file)->minor; | 1201 | struct zoran *zr = video_drvdata(file); |
1203 | struct zoran *zr = NULL; | ||
1204 | struct zoran_fh *fh; | 1202 | struct zoran_fh *fh; |
1205 | int i, res, first_open = 0, have_module_locks = 0; | 1203 | int res, first_open = 0; |
1206 | 1204 | ||
1207 | lock_kernel(); | 1205 | dprintk(2, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", |
1208 | /* find the device */ | 1206 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user + 1); |
1209 | for (i = 0; i < zoran_num; i++) { | ||
1210 | if (zoran[i]->video_dev->minor == minor) { | ||
1211 | zr = zoran[i]; | ||
1212 | break; | ||
1213 | } | ||
1214 | } | ||
1215 | 1207 | ||
1216 | if (!zr) { | 1208 | lock_kernel(); |
1217 | dprintk(1, KERN_ERR "%s: device not found!\n", ZORAN_NAME); | ||
1218 | res = -ENODEV; | ||
1219 | goto open_unlock_and_return; | ||
1220 | } | ||
1221 | 1209 | ||
1222 | /* see fs/device.c - the kernel already locks during open(), | 1210 | /* see fs/device.c - the kernel already locks during open(), |
1223 | * so locking ourselves only causes deadlocks */ | 1211 | * so locking ourselves only causes deadlocks */ |
1224 | /*mutex_lock(&zr->resource_lock);*/ | 1212 | /*mutex_lock(&zr->resource_lock);*/ |
1225 | 1213 | ||
1214 | if (zr->user >= 2048) { | ||
1215 | dprintk(1, KERN_ERR "%s: too many users (%d) on device\n", | ||
1216 | ZR_DEVNAME(zr), zr->user); | ||
1217 | res = -EBUSY; | ||
1218 | goto fail_unlock; | ||
1219 | } | ||
1220 | |||
1226 | if (!zr->decoder) { | 1221 | if (!zr->decoder) { |
1227 | dprintk(1, | 1222 | dprintk(1, |
1228 | KERN_ERR "%s: no TV decoder loaded for device!\n", | 1223 | KERN_ERR "%s: no TV decoder loaded for device!\n", |
1229 | ZR_DEVNAME(zr)); | 1224 | ZR_DEVNAME(zr)); |
1230 | res = -EIO; | 1225 | res = -EIO; |
1231 | goto open_unlock_and_return; | 1226 | goto fail_unlock; |
1232 | } | 1227 | } |
1233 | 1228 | ||
1234 | /* try to grab a module lock */ | ||
1235 | if (!try_module_get(THIS_MODULE)) { | ||
1236 | dprintk(1, | ||
1237 | KERN_ERR | ||
1238 | "%s: failed to acquire my own lock! PANIC!\n", | ||
1239 | ZR_DEVNAME(zr)); | ||
1240 | res = -ENODEV; | ||
1241 | goto open_unlock_and_return; | ||
1242 | } | ||
1243 | if (!try_module_get(zr->decoder->driver->driver.owner)) { | 1229 | if (!try_module_get(zr->decoder->driver->driver.owner)) { |
1244 | dprintk(1, | 1230 | dprintk(1, |
1245 | KERN_ERR | 1231 | KERN_ERR |
1246 | "%s: failed to grab ownership of i2c decoder\n", | 1232 | "%s: failed to grab ownership of video decoder\n", |
1247 | ZR_DEVNAME(zr)); | 1233 | ZR_DEVNAME(zr)); |
1248 | res = -EIO; | 1234 | res = -EIO; |
1249 | module_put(THIS_MODULE); | 1235 | goto fail_unlock; |
1250 | goto open_unlock_and_return; | ||
1251 | } | 1236 | } |
1252 | if (zr->encoder && | 1237 | if (zr->encoder && |
1253 | !try_module_get(zr->encoder->driver->driver.owner)) { | 1238 | !try_module_get(zr->encoder->driver->driver.owner)) { |
1254 | dprintk(1, | 1239 | dprintk(1, |
1255 | KERN_ERR | 1240 | KERN_ERR |
1256 | "%s: failed to grab ownership of i2c encoder\n", | 1241 | "%s: failed to grab ownership of video encoder\n", |
1257 | ZR_DEVNAME(zr)); | 1242 | ZR_DEVNAME(zr)); |
1258 | res = -EIO; | 1243 | res = -EIO; |
1259 | module_put(zr->decoder->driver->driver.owner); | 1244 | goto fail_decoder; |
1260 | module_put(THIS_MODULE); | ||
1261 | goto open_unlock_and_return; | ||
1262 | } | 1245 | } |
1263 | 1246 | ||
1264 | have_module_locks = 1; | ||
1265 | |||
1266 | if (zr->user >= 2048) { | ||
1267 | dprintk(1, KERN_ERR "%s: too many users (%d) on device\n", | ||
1268 | ZR_DEVNAME(zr), zr->user); | ||
1269 | res = -EBUSY; | ||
1270 | goto open_unlock_and_return; | ||
1271 | } | ||
1272 | |||
1273 | dprintk(1, KERN_INFO "%s: zoran_open(%s, pid=[%d]), users(-)=%d\n", | ||
1274 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); | ||
1275 | |||
1276 | /* now, create the open()-specific file_ops struct */ | 1247 | /* now, create the open()-specific file_ops struct */ |
1277 | fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); | 1248 | fh = kzalloc(sizeof(struct zoran_fh), GFP_KERNEL); |
1278 | if (!fh) { | 1249 | if (!fh) { |
@@ -1281,7 +1252,7 @@ zoran_open(struct file *file) | |||
1281 | "%s: zoran_open() - allocation of zoran_fh failed\n", | 1252 | "%s: zoran_open() - allocation of zoran_fh failed\n", |
1282 | ZR_DEVNAME(zr)); | 1253 | ZR_DEVNAME(zr)); |
1283 | res = -ENOMEM; | 1254 | res = -ENOMEM; |
1284 | goto open_unlock_and_return; | 1255 | goto fail_encoder; |
1285 | } | 1256 | } |
1286 | /* used to be BUZ_MAX_WIDTH/HEIGHT, but that gives overflows | 1257 | /* used to be BUZ_MAX_WIDTH/HEIGHT, but that gives overflows |
1287 | * on norm-change! */ | 1258 | * on norm-change! */ |
@@ -1292,9 +1263,8 @@ zoran_open(struct file *file) | |||
1292 | KERN_ERR | 1263 | KERN_ERR |
1293 | "%s: zoran_open() - allocation of overlay_mask failed\n", | 1264 | "%s: zoran_open() - allocation of overlay_mask failed\n", |
1294 | ZR_DEVNAME(zr)); | 1265 | ZR_DEVNAME(zr)); |
1295 | kfree(fh); | ||
1296 | res = -ENOMEM; | 1266 | res = -ENOMEM; |
1297 | goto open_unlock_and_return; | 1267 | goto fail_fh; |
1298 | } | 1268 | } |
1299 | 1269 | ||
1300 | if (zr->user++ == 0) | 1270 | if (zr->user++ == 0) |
@@ -1319,22 +1289,19 @@ zoran_open(struct file *file) | |||
1319 | 1289 | ||
1320 | return 0; | 1290 | return 0; |
1321 | 1291 | ||
1322 | open_unlock_and_return: | 1292 | fail_fh: |
1323 | /* if we grabbed locks, release them accordingly */ | 1293 | kfree(fh); |
1324 | if (have_module_locks) { | 1294 | fail_encoder: |
1325 | module_put(zr->decoder->driver->driver.owner); | 1295 | if (zr->encoder) |
1326 | if (zr->encoder) { | 1296 | module_put(zr->encoder->driver->driver.owner); |
1327 | module_put(zr->encoder->driver->driver.owner); | 1297 | fail_decoder: |
1328 | } | 1298 | module_put(zr->decoder->driver->driver.owner); |
1329 | module_put(THIS_MODULE); | 1299 | fail_unlock: |
1330 | } | ||
1331 | |||
1332 | /* if there's no device found, we didn't obtain the lock either */ | ||
1333 | if (zr) { | ||
1334 | /*mutex_unlock(&zr->resource_lock);*/ | ||
1335 | } | ||
1336 | unlock_kernel(); | 1300 | unlock_kernel(); |
1337 | 1301 | ||
1302 | dprintk(2, KERN_INFO "%s: open failed (%d), users(-)=%d\n", | ||
1303 | ZR_DEVNAME(zr), res, zr->user); | ||
1304 | |||
1338 | return res; | 1305 | return res; |
1339 | } | 1306 | } |
1340 | 1307 | ||
@@ -1344,8 +1311,8 @@ zoran_close(struct file *file) | |||
1344 | struct zoran_fh *fh = file->private_data; | 1311 | struct zoran_fh *fh = file->private_data; |
1345 | struct zoran *zr = fh->zr; | 1312 | struct zoran *zr = fh->zr; |
1346 | 1313 | ||
1347 | dprintk(1, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", | 1314 | dprintk(2, KERN_INFO "%s: zoran_close(%s, pid=[%d]), users(+)=%d\n", |
1348 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user); | 1315 | ZR_DEVNAME(zr), current->comm, task_pid_nr(current), zr->user - 1); |
1349 | 1316 | ||
1350 | /* kernel locks (fs/device.c), so don't do that ourselves | 1317 | /* kernel locks (fs/device.c), so don't do that ourselves |
1351 | * (prevents deadlocks) */ | 1318 | * (prevents deadlocks) */ |
@@ -1391,10 +1358,8 @@ zoran_close(struct file *file) | |||
1391 | 1358 | ||
1392 | /* release locks on the i2c modules */ | 1359 | /* release locks on the i2c modules */ |
1393 | module_put(zr->decoder->driver->driver.owner); | 1360 | module_put(zr->decoder->driver->driver.owner); |
1394 | if (zr->encoder) { | 1361 | if (zr->encoder) |
1395 | module_put(zr->encoder->driver->driver.owner); | 1362 | module_put(zr->encoder->driver->driver.owner); |
1396 | } | ||
1397 | module_put(THIS_MODULE); | ||
1398 | 1363 | ||
1399 | /*mutex_unlock(&zr->resource_lock);*/ | 1364 | /*mutex_unlock(&zr->resource_lock);*/ |
1400 | 1365 | ||
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index 24508e28e3fb..ea9488e7ad6d 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -626,7 +626,6 @@ static int __devinit pcf50633_probe(struct i2c_client *client, | |||
626 | } | 626 | } |
627 | 627 | ||
628 | if (client->irq) { | 628 | if (client->irq) { |
629 | set_irq_handler(client->irq, handle_level_irq); | ||
630 | ret = request_irq(client->irq, pcf50633_irq, | 629 | ret = request_irq(client->irq, pcf50633_irq, |
631 | IRQF_TRIGGER_LOW, "pcf50633", pcf); | 630 | IRQF_TRIGGER_LOW, "pcf50633", pcf); |
632 | 631 | ||
diff --git a/drivers/misc/sgi-xp/xpnet.c b/drivers/misc/sgi-xp/xpnet.c index 7957f525b2f4..6faefcffcb53 100644 --- a/drivers/misc/sgi-xp/xpnet.c +++ b/drivers/misc/sgi-xp/xpnet.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * License. See the file "COPYING" in the main directory of this archive | 3 | * License. See the file "COPYING" in the main directory of this archive |
4 | * for more details. | 4 | * for more details. |
5 | * | 5 | * |
6 | * Copyright (C) 1999-2008 Silicon Graphics, Inc. All rights reserved. | 6 | * Copyright (C) 1999-2009 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /* | 9 | /* |
@@ -551,6 +551,7 @@ xpnet_init(void) | |||
551 | 551 | ||
552 | netif_carrier_off(xpnet_device); | 552 | netif_carrier_off(xpnet_device); |
553 | 553 | ||
554 | xpnet_device->netdev_ops = &xpnet_netdev_ops; | ||
554 | xpnet_device->mtu = XPNET_DEF_MTU; | 555 | xpnet_device->mtu = XPNET_DEF_MTU; |
555 | 556 | ||
556 | /* | 557 | /* |
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 0efa390978bd..99d4b28d52ed 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig | |||
@@ -145,6 +145,16 @@ config MMC_IMX | |||
145 | 145 | ||
146 | If unsure, say N. | 146 | If unsure, say N. |
147 | 147 | ||
148 | config MMC_MXC | ||
149 | tristate "Freescale i.MX2/3 Multimedia Card Interface support" | ||
150 | depends on ARCH_MXC | ||
151 | help | ||
152 | This selects the Freescale i.MX2/3 Multimedia card Interface. | ||
153 | If you have a i.MX platform with a Multimedia Card slot, | ||
154 | say Y or M here. | ||
155 | |||
156 | If unsure, say N. | ||
157 | |||
148 | config MMC_TIFM_SD | 158 | config MMC_TIFM_SD |
149 | tristate "TI Flash Media MMC/SD Interface support (EXPERIMENTAL)" | 159 | tristate "TI Flash Media MMC/SD Interface support (EXPERIMENTAL)" |
150 | depends on EXPERIMENTAL && PCI | 160 | depends on EXPERIMENTAL && PCI |
diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index 98cab84829b8..dedec55861d9 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile | |||
@@ -9,6 +9,7 @@ endif | |||
9 | obj-$(CONFIG_MMC_ARMMMCI) += mmci.o | 9 | obj-$(CONFIG_MMC_ARMMMCI) += mmci.o |
10 | obj-$(CONFIG_MMC_PXA) += pxamci.o | 10 | obj-$(CONFIG_MMC_PXA) += pxamci.o |
11 | obj-$(CONFIG_MMC_IMX) += imxmmc.o | 11 | obj-$(CONFIG_MMC_IMX) += imxmmc.o |
12 | obj-$(CONFIG_MMC_MXC) += mxcmmc.o | ||
12 | obj-$(CONFIG_MMC_SDHCI) += sdhci.o | 13 | obj-$(CONFIG_MMC_SDHCI) += sdhci.o |
13 | obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o | 14 | obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o |
14 | obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o | 15 | obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o |
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 1bcbdd6763ac..2909bbc8ad00 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c | |||
@@ -430,6 +430,8 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
430 | clk = 255; | 430 | clk = 255; |
431 | host->cclk = host->mclk / (2 * (clk + 1)); | 431 | host->cclk = host->mclk / (2 * (clk + 1)); |
432 | } | 432 | } |
433 | if (host->hw_designer == 0x80) | ||
434 | clk |= MCI_FCEN; /* Bug fix in ST IP block */ | ||
433 | clk |= MCI_CLK_ENABLE; | 435 | clk |= MCI_CLK_ENABLE; |
434 | } | 436 | } |
435 | 437 | ||
@@ -440,15 +442,27 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
440 | case MMC_POWER_OFF: | 442 | case MMC_POWER_OFF: |
441 | break; | 443 | break; |
442 | case MMC_POWER_UP: | 444 | case MMC_POWER_UP: |
443 | pwr |= MCI_PWR_UP; | 445 | /* The ST version does not have this, fall through to POWER_ON */ |
444 | break; | 446 | if (host->hw_designer != 0x80) { |
447 | pwr |= MCI_PWR_UP; | ||
448 | break; | ||
449 | } | ||
445 | case MMC_POWER_ON: | 450 | case MMC_POWER_ON: |
446 | pwr |= MCI_PWR_ON; | 451 | pwr |= MCI_PWR_ON; |
447 | break; | 452 | break; |
448 | } | 453 | } |
449 | 454 | ||
450 | if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) | 455 | if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) { |
451 | pwr |= MCI_ROD; | 456 | if (host->hw_designer != 0x80) |
457 | pwr |= MCI_ROD; | ||
458 | else { | ||
459 | /* | ||
460 | * The ST Micro variant use the ROD bit for something | ||
461 | * else and only has OD (Open Drain). | ||
462 | */ | ||
463 | pwr |= MCI_OD; | ||
464 | } | ||
465 | } | ||
452 | 466 | ||
453 | writel(clk, host->base + MMCICLOCK); | 467 | writel(clk, host->base + MMCICLOCK); |
454 | 468 | ||
@@ -500,6 +514,12 @@ static int mmci_probe(struct amba_device *dev, void *id) | |||
500 | } | 514 | } |
501 | 515 | ||
502 | host = mmc_priv(mmc); | 516 | host = mmc_priv(mmc); |
517 | /* Bits 12 thru 19 is the designer */ | ||
518 | host->hw_designer = (dev->periphid >> 12) & 0xff; | ||
519 | /* Bits 20 thru 23 is the revison */ | ||
520 | host->hw_revision = (dev->periphid >> 20) & 0xf; | ||
521 | DBG(host, "designer ID = 0x%02x\n", host->hw_designer); | ||
522 | DBG(host, "revision = 0x%01x\n", host->hw_revision); | ||
503 | host->clk = clk_get(&dev->dev, NULL); | 523 | host->clk = clk_get(&dev->dev, NULL); |
504 | if (IS_ERR(host->clk)) { | 524 | if (IS_ERR(host->clk)) { |
505 | ret = PTR_ERR(host->clk); | 525 | ret = PTR_ERR(host->clk); |
@@ -693,6 +713,15 @@ static struct amba_id mmci_ids[] = { | |||
693 | .id = 0x00041181, | 713 | .id = 0x00041181, |
694 | .mask = 0x000fffff, | 714 | .mask = 0x000fffff, |
695 | }, | 715 | }, |
716 | /* ST Micro variants */ | ||
717 | { | ||
718 | .id = 0x00180180, | ||
719 | .mask = 0x00ffffff, | ||
720 | }, | ||
721 | { | ||
722 | .id = 0x00280180, | ||
723 | .mask = 0x00ffffff, | ||
724 | }, | ||
696 | { 0, 0 }, | 725 | { 0, 0 }, |
697 | }; | 726 | }; |
698 | 727 | ||
diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 0f39c490f022..0441bac1c0ec 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h | |||
@@ -11,13 +11,23 @@ | |||
11 | #define MCI_PWR_OFF 0x00 | 11 | #define MCI_PWR_OFF 0x00 |
12 | #define MCI_PWR_UP 0x02 | 12 | #define MCI_PWR_UP 0x02 |
13 | #define MCI_PWR_ON 0x03 | 13 | #define MCI_PWR_ON 0x03 |
14 | #define MCI_DATA2DIREN (1 << 2) | ||
15 | #define MCI_CMDDIREN (1 << 3) | ||
16 | #define MCI_DATA0DIREN (1 << 4) | ||
17 | #define MCI_DATA31DIREN (1 << 5) | ||
14 | #define MCI_OD (1 << 6) | 18 | #define MCI_OD (1 << 6) |
15 | #define MCI_ROD (1 << 7) | 19 | #define MCI_ROD (1 << 7) |
20 | /* The ST Micro version does not have ROD */ | ||
21 | #define MCI_FBCLKEN (1 << 7) | ||
22 | #define MCI_DATA74DIREN (1 << 8) | ||
16 | 23 | ||
17 | #define MMCICLOCK 0x004 | 24 | #define MMCICLOCK 0x004 |
18 | #define MCI_CLK_ENABLE (1 << 8) | 25 | #define MCI_CLK_ENABLE (1 << 8) |
19 | #define MCI_CLK_PWRSAVE (1 << 9) | 26 | #define MCI_CLK_PWRSAVE (1 << 9) |
20 | #define MCI_CLK_BYPASS (1 << 10) | 27 | #define MCI_CLK_BYPASS (1 << 10) |
28 | #define MCI_WIDE_BUS (1 << 11) | ||
29 | /* HW flow control on the ST Micro version */ | ||
30 | #define MCI_FCEN (1 << 13) | ||
21 | 31 | ||
22 | #define MMCIARGUMENT 0x008 | 32 | #define MMCIARGUMENT 0x008 |
23 | #define MMCICOMMAND 0x00c | 33 | #define MMCICOMMAND 0x00c |
@@ -26,6 +36,10 @@ | |||
26 | #define MCI_CPSM_INTERRUPT (1 << 8) | 36 | #define MCI_CPSM_INTERRUPT (1 << 8) |
27 | #define MCI_CPSM_PENDING (1 << 9) | 37 | #define MCI_CPSM_PENDING (1 << 9) |
28 | #define MCI_CPSM_ENABLE (1 << 10) | 38 | #define MCI_CPSM_ENABLE (1 << 10) |
39 | #define MCI_SDIO_SUSP (1 << 11) | ||
40 | #define MCI_ENCMD_COMPL (1 << 12) | ||
41 | #define MCI_NIEN (1 << 13) | ||
42 | #define MCI_CE_ATACMD (1 << 14) | ||
29 | 43 | ||
30 | #define MMCIRESPCMD 0x010 | 44 | #define MMCIRESPCMD 0x010 |
31 | #define MMCIRESPONSE0 0x014 | 45 | #define MMCIRESPONSE0 0x014 |
@@ -39,6 +53,11 @@ | |||
39 | #define MCI_DPSM_DIRECTION (1 << 1) | 53 | #define MCI_DPSM_DIRECTION (1 << 1) |
40 | #define MCI_DPSM_MODE (1 << 2) | 54 | #define MCI_DPSM_MODE (1 << 2) |
41 | #define MCI_DPSM_DMAENABLE (1 << 3) | 55 | #define MCI_DPSM_DMAENABLE (1 << 3) |
56 | #define MCI_DPSM_BLOCKSIZE (1 << 4) | ||
57 | #define MCI_DPSM_RWSTART (1 << 8) | ||
58 | #define MCI_DPSM_RWSTOP (1 << 9) | ||
59 | #define MCI_DPSM_RWMOD (1 << 10) | ||
60 | #define MCI_DPSM_SDIOEN (1 << 11) | ||
42 | 61 | ||
43 | #define MMCIDATACNT 0x030 | 62 | #define MMCIDATACNT 0x030 |
44 | #define MMCISTATUS 0x034 | 63 | #define MMCISTATUS 0x034 |
@@ -63,6 +82,8 @@ | |||
63 | #define MCI_RXFIFOEMPTY (1 << 19) | 82 | #define MCI_RXFIFOEMPTY (1 << 19) |
64 | #define MCI_TXDATAAVLBL (1 << 20) | 83 | #define MCI_TXDATAAVLBL (1 << 20) |
65 | #define MCI_RXDATAAVLBL (1 << 21) | 84 | #define MCI_RXDATAAVLBL (1 << 21) |
85 | #define MCI_SDIOIT (1 << 22) | ||
86 | #define MCI_CEATAEND (1 << 23) | ||
66 | 87 | ||
67 | #define MMCICLEAR 0x038 | 88 | #define MMCICLEAR 0x038 |
68 | #define MCI_CMDCRCFAILCLR (1 << 0) | 89 | #define MCI_CMDCRCFAILCLR (1 << 0) |
@@ -75,6 +96,8 @@ | |||
75 | #define MCI_CMDSENTCLR (1 << 7) | 96 | #define MCI_CMDSENTCLR (1 << 7) |
76 | #define MCI_DATAENDCLR (1 << 8) | 97 | #define MCI_DATAENDCLR (1 << 8) |
77 | #define MCI_DATABLOCKENDCLR (1 << 10) | 98 | #define MCI_DATABLOCKENDCLR (1 << 10) |
99 | #define MCI_SDIOITC (1 << 22) | ||
100 | #define MCI_CEATAENDC (1 << 23) | ||
78 | 101 | ||
79 | #define MMCIMASK0 0x03c | 102 | #define MMCIMASK0 0x03c |
80 | #define MCI_CMDCRCFAILMASK (1 << 0) | 103 | #define MCI_CMDCRCFAILMASK (1 << 0) |
@@ -98,6 +121,8 @@ | |||
98 | #define MCI_RXFIFOEMPTYMASK (1 << 19) | 121 | #define MCI_RXFIFOEMPTYMASK (1 << 19) |
99 | #define MCI_TXDATAAVLBLMASK (1 << 20) | 122 | #define MCI_TXDATAAVLBLMASK (1 << 20) |
100 | #define MCI_RXDATAAVLBLMASK (1 << 21) | 123 | #define MCI_RXDATAAVLBLMASK (1 << 21) |
124 | #define MCI_SDIOITMASK (1 << 22) | ||
125 | #define MCI_CEATAENDMASK (1 << 23) | ||
101 | 126 | ||
102 | #define MMCIMASK1 0x040 | 127 | #define MMCIMASK1 0x040 |
103 | #define MMCIFIFOCNT 0x048 | 128 | #define MMCIFIFOCNT 0x048 |
@@ -136,6 +161,9 @@ struct mmci_host { | |||
136 | u32 pwr; | 161 | u32 pwr; |
137 | struct mmc_platform_data *plat; | 162 | struct mmc_platform_data *plat; |
138 | 163 | ||
164 | u8 hw_designer; | ||
165 | u8 hw_revision:4; | ||
166 | |||
139 | struct timer_list timer; | 167 | struct timer_list timer; |
140 | unsigned int oldstat; | 168 | unsigned int oldstat; |
141 | 169 | ||
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c new file mode 100644 index 000000000000..dda0be4e25dc --- /dev/null +++ b/drivers/mmc/host/mxcmmc.c | |||
@@ -0,0 +1,880 @@ | |||
1 | /* | ||
2 | * linux/drivers/mmc/host/mxcmmc.c - Freescale i.MX MMCI driver | ||
3 | * | ||
4 | * This is a driver for the SDHC controller found in Freescale MX2/MX3 | ||
5 | * SoCs. It is basically the same hardware as found on MX1 (imxmmc.c). | ||
6 | * Unlike the hardware found on MX1, this hardware just works and does | ||
7 | * not need all the quirks found in imxmmc.c, hence the seperate driver. | ||
8 | * | ||
9 | * Copyright (C) 2008 Sascha Hauer, Pengutronix <s.hauer@pengutronix.de> | ||
10 | * Copyright (C) 2006 Pavel Pisa, PiKRON <ppisa@pikron.com> | ||
11 | * | ||
12 | * derived from pxamci.c by Russell King | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or modify | ||
15 | * it under the terms of the GNU General Public License version 2 as | ||
16 | * published by the Free Software Foundation. | ||
17 | * | ||
18 | */ | ||
19 | |||
20 | #include <linux/module.h> | ||
21 | #include <linux/init.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/interrupt.h> | ||
25 | #include <linux/irq.h> | ||
26 | #include <linux/blkdev.h> | ||
27 | #include <linux/dma-mapping.h> | ||
28 | #include <linux/mmc/host.h> | ||
29 | #include <linux/mmc/card.h> | ||
30 | #include <linux/delay.h> | ||
31 | #include <linux/clk.h> | ||
32 | #include <linux/io.h> | ||
33 | #include <linux/gpio.h> | ||
34 | |||
35 | #include <asm/dma.h> | ||
36 | #include <asm/irq.h> | ||
37 | #include <asm/sizes.h> | ||
38 | #include <mach/mmc.h> | ||
39 | |||
40 | #ifdef CONFIG_ARCH_MX2 | ||
41 | #include <mach/dma-mx1-mx2.h> | ||
42 | #define HAS_DMA | ||
43 | #endif | ||
44 | |||
45 | #define DRIVER_NAME "imx-mmc" | ||
46 | |||
47 | #define MMC_REG_STR_STP_CLK 0x00 | ||
48 | #define MMC_REG_STATUS 0x04 | ||
49 | #define MMC_REG_CLK_RATE 0x08 | ||
50 | #define MMC_REG_CMD_DAT_CONT 0x0C | ||
51 | #define MMC_REG_RES_TO 0x10 | ||
52 | #define MMC_REG_READ_TO 0x14 | ||
53 | #define MMC_REG_BLK_LEN 0x18 | ||
54 | #define MMC_REG_NOB 0x1C | ||
55 | #define MMC_REG_REV_NO 0x20 | ||
56 | #define MMC_REG_INT_CNTR 0x24 | ||
57 | #define MMC_REG_CMD 0x28 | ||
58 | #define MMC_REG_ARG 0x2C | ||
59 | #define MMC_REG_RES_FIFO 0x34 | ||
60 | #define MMC_REG_BUFFER_ACCESS 0x38 | ||
61 | |||
62 | #define STR_STP_CLK_RESET (1 << 3) | ||
63 | #define STR_STP_CLK_START_CLK (1 << 1) | ||
64 | #define STR_STP_CLK_STOP_CLK (1 << 0) | ||
65 | |||
66 | #define STATUS_CARD_INSERTION (1 << 31) | ||
67 | #define STATUS_CARD_REMOVAL (1 << 30) | ||
68 | #define STATUS_YBUF_EMPTY (1 << 29) | ||
69 | #define STATUS_XBUF_EMPTY (1 << 28) | ||
70 | #define STATUS_YBUF_FULL (1 << 27) | ||
71 | #define STATUS_XBUF_FULL (1 << 26) | ||
72 | #define STATUS_BUF_UND_RUN (1 << 25) | ||
73 | #define STATUS_BUF_OVFL (1 << 24) | ||
74 | #define STATUS_SDIO_INT_ACTIVE (1 << 14) | ||
75 | #define STATUS_END_CMD_RESP (1 << 13) | ||
76 | #define STATUS_WRITE_OP_DONE (1 << 12) | ||
77 | #define STATUS_DATA_TRANS_DONE (1 << 11) | ||
78 | #define STATUS_READ_OP_DONE (1 << 11) | ||
79 | #define STATUS_WR_CRC_ERROR_CODE_MASK (3 << 10) | ||
80 | #define STATUS_CARD_BUS_CLK_RUN (1 << 8) | ||
81 | #define STATUS_BUF_READ_RDY (1 << 7) | ||
82 | #define STATUS_BUF_WRITE_RDY (1 << 6) | ||
83 | #define STATUS_RESP_CRC_ERR (1 << 5) | ||
84 | #define STATUS_CRC_READ_ERR (1 << 3) | ||
85 | #define STATUS_CRC_WRITE_ERR (1 << 2) | ||
86 | #define STATUS_TIME_OUT_RESP (1 << 1) | ||
87 | #define STATUS_TIME_OUT_READ (1 << 0) | ||
88 | #define STATUS_ERR_MASK 0x2f | ||
89 | |||
90 | #define CMD_DAT_CONT_CMD_RESP_LONG_OFF (1 << 12) | ||
91 | #define CMD_DAT_CONT_STOP_READWAIT (1 << 11) | ||
92 | #define CMD_DAT_CONT_START_READWAIT (1 << 10) | ||
93 | #define CMD_DAT_CONT_BUS_WIDTH_4 (2 << 8) | ||
94 | #define CMD_DAT_CONT_INIT (1 << 7) | ||
95 | #define CMD_DAT_CONT_WRITE (1 << 4) | ||
96 | #define CMD_DAT_CONT_DATA_ENABLE (1 << 3) | ||
97 | #define CMD_DAT_CONT_RESPONSE_48BIT_CRC (1 << 0) | ||
98 | #define CMD_DAT_CONT_RESPONSE_136BIT (2 << 0) | ||
99 | #define CMD_DAT_CONT_RESPONSE_48BIT (3 << 0) | ||
100 | |||
101 | #define INT_SDIO_INT_WKP_EN (1 << 18) | ||
102 | #define INT_CARD_INSERTION_WKP_EN (1 << 17) | ||
103 | #define INT_CARD_REMOVAL_WKP_EN (1 << 16) | ||
104 | #define INT_CARD_INSERTION_EN (1 << 15) | ||
105 | #define INT_CARD_REMOVAL_EN (1 << 14) | ||
106 | #define INT_SDIO_IRQ_EN (1 << 13) | ||
107 | #define INT_DAT0_EN (1 << 12) | ||
108 | #define INT_BUF_READ_EN (1 << 4) | ||
109 | #define INT_BUF_WRITE_EN (1 << 3) | ||
110 | #define INT_END_CMD_RES_EN (1 << 2) | ||
111 | #define INT_WRITE_OP_DONE_EN (1 << 1) | ||
112 | #define INT_READ_OP_EN (1 << 0) | ||
113 | |||
114 | struct mxcmci_host { | ||
115 | struct mmc_host *mmc; | ||
116 | struct resource *res; | ||
117 | void __iomem *base; | ||
118 | int irq; | ||
119 | int detect_irq; | ||
120 | int dma; | ||
121 | int do_dma; | ||
122 | unsigned int power_mode; | ||
123 | struct imxmmc_platform_data *pdata; | ||
124 | |||
125 | struct mmc_request *req; | ||
126 | struct mmc_command *cmd; | ||
127 | struct mmc_data *data; | ||
128 | |||
129 | unsigned int dma_nents; | ||
130 | unsigned int datasize; | ||
131 | unsigned int dma_dir; | ||
132 | |||
133 | u16 rev_no; | ||
134 | unsigned int cmdat; | ||
135 | |||
136 | struct clk *clk; | ||
137 | |||
138 | int clock; | ||
139 | |||
140 | struct work_struct datawork; | ||
141 | }; | ||
142 | |||
143 | static inline int mxcmci_use_dma(struct mxcmci_host *host) | ||
144 | { | ||
145 | return host->do_dma; | ||
146 | } | ||
147 | |||
148 | static void mxcmci_softreset(struct mxcmci_host *host) | ||
149 | { | ||
150 | int i; | ||
151 | |||
152 | /* reset sequence */ | ||
153 | writew(STR_STP_CLK_RESET, host->base + MMC_REG_STR_STP_CLK); | ||
154 | writew(STR_STP_CLK_RESET | STR_STP_CLK_START_CLK, | ||
155 | host->base + MMC_REG_STR_STP_CLK); | ||
156 | |||
157 | for (i = 0; i < 8; i++) | ||
158 | writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); | ||
159 | |||
160 | writew(0xff, host->base + MMC_REG_RES_TO); | ||
161 | } | ||
162 | |||
163 | static void mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data) | ||
164 | { | ||
165 | unsigned int nob = data->blocks; | ||
166 | unsigned int blksz = data->blksz; | ||
167 | unsigned int datasize = nob * blksz; | ||
168 | #ifdef HAS_DMA | ||
169 | struct scatterlist *sg; | ||
170 | int i; | ||
171 | #endif | ||
172 | if (data->flags & MMC_DATA_STREAM) | ||
173 | nob = 0xffff; | ||
174 | |||
175 | host->data = data; | ||
176 | data->bytes_xfered = 0; | ||
177 | |||
178 | writew(nob, host->base + MMC_REG_NOB); | ||
179 | writew(blksz, host->base + MMC_REG_BLK_LEN); | ||
180 | host->datasize = datasize; | ||
181 | |||
182 | #ifdef HAS_DMA | ||
183 | for_each_sg(data->sg, sg, data->sg_len, i) { | ||
184 | if (sg->offset & 3 || sg->length & 3) { | ||
185 | host->do_dma = 0; | ||
186 | return; | ||
187 | } | ||
188 | } | ||
189 | |||
190 | if (data->flags & MMC_DATA_READ) { | ||
191 | host->dma_dir = DMA_FROM_DEVICE; | ||
192 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, | ||
193 | data->sg_len, host->dma_dir); | ||
194 | |||
195 | imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize, | ||
196 | host->res->start + MMC_REG_BUFFER_ACCESS, | ||
197 | DMA_MODE_READ); | ||
198 | } else { | ||
199 | host->dma_dir = DMA_TO_DEVICE; | ||
200 | host->dma_nents = dma_map_sg(mmc_dev(host->mmc), data->sg, | ||
201 | data->sg_len, host->dma_dir); | ||
202 | |||
203 | imx_dma_setup_sg(host->dma, data->sg, host->dma_nents, datasize, | ||
204 | host->res->start + MMC_REG_BUFFER_ACCESS, | ||
205 | DMA_MODE_WRITE); | ||
206 | } | ||
207 | |||
208 | wmb(); | ||
209 | |||
210 | imx_dma_enable(host->dma); | ||
211 | #endif /* HAS_DMA */ | ||
212 | } | ||
213 | |||
214 | static int mxcmci_start_cmd(struct mxcmci_host *host, struct mmc_command *cmd, | ||
215 | unsigned int cmdat) | ||
216 | { | ||
217 | WARN_ON(host->cmd != NULL); | ||
218 | host->cmd = cmd; | ||
219 | |||
220 | switch (mmc_resp_type(cmd)) { | ||
221 | case MMC_RSP_R1: /* short CRC, OPCODE */ | ||
222 | case MMC_RSP_R1B:/* short CRC, OPCODE, BUSY */ | ||
223 | cmdat |= CMD_DAT_CONT_RESPONSE_48BIT_CRC; | ||
224 | break; | ||
225 | case MMC_RSP_R2: /* long 136 bit + CRC */ | ||
226 | cmdat |= CMD_DAT_CONT_RESPONSE_136BIT; | ||
227 | break; | ||
228 | case MMC_RSP_R3: /* short */ | ||
229 | cmdat |= CMD_DAT_CONT_RESPONSE_48BIT; | ||
230 | break; | ||
231 | case MMC_RSP_NONE: | ||
232 | break; | ||
233 | default: | ||
234 | dev_err(mmc_dev(host->mmc), "unhandled response type 0x%x\n", | ||
235 | mmc_resp_type(cmd)); | ||
236 | cmd->error = -EINVAL; | ||
237 | return -EINVAL; | ||
238 | } | ||
239 | |||
240 | if (mxcmci_use_dma(host)) | ||
241 | writel(INT_READ_OP_EN | INT_WRITE_OP_DONE_EN | | ||
242 | INT_END_CMD_RES_EN, | ||
243 | host->base + MMC_REG_INT_CNTR); | ||
244 | else | ||
245 | writel(INT_END_CMD_RES_EN, host->base + MMC_REG_INT_CNTR); | ||
246 | |||
247 | writew(cmd->opcode, host->base + MMC_REG_CMD); | ||
248 | writel(cmd->arg, host->base + MMC_REG_ARG); | ||
249 | writew(cmdat, host->base + MMC_REG_CMD_DAT_CONT); | ||
250 | |||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | static void mxcmci_finish_request(struct mxcmci_host *host, | ||
255 | struct mmc_request *req) | ||
256 | { | ||
257 | writel(0, host->base + MMC_REG_INT_CNTR); | ||
258 | |||
259 | host->req = NULL; | ||
260 | host->cmd = NULL; | ||
261 | host->data = NULL; | ||
262 | |||
263 | mmc_request_done(host->mmc, req); | ||
264 | } | ||
265 | |||
266 | static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat) | ||
267 | { | ||
268 | struct mmc_data *data = host->data; | ||
269 | int data_error; | ||
270 | |||
271 | #ifdef HAS_DMA | ||
272 | if (mxcmci_use_dma(host)) { | ||
273 | imx_dma_disable(host->dma); | ||
274 | dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_nents, | ||
275 | host->dma_dir); | ||
276 | } | ||
277 | #endif | ||
278 | |||
279 | if (stat & STATUS_ERR_MASK) { | ||
280 | dev_dbg(mmc_dev(host->mmc), "request failed. status: 0x%08x\n", | ||
281 | stat); | ||
282 | if (stat & STATUS_CRC_READ_ERR) { | ||
283 | data->error = -EILSEQ; | ||
284 | } else if (stat & STATUS_CRC_WRITE_ERR) { | ||
285 | u32 err_code = (stat >> 9) & 0x3; | ||
286 | if (err_code == 2) /* No CRC response */ | ||
287 | data->error = -ETIMEDOUT; | ||
288 | else | ||
289 | data->error = -EILSEQ; | ||
290 | } else if (stat & STATUS_TIME_OUT_READ) { | ||
291 | data->error = -ETIMEDOUT; | ||
292 | } else { | ||
293 | data->error = -EIO; | ||
294 | } | ||
295 | } else { | ||
296 | data->bytes_xfered = host->datasize; | ||
297 | } | ||
298 | |||
299 | data_error = data->error; | ||
300 | |||
301 | host->data = NULL; | ||
302 | |||
303 | return data_error; | ||
304 | } | ||
305 | |||
306 | static void mxcmci_read_response(struct mxcmci_host *host, unsigned int stat) | ||
307 | { | ||
308 | struct mmc_command *cmd = host->cmd; | ||
309 | int i; | ||
310 | u32 a, b, c; | ||
311 | |||
312 | if (!cmd) | ||
313 | return; | ||
314 | |||
315 | if (stat & STATUS_TIME_OUT_RESP) { | ||
316 | dev_dbg(mmc_dev(host->mmc), "CMD TIMEOUT\n"); | ||
317 | cmd->error = -ETIMEDOUT; | ||
318 | } else if (stat & STATUS_RESP_CRC_ERR && cmd->flags & MMC_RSP_CRC) { | ||
319 | dev_dbg(mmc_dev(host->mmc), "cmd crc error\n"); | ||
320 | cmd->error = -EILSEQ; | ||
321 | } | ||
322 | |||
323 | if (cmd->flags & MMC_RSP_PRESENT) { | ||
324 | if (cmd->flags & MMC_RSP_136) { | ||
325 | for (i = 0; i < 4; i++) { | ||
326 | a = readw(host->base + MMC_REG_RES_FIFO); | ||
327 | b = readw(host->base + MMC_REG_RES_FIFO); | ||
328 | cmd->resp[i] = a << 16 | b; | ||
329 | } | ||
330 | } else { | ||
331 | a = readw(host->base + MMC_REG_RES_FIFO); | ||
332 | b = readw(host->base + MMC_REG_RES_FIFO); | ||
333 | c = readw(host->base + MMC_REG_RES_FIFO); | ||
334 | cmd->resp[0] = a << 24 | b << 8 | c >> 8; | ||
335 | } | ||
336 | } | ||
337 | } | ||
338 | |||
339 | static int mxcmci_poll_status(struct mxcmci_host *host, u32 mask) | ||
340 | { | ||
341 | u32 stat; | ||
342 | unsigned long timeout = jiffies + HZ; | ||
343 | |||
344 | do { | ||
345 | stat = readl(host->base + MMC_REG_STATUS); | ||
346 | if (stat & STATUS_ERR_MASK) | ||
347 | return stat; | ||
348 | if (time_after(jiffies, timeout)) | ||
349 | return STATUS_TIME_OUT_READ; | ||
350 | if (stat & mask) | ||
351 | return 0; | ||
352 | cpu_relax(); | ||
353 | } while (1); | ||
354 | } | ||
355 | |||
356 | static int mxcmci_pull(struct mxcmci_host *host, void *_buf, int bytes) | ||
357 | { | ||
358 | unsigned int stat; | ||
359 | u32 *buf = _buf; | ||
360 | |||
361 | while (bytes > 3) { | ||
362 | stat = mxcmci_poll_status(host, | ||
363 | STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE); | ||
364 | if (stat) | ||
365 | return stat; | ||
366 | *buf++ = readl(host->base + MMC_REG_BUFFER_ACCESS); | ||
367 | bytes -= 4; | ||
368 | } | ||
369 | |||
370 | if (bytes) { | ||
371 | u8 *b = (u8 *)buf; | ||
372 | u32 tmp; | ||
373 | |||
374 | stat = mxcmci_poll_status(host, | ||
375 | STATUS_BUF_READ_RDY | STATUS_READ_OP_DONE); | ||
376 | if (stat) | ||
377 | return stat; | ||
378 | tmp = readl(host->base + MMC_REG_BUFFER_ACCESS); | ||
379 | memcpy(b, &tmp, bytes); | ||
380 | } | ||
381 | |||
382 | return 0; | ||
383 | } | ||
384 | |||
385 | static int mxcmci_push(struct mxcmci_host *host, void *_buf, int bytes) | ||
386 | { | ||
387 | unsigned int stat; | ||
388 | u32 *buf = _buf; | ||
389 | |||
390 | while (bytes > 3) { | ||
391 | stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); | ||
392 | if (stat) | ||
393 | return stat; | ||
394 | writel(*buf++, host->base + MMC_REG_BUFFER_ACCESS); | ||
395 | bytes -= 4; | ||
396 | } | ||
397 | |||
398 | if (bytes) { | ||
399 | u8 *b = (u8 *)buf; | ||
400 | u32 tmp; | ||
401 | |||
402 | stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); | ||
403 | if (stat) | ||
404 | return stat; | ||
405 | |||
406 | memcpy(&tmp, b, bytes); | ||
407 | writel(tmp, host->base + MMC_REG_BUFFER_ACCESS); | ||
408 | } | ||
409 | |||
410 | stat = mxcmci_poll_status(host, STATUS_BUF_WRITE_RDY); | ||
411 | if (stat) | ||
412 | return stat; | ||
413 | |||
414 | return 0; | ||
415 | } | ||
416 | |||
417 | static int mxcmci_transfer_data(struct mxcmci_host *host) | ||
418 | { | ||
419 | struct mmc_data *data = host->req->data; | ||
420 | struct scatterlist *sg; | ||
421 | int stat, i; | ||
422 | |||
423 | host->datasize = 0; | ||
424 | |||
425 | host->data = data; | ||
426 | host->datasize = 0; | ||
427 | |||
428 | if (data->flags & MMC_DATA_READ) { | ||
429 | for_each_sg(data->sg, sg, data->sg_len, i) { | ||
430 | stat = mxcmci_pull(host, sg_virt(sg), sg->length); | ||
431 | if (stat) | ||
432 | return stat; | ||
433 | host->datasize += sg->length; | ||
434 | } | ||
435 | } else { | ||
436 | for_each_sg(data->sg, sg, data->sg_len, i) { | ||
437 | stat = mxcmci_push(host, sg_virt(sg), sg->length); | ||
438 | if (stat) | ||
439 | return stat; | ||
440 | host->datasize += sg->length; | ||
441 | } | ||
442 | stat = mxcmci_poll_status(host, STATUS_WRITE_OP_DONE); | ||
443 | if (stat) | ||
444 | return stat; | ||
445 | } | ||
446 | return 0; | ||
447 | } | ||
448 | |||
449 | static void mxcmci_datawork(struct work_struct *work) | ||
450 | { | ||
451 | struct mxcmci_host *host = container_of(work, struct mxcmci_host, | ||
452 | datawork); | ||
453 | int datastat = mxcmci_transfer_data(host); | ||
454 | mxcmci_finish_data(host, datastat); | ||
455 | |||
456 | if (host->req->stop) { | ||
457 | if (mxcmci_start_cmd(host, host->req->stop, 0)) { | ||
458 | mxcmci_finish_request(host, host->req); | ||
459 | return; | ||
460 | } | ||
461 | } else { | ||
462 | mxcmci_finish_request(host, host->req); | ||
463 | } | ||
464 | } | ||
465 | |||
466 | #ifdef HAS_DMA | ||
467 | static void mxcmci_data_done(struct mxcmci_host *host, unsigned int stat) | ||
468 | { | ||
469 | struct mmc_data *data = host->data; | ||
470 | int data_error; | ||
471 | |||
472 | if (!data) | ||
473 | return; | ||
474 | |||
475 | data_error = mxcmci_finish_data(host, stat); | ||
476 | |||
477 | mxcmci_read_response(host, stat); | ||
478 | host->cmd = NULL; | ||
479 | |||
480 | if (host->req->stop) { | ||
481 | if (mxcmci_start_cmd(host, host->req->stop, 0)) { | ||
482 | mxcmci_finish_request(host, host->req); | ||
483 | return; | ||
484 | } | ||
485 | } else { | ||
486 | mxcmci_finish_request(host, host->req); | ||
487 | } | ||
488 | } | ||
489 | #endif /* HAS_DMA */ | ||
490 | |||
491 | static void mxcmci_cmd_done(struct mxcmci_host *host, unsigned int stat) | ||
492 | { | ||
493 | mxcmci_read_response(host, stat); | ||
494 | host->cmd = NULL; | ||
495 | |||
496 | if (!host->data && host->req) { | ||
497 | mxcmci_finish_request(host, host->req); | ||
498 | return; | ||
499 | } | ||
500 | |||
501 | /* For the DMA case the DMA engine handles the data transfer | ||
502 | * automatically. For non DMA we have to to it ourselves. | ||
503 | * Don't do it in interrupt context though. | ||
504 | */ | ||
505 | if (!mxcmci_use_dma(host) && host->data) | ||
506 | schedule_work(&host->datawork); | ||
507 | |||
508 | } | ||
509 | |||
510 | static irqreturn_t mxcmci_irq(int irq, void *devid) | ||
511 | { | ||
512 | struct mxcmci_host *host = devid; | ||
513 | u32 stat; | ||
514 | |||
515 | stat = readl(host->base + MMC_REG_STATUS); | ||
516 | writel(stat, host->base + MMC_REG_STATUS); | ||
517 | |||
518 | dev_dbg(mmc_dev(host->mmc), "%s: 0x%08x\n", __func__, stat); | ||
519 | |||
520 | if (stat & STATUS_END_CMD_RESP) | ||
521 | mxcmci_cmd_done(host, stat); | ||
522 | #ifdef HAS_DMA | ||
523 | if (mxcmci_use_dma(host) && | ||
524 | (stat & (STATUS_DATA_TRANS_DONE | STATUS_WRITE_OP_DONE))) | ||
525 | mxcmci_data_done(host, stat); | ||
526 | #endif | ||
527 | return IRQ_HANDLED; | ||
528 | } | ||
529 | |||
530 | static void mxcmci_request(struct mmc_host *mmc, struct mmc_request *req) | ||
531 | { | ||
532 | struct mxcmci_host *host = mmc_priv(mmc); | ||
533 | unsigned int cmdat = host->cmdat; | ||
534 | |||
535 | WARN_ON(host->req != NULL); | ||
536 | |||
537 | host->req = req; | ||
538 | host->cmdat &= ~CMD_DAT_CONT_INIT; | ||
539 | #ifdef HAS_DMA | ||
540 | host->do_dma = 1; | ||
541 | #endif | ||
542 | if (req->data) { | ||
543 | mxcmci_setup_data(host, req->data); | ||
544 | |||
545 | cmdat |= CMD_DAT_CONT_DATA_ENABLE; | ||
546 | |||
547 | if (req->data->flags & MMC_DATA_WRITE) | ||
548 | cmdat |= CMD_DAT_CONT_WRITE; | ||
549 | } | ||
550 | |||
551 | if (mxcmci_start_cmd(host, req->cmd, cmdat)) | ||
552 | mxcmci_finish_request(host, req); | ||
553 | } | ||
554 | |||
555 | static void mxcmci_set_clk_rate(struct mxcmci_host *host, unsigned int clk_ios) | ||
556 | { | ||
557 | unsigned int divider; | ||
558 | int prescaler = 0; | ||
559 | unsigned int clk_in = clk_get_rate(host->clk); | ||
560 | |||
561 | while (prescaler <= 0x800) { | ||
562 | for (divider = 1; divider <= 0xF; divider++) { | ||
563 | int x; | ||
564 | |||
565 | x = (clk_in / (divider + 1)); | ||
566 | |||
567 | if (prescaler) | ||
568 | x /= (prescaler * 2); | ||
569 | |||
570 | if (x <= clk_ios) | ||
571 | break; | ||
572 | } | ||
573 | if (divider < 0x10) | ||
574 | break; | ||
575 | |||
576 | if (prescaler == 0) | ||
577 | prescaler = 1; | ||
578 | else | ||
579 | prescaler <<= 1; | ||
580 | } | ||
581 | |||
582 | writew((prescaler << 4) | divider, host->base + MMC_REG_CLK_RATE); | ||
583 | |||
584 | dev_dbg(mmc_dev(host->mmc), "scaler: %d divider: %d in: %d out: %d\n", | ||
585 | prescaler, divider, clk_in, clk_ios); | ||
586 | } | ||
587 | |||
588 | static void mxcmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | ||
589 | { | ||
590 | struct mxcmci_host *host = mmc_priv(mmc); | ||
591 | #ifdef HAS_DMA | ||
592 | unsigned int blen; | ||
593 | /* | ||
594 | * use burstlen of 64 in 4 bit mode (--> reg value 0) | ||
595 | * use burstlen of 16 in 1 bit mode (--> reg value 16) | ||
596 | */ | ||
597 | if (ios->bus_width == MMC_BUS_WIDTH_4) | ||
598 | blen = 0; | ||
599 | else | ||
600 | blen = 16; | ||
601 | |||
602 | imx_dma_config_burstlen(host->dma, blen); | ||
603 | #endif | ||
604 | if (ios->bus_width == MMC_BUS_WIDTH_4) | ||
605 | host->cmdat |= CMD_DAT_CONT_BUS_WIDTH_4; | ||
606 | else | ||
607 | host->cmdat &= ~CMD_DAT_CONT_BUS_WIDTH_4; | ||
608 | |||
609 | if (host->power_mode != ios->power_mode) { | ||
610 | if (host->pdata && host->pdata->setpower) | ||
611 | host->pdata->setpower(mmc_dev(mmc), ios->vdd); | ||
612 | host->power_mode = ios->power_mode; | ||
613 | if (ios->power_mode == MMC_POWER_ON) | ||
614 | host->cmdat |= CMD_DAT_CONT_INIT; | ||
615 | } | ||
616 | |||
617 | if (ios->clock) { | ||
618 | mxcmci_set_clk_rate(host, ios->clock); | ||
619 | writew(STR_STP_CLK_START_CLK, host->base + MMC_REG_STR_STP_CLK); | ||
620 | } else { | ||
621 | writew(STR_STP_CLK_STOP_CLK, host->base + MMC_REG_STR_STP_CLK); | ||
622 | } | ||
623 | |||
624 | host->clock = ios->clock; | ||
625 | } | ||
626 | |||
627 | static irqreturn_t mxcmci_detect_irq(int irq, void *data) | ||
628 | { | ||
629 | struct mmc_host *mmc = data; | ||
630 | |||
631 | dev_dbg(mmc_dev(mmc), "%s\n", __func__); | ||
632 | |||
633 | mmc_detect_change(mmc, msecs_to_jiffies(250)); | ||
634 | return IRQ_HANDLED; | ||
635 | } | ||
636 | |||
637 | static int mxcmci_get_ro(struct mmc_host *mmc) | ||
638 | { | ||
639 | struct mxcmci_host *host = mmc_priv(mmc); | ||
640 | |||
641 | if (host->pdata && host->pdata->get_ro) | ||
642 | return !!host->pdata->get_ro(mmc_dev(mmc)); | ||
643 | /* | ||
644 | * Board doesn't support read only detection; let the mmc core | ||
645 | * decide what to do. | ||
646 | */ | ||
647 | return -ENOSYS; | ||
648 | } | ||
649 | |||
650 | |||
651 | static const struct mmc_host_ops mxcmci_ops = { | ||
652 | .request = mxcmci_request, | ||
653 | .set_ios = mxcmci_set_ios, | ||
654 | .get_ro = mxcmci_get_ro, | ||
655 | }; | ||
656 | |||
657 | static int mxcmci_probe(struct platform_device *pdev) | ||
658 | { | ||
659 | struct mmc_host *mmc; | ||
660 | struct mxcmci_host *host = NULL; | ||
661 | struct resource *r; | ||
662 | int ret = 0, irq; | ||
663 | |||
664 | printk(KERN_INFO "i.MX SDHC driver\n"); | ||
665 | |||
666 | r = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
667 | irq = platform_get_irq(pdev, 0); | ||
668 | if (!r || irq < 0) | ||
669 | return -EINVAL; | ||
670 | |||
671 | r = request_mem_region(r->start, resource_size(r), pdev->name); | ||
672 | if (!r) | ||
673 | return -EBUSY; | ||
674 | |||
675 | mmc = mmc_alloc_host(sizeof(struct mxcmci_host), &pdev->dev); | ||
676 | if (!mmc) { | ||
677 | ret = -ENOMEM; | ||
678 | goto out_release_mem; | ||
679 | } | ||
680 | |||
681 | mmc->ops = &mxcmci_ops; | ||
682 | mmc->caps = MMC_CAP_4_BIT_DATA; | ||
683 | |||
684 | /* MMC core transfer sizes tunable parameters */ | ||
685 | mmc->max_hw_segs = 64; | ||
686 | mmc->max_phys_segs = 64; | ||
687 | mmc->max_blk_size = 2048; | ||
688 | mmc->max_blk_count = 65535; | ||
689 | mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count; | ||
690 | mmc->max_seg_size = mmc->max_seg_size; | ||
691 | |||
692 | host = mmc_priv(mmc); | ||
693 | host->base = ioremap(r->start, resource_size(r)); | ||
694 | if (!host->base) { | ||
695 | ret = -ENOMEM; | ||
696 | goto out_free; | ||
697 | } | ||
698 | |||
699 | host->mmc = mmc; | ||
700 | host->pdata = pdev->dev.platform_data; | ||
701 | |||
702 | if (host->pdata && host->pdata->ocr_avail) | ||
703 | mmc->ocr_avail = host->pdata->ocr_avail; | ||
704 | else | ||
705 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; | ||
706 | |||
707 | host->res = r; | ||
708 | host->irq = irq; | ||
709 | |||
710 | host->clk = clk_get(&pdev->dev, "sdhc_clk"); | ||
711 | if (IS_ERR(host->clk)) { | ||
712 | ret = PTR_ERR(host->clk); | ||
713 | goto out_iounmap; | ||
714 | } | ||
715 | clk_enable(host->clk); | ||
716 | |||
717 | mxcmci_softreset(host); | ||
718 | |||
719 | host->rev_no = readw(host->base + MMC_REG_REV_NO); | ||
720 | if (host->rev_no != 0x400) { | ||
721 | ret = -ENODEV; | ||
722 | dev_err(mmc_dev(host->mmc), "wrong rev.no. 0x%08x. aborting.\n", | ||
723 | host->rev_no); | ||
724 | goto out_clk_put; | ||
725 | } | ||
726 | |||
727 | mmc->f_min = clk_get_rate(host->clk) >> 7; | ||
728 | mmc->f_max = clk_get_rate(host->clk) >> 1; | ||
729 | |||
730 | /* recommended in data sheet */ | ||
731 | writew(0x2db4, host->base + MMC_REG_READ_TO); | ||
732 | |||
733 | writel(0, host->base + MMC_REG_INT_CNTR); | ||
734 | |||
735 | #ifdef HAS_DMA | ||
736 | host->dma = imx_dma_request_by_prio(DRIVER_NAME, DMA_PRIO_LOW); | ||
737 | if (host->dma < 0) { | ||
738 | dev_err(mmc_dev(host->mmc), "imx_dma_request_by_prio failed\n"); | ||
739 | ret = -EBUSY; | ||
740 | goto out_clk_put; | ||
741 | } | ||
742 | |||
743 | r = platform_get_resource(pdev, IORESOURCE_DMA, 0); | ||
744 | if (!r) { | ||
745 | ret = -EINVAL; | ||
746 | goto out_free_dma; | ||
747 | } | ||
748 | |||
749 | ret = imx_dma_config_channel(host->dma, | ||
750 | IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_FIFO, | ||
751 | IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR, | ||
752 | r->start, 0); | ||
753 | if (ret) { | ||
754 | dev_err(mmc_dev(host->mmc), "failed to config DMA channel\n"); | ||
755 | goto out_free_dma; | ||
756 | } | ||
757 | #endif | ||
758 | INIT_WORK(&host->datawork, mxcmci_datawork); | ||
759 | |||
760 | ret = request_irq(host->irq, mxcmci_irq, 0, DRIVER_NAME, host); | ||
761 | if (ret) | ||
762 | goto out_free_dma; | ||
763 | |||
764 | platform_set_drvdata(pdev, mmc); | ||
765 | |||
766 | if (host->pdata && host->pdata->init) { | ||
767 | ret = host->pdata->init(&pdev->dev, mxcmci_detect_irq, | ||
768 | host->mmc); | ||
769 | if (ret) | ||
770 | goto out_free_irq; | ||
771 | } | ||
772 | |||
773 | mmc_add_host(mmc); | ||
774 | |||
775 | return 0; | ||
776 | |||
777 | out_free_irq: | ||
778 | free_irq(host->irq, host); | ||
779 | out_free_dma: | ||
780 | #ifdef HAS_DMA | ||
781 | imx_dma_free(host->dma); | ||
782 | #endif | ||
783 | out_clk_put: | ||
784 | clk_disable(host->clk); | ||
785 | clk_put(host->clk); | ||
786 | out_iounmap: | ||
787 | iounmap(host->base); | ||
788 | out_free: | ||
789 | mmc_free_host(mmc); | ||
790 | out_release_mem: | ||
791 | release_mem_region(host->res->start, resource_size(host->res)); | ||
792 | return ret; | ||
793 | } | ||
794 | |||
795 | static int mxcmci_remove(struct platform_device *pdev) | ||
796 | { | ||
797 | struct mmc_host *mmc = platform_get_drvdata(pdev); | ||
798 | struct mxcmci_host *host = mmc_priv(mmc); | ||
799 | |||
800 | platform_set_drvdata(pdev, NULL); | ||
801 | |||
802 | mmc_remove_host(mmc); | ||
803 | |||
804 | if (host->pdata && host->pdata->exit) | ||
805 | host->pdata->exit(&pdev->dev, mmc); | ||
806 | |||
807 | free_irq(host->irq, host); | ||
808 | iounmap(host->base); | ||
809 | #ifdef HAS_DMA | ||
810 | imx_dma_free(host->dma); | ||
811 | #endif | ||
812 | clk_disable(host->clk); | ||
813 | clk_put(host->clk); | ||
814 | |||
815 | release_mem_region(host->res->start, resource_size(host->res)); | ||
816 | release_resource(host->res); | ||
817 | |||
818 | mmc_free_host(mmc); | ||
819 | |||
820 | return 0; | ||
821 | } | ||
822 | |||
823 | #ifdef CONFIG_PM | ||
824 | static int mxcmci_suspend(struct platform_device *dev, pm_message_t state) | ||
825 | { | ||
826 | struct mmc_host *mmc = platform_get_drvdata(dev); | ||
827 | int ret = 0; | ||
828 | |||
829 | if (mmc) | ||
830 | ret = mmc_suspend_host(mmc, state); | ||
831 | |||
832 | return ret; | ||
833 | } | ||
834 | |||
835 | static int mxcmci_resume(struct platform_device *dev) | ||
836 | { | ||
837 | struct mmc_host *mmc = platform_get_drvdata(dev); | ||
838 | struct mxcmci_host *host; | ||
839 | int ret = 0; | ||
840 | |||
841 | if (mmc) { | ||
842 | host = mmc_priv(mmc); | ||
843 | ret = mmc_resume_host(mmc); | ||
844 | } | ||
845 | |||
846 | return ret; | ||
847 | } | ||
848 | #else | ||
849 | #define mxcmci_suspend NULL | ||
850 | #define mxcmci_resume NULL | ||
851 | #endif /* CONFIG_PM */ | ||
852 | |||
853 | static struct platform_driver mxcmci_driver = { | ||
854 | .probe = mxcmci_probe, | ||
855 | .remove = mxcmci_remove, | ||
856 | .suspend = mxcmci_suspend, | ||
857 | .resume = mxcmci_resume, | ||
858 | .driver = { | ||
859 | .name = DRIVER_NAME, | ||
860 | .owner = THIS_MODULE, | ||
861 | } | ||
862 | }; | ||
863 | |||
864 | static int __init mxcmci_init(void) | ||
865 | { | ||
866 | return platform_driver_register(&mxcmci_driver); | ||
867 | } | ||
868 | |||
869 | static void __exit mxcmci_exit(void) | ||
870 | { | ||
871 | platform_driver_unregister(&mxcmci_driver); | ||
872 | } | ||
873 | |||
874 | module_init(mxcmci_init); | ||
875 | module_exit(mxcmci_exit); | ||
876 | |||
877 | MODULE_DESCRIPTION("i.MX Multimedia Card Interface Driver"); | ||
878 | MODULE_AUTHOR("Sascha Hauer, Pengutronix"); | ||
879 | MODULE_LICENSE("GPL"); | ||
880 | MODULE_ALIAS("platform:imx-mmc"); | ||
diff --git a/drivers/mmc/host/pxamci.c b/drivers/mmc/host/pxamci.c index 3c5483b75da4..9702ad3774cf 100644 --- a/drivers/mmc/host/pxamci.c +++ b/drivers/mmc/host/pxamci.c | |||
@@ -180,7 +180,15 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) | |||
180 | else | 180 | else |
181 | DALGN &= ~(1 << host->dma); | 181 | DALGN &= ~(1 << host->dma); |
182 | DDADR(host->dma) = host->sg_dma; | 182 | DDADR(host->dma) = host->sg_dma; |
183 | DCSR(host->dma) = DCSR_RUN; | 183 | |
184 | /* | ||
185 | * workaround for erratum #91: | ||
186 | * only start DMA now if we are doing a read, | ||
187 | * otherwise we wait until CMD/RESP has finished | ||
188 | * before starting DMA. | ||
189 | */ | ||
190 | if (!cpu_is_pxa27x() || data->flags & MMC_DATA_READ) | ||
191 | DCSR(host->dma) = DCSR_RUN; | ||
184 | } | 192 | } |
185 | 193 | ||
186 | static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd, unsigned int cmdat) | 194 | static void pxamci_start_cmd(struct pxamci_host *host, struct mmc_command *cmd, unsigned int cmdat) |
@@ -251,23 +259,28 @@ static int pxamci_cmd_done(struct pxamci_host *host, unsigned int stat) | |||
251 | if (stat & STAT_TIME_OUT_RESPONSE) { | 259 | if (stat & STAT_TIME_OUT_RESPONSE) { |
252 | cmd->error = -ETIMEDOUT; | 260 | cmd->error = -ETIMEDOUT; |
253 | } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { | 261 | } else if (stat & STAT_RES_CRC_ERR && cmd->flags & MMC_RSP_CRC) { |
254 | #ifdef CONFIG_PXA27x | ||
255 | /* | 262 | /* |
256 | * workaround for erratum #42: | 263 | * workaround for erratum #42: |
257 | * Intel PXA27x Family Processor Specification Update Rev 001 | 264 | * Intel PXA27x Family Processor Specification Update Rev 001 |
258 | * A bogus CRC error can appear if the msb of a 136 bit | 265 | * A bogus CRC error can appear if the msb of a 136 bit |
259 | * response is a one. | 266 | * response is a one. |
260 | */ | 267 | */ |
261 | if (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000) { | 268 | if (cpu_is_pxa27x() && |
269 | (cmd->flags & MMC_RSP_136 && cmd->resp[0] & 0x80000000)) | ||
262 | pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); | 270 | pr_debug("ignoring CRC from command %d - *risky*\n", cmd->opcode); |
263 | } else | 271 | else |
264 | #endif | 272 | cmd->error = -EILSEQ; |
265 | cmd->error = -EILSEQ; | ||
266 | } | 273 | } |
267 | 274 | ||
268 | pxamci_disable_irq(host, END_CMD_RES); | 275 | pxamci_disable_irq(host, END_CMD_RES); |
269 | if (host->data && !cmd->error) { | 276 | if (host->data && !cmd->error) { |
270 | pxamci_enable_irq(host, DATA_TRAN_DONE); | 277 | pxamci_enable_irq(host, DATA_TRAN_DONE); |
278 | /* | ||
279 | * workaround for erratum #91, if doing write | ||
280 | * enable DMA late | ||
281 | */ | ||
282 | if (cpu_is_pxa27x() && host->data->flags & MMC_DATA_WRITE) | ||
283 | DCSR(host->dma) = DCSR_RUN; | ||
271 | } else { | 284 | } else { |
272 | pxamci_finish_request(host, host->mrq); | 285 | pxamci_finish_request(host, host->mrq); |
273 | } | 286 | } |
diff --git a/drivers/mmc/host/ricoh_mmc.c b/drivers/mmc/host/ricoh_mmc.c index be9e7b32b34e..f62790513322 100644 --- a/drivers/mmc/host/ricoh_mmc.c +++ b/drivers/mmc/host/ricoh_mmc.c | |||
@@ -196,7 +196,7 @@ static void __devexit ricoh_mmc_remove(struct pci_dev *pdev) | |||
196 | pci_set_drvdata(pdev, NULL); | 196 | pci_set_drvdata(pdev, NULL); |
197 | } | 197 | } |
198 | 198 | ||
199 | static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state) | 199 | static int ricoh_mmc_suspend_late(struct pci_dev *pdev, pm_message_t state) |
200 | { | 200 | { |
201 | struct pci_dev *fw_dev = NULL; | 201 | struct pci_dev *fw_dev = NULL; |
202 | 202 | ||
@@ -210,7 +210,7 @@ static int ricoh_mmc_suspend(struct pci_dev *pdev, pm_message_t state) | |||
210 | return 0; | 210 | return 0; |
211 | } | 211 | } |
212 | 212 | ||
213 | static int ricoh_mmc_resume(struct pci_dev *pdev) | 213 | static int ricoh_mmc_resume_early(struct pci_dev *pdev) |
214 | { | 214 | { |
215 | struct pci_dev *fw_dev = NULL; | 215 | struct pci_dev *fw_dev = NULL; |
216 | 216 | ||
@@ -229,8 +229,8 @@ static struct pci_driver ricoh_mmc_driver = { | |||
229 | .id_table = pci_ids, | 229 | .id_table = pci_ids, |
230 | .probe = ricoh_mmc_probe, | 230 | .probe = ricoh_mmc_probe, |
231 | .remove = __devexit_p(ricoh_mmc_remove), | 231 | .remove = __devexit_p(ricoh_mmc_remove), |
232 | .suspend = ricoh_mmc_suspend, | 232 | .suspend_late = ricoh_mmc_suspend_late, |
233 | .resume = ricoh_mmc_resume, | 233 | .resume_early = ricoh_mmc_resume_early, |
234 | }; | 234 | }; |
235 | 235 | ||
236 | /*****************************************************************************\ | 236 | /*****************************************************************************\ |
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c index 7df6bbf0e4d9..6f6a0f6dafd6 100644 --- a/drivers/mtd/maps/sa1100-flash.c +++ b/drivers/mtd/maps/sa1100-flash.c | |||
@@ -453,7 +453,7 @@ static struct platform_driver sa1100_mtd_driver = { | |||
453 | .resume = sa1100_mtd_resume, | 453 | .resume = sa1100_mtd_resume, |
454 | .shutdown = sa1100_mtd_shutdown, | 454 | .shutdown = sa1100_mtd_shutdown, |
455 | .driver = { | 455 | .driver = { |
456 | .name = "flash", | 456 | .name = "sa1100-mtd", |
457 | .owner = THIS_MODULE, | 457 | .owner = THIS_MODULE, |
458 | }, | 458 | }, |
459 | }; | 459 | }; |
@@ -474,4 +474,4 @@ module_exit(sa1100_mtd_exit); | |||
474 | MODULE_AUTHOR("Nicolas Pitre"); | 474 | MODULE_AUTHOR("Nicolas Pitre"); |
475 | MODULE_DESCRIPTION("SA1100 CFI map driver"); | 475 | MODULE_DESCRIPTION("SA1100 CFI map driver"); |
476 | MODULE_LICENSE("GPL"); | 476 | MODULE_LICENSE("GPL"); |
477 | MODULE_ALIAS("platform:flash"); | 477 | MODULE_ALIAS("platform:sa1100-mtd"); |
diff --git a/drivers/net/arm/etherh.c b/drivers/net/arm/etherh.c index d15d8b79d8e5..54b52e5b1821 100644 --- a/drivers/net/arm/etherh.c +++ b/drivers/net/arm/etherh.c | |||
@@ -646,7 +646,7 @@ static const struct net_device_ops etherh_netdev_ops = { | |||
646 | .ndo_get_stats = ei_get_stats, | 646 | .ndo_get_stats = ei_get_stats, |
647 | .ndo_set_multicast_list = ei_set_multicast_list, | 647 | .ndo_set_multicast_list = ei_set_multicast_list, |
648 | .ndo_validate_addr = eth_validate_addr, | 648 | .ndo_validate_addr = eth_validate_addr, |
649 | .ndo_set_mac_address = eth_set_mac_addr, | 649 | .ndo_set_mac_address = eth_mac_addr, |
650 | .ndo_change_mtu = eth_change_mtu, | 650 | .ndo_change_mtu = eth_change_mtu, |
651 | #ifdef CONFIG_NET_POLL_CONTROLLER | 651 | #ifdef CONFIG_NET_POLL_CONTROLLER |
652 | .ndo_poll_controller = ei_poll, | 652 | .ndo_poll_controller = ei_poll, |
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 840b3d1a22f5..bbbc3bb08aa5 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -806,7 +806,7 @@ static int cas_reset_mii_phy(struct cas *cp) | |||
806 | 806 | ||
807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); | 807 | cas_phy_write(cp, MII_BMCR, BMCR_RESET); |
808 | udelay(100); | 808 | udelay(100); |
809 | while (limit--) { | 809 | while (--limit) { |
810 | val = cas_phy_read(cp, MII_BMCR); | 810 | val = cas_phy_read(cp, MII_BMCR); |
811 | if ((val & BMCR_RESET) == 0) | 811 | if ((val & BMCR_RESET) == 0) |
812 | break; | 812 | break; |
@@ -979,7 +979,7 @@ static void cas_phy_init(struct cas *cp) | |||
979 | writel(val, cp->regs + REG_PCS_MII_CTRL); | 979 | writel(val, cp->regs + REG_PCS_MII_CTRL); |
980 | 980 | ||
981 | limit = STOP_TRIES; | 981 | limit = STOP_TRIES; |
982 | while (limit-- > 0) { | 982 | while (--limit > 0) { |
983 | udelay(10); | 983 | udelay(10); |
984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & | 984 | if ((readl(cp->regs + REG_PCS_MII_CTRL) & |
985 | PCS_MII_RESET) == 0) | 985 | PCS_MII_RESET) == 0) |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 26474c92193f..6bd63cc67b3e 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | char e1000_driver_name[] = "e1000"; | 32 | char e1000_driver_name[] = "e1000"; |
33 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; | 33 | static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; |
34 | #define DRV_VERSION "7.3.20-k3-NAPI" | 34 | #define DRV_VERSION "7.3.21-k3-NAPI" |
35 | const char e1000_driver_version[] = DRV_VERSION; | 35 | const char e1000_driver_version[] = DRV_VERSION; |
36 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; | 36 | static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; |
37 | 37 | ||
@@ -940,7 +940,7 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
940 | err = pci_enable_device(pdev); | 940 | err = pci_enable_device(pdev); |
941 | } else { | 941 | } else { |
942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); | 942 | bars = pci_select_bars(pdev, IORESOURCE_MEM); |
943 | err = pci_enable_device(pdev); | 943 | err = pci_enable_device_mem(pdev); |
944 | } | 944 | } |
945 | if (err) | 945 | if (err) |
946 | return err; | 946 | return err; |
@@ -3712,7 +3712,7 @@ static irqreturn_t e1000_intr(int irq, void *data) | |||
3712 | struct e1000_hw *hw = &adapter->hw; | 3712 | struct e1000_hw *hw = &adapter->hw; |
3713 | u32 rctl, icr = er32(ICR); | 3713 | u32 rctl, icr = er32(ICR); |
3714 | 3714 | ||
3715 | if (unlikely(!icr)) | 3715 | if (unlikely((!icr) || test_bit(__E1000_RESETTING, &adapter->flags))) |
3716 | return IRQ_NONE; /* Not our interrupt */ | 3716 | return IRQ_NONE; /* Not our interrupt */ |
3717 | 3717 | ||
3718 | /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is | 3718 | /* IMS will not auto-mask if INT_ASSERTED is not set, and if it is |
diff --git a/drivers/net/gianfar_mii.c b/drivers/net/gianfar_mii.c index f3706e415b45..f49a426ad681 100644 --- a/drivers/net/gianfar_mii.c +++ b/drivers/net/gianfar_mii.c | |||
@@ -234,6 +234,8 @@ static int gfar_mdio_probe(struct of_device *ofdev, | |||
234 | if (NULL == new_bus) | 234 | if (NULL == new_bus) |
235 | return -ENOMEM; | 235 | return -ENOMEM; |
236 | 236 | ||
237 | device_init_wakeup(&ofdev->dev, 1); | ||
238 | |||
237 | new_bus->name = "Gianfar MII Bus", | 239 | new_bus->name = "Gianfar MII Bus", |
238 | new_bus->read = &gfar_mdio_read, | 240 | new_bus->read = &gfar_mdio_read, |
239 | new_bus->write = &gfar_mdio_write, | 241 | new_bus->write = &gfar_mdio_write, |
diff --git a/drivers/net/ibm_newemac/phy.c b/drivers/net/ibm_newemac/phy.c index c40cd8df2212..ac9d964e59ec 100644 --- a/drivers/net/ibm_newemac/phy.c +++ b/drivers/net/ibm_newemac/phy.c | |||
@@ -60,7 +60,7 @@ int emac_mii_reset_phy(struct mii_phy *phy) | |||
60 | 60 | ||
61 | udelay(300); | 61 | udelay(300); |
62 | 62 | ||
63 | while (limit--) { | 63 | while (--limit) { |
64 | val = phy_read(phy, MII_BMCR); | 64 | val = phy_read(phy, MII_BMCR); |
65 | if (val >= 0 && (val & BMCR_RESET) == 0) | 65 | if (val >= 0 && (val & BMCR_RESET) == 0) |
66 | break; | 66 | break; |
@@ -84,7 +84,7 @@ int emac_mii_reset_gpcs(struct mii_phy *phy) | |||
84 | 84 | ||
85 | udelay(300); | 85 | udelay(300); |
86 | 86 | ||
87 | while (limit--) { | 87 | while (--limit) { |
88 | val = gpcs_phy_read(phy, MII_BMCR); | 88 | val = gpcs_phy_read(phy, MII_BMCR); |
89 | if (val >= 0 && (val & BMCR_RESET) == 0) | 89 | if (val >= 0 && (val & BMCR_RESET) == 0) |
90 | break; | 90 | break; |
diff --git a/drivers/net/igb/e1000_82575.c b/drivers/net/igb/e1000_82575.c index f5e2e7235fcb..13ca73f96ec6 100644 --- a/drivers/net/igb/e1000_82575.c +++ b/drivers/net/igb/e1000_82575.c | |||
@@ -699,11 +699,18 @@ static s32 igb_check_for_link_82575(struct e1000_hw *hw) | |||
699 | 699 | ||
700 | /* SGMII link check is done through the PCS register. */ | 700 | /* SGMII link check is done through the PCS register. */ |
701 | if ((hw->phy.media_type != e1000_media_type_copper) || | 701 | if ((hw->phy.media_type != e1000_media_type_copper) || |
702 | (igb_sgmii_active_82575(hw))) | 702 | (igb_sgmii_active_82575(hw))) { |
703 | ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed, | 703 | ret_val = igb_get_pcs_speed_and_duplex_82575(hw, &speed, |
704 | &duplex); | 704 | &duplex); |
705 | else | 705 | /* |
706 | * Use this flag to determine if link needs to be checked or | ||
707 | * not. If we have link clear the flag so that we do not | ||
708 | * continue to check for link. | ||
709 | */ | ||
710 | hw->mac.get_link_status = !hw->mac.serdes_has_link; | ||
711 | } else { | ||
706 | ret_val = igb_check_for_copper_link(hw); | 712 | ret_val = igb_check_for_copper_link(hw); |
713 | } | ||
707 | 714 | ||
708 | return ret_val; | 715 | return ret_val; |
709 | } | 716 | } |
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h index 5a27825cc48a..aebef8e48e76 100644 --- a/drivers/net/igb/igb.h +++ b/drivers/net/igb/igb.h | |||
@@ -300,11 +300,10 @@ struct igb_adapter { | |||
300 | 300 | ||
301 | #define IGB_FLAG_HAS_MSI (1 << 0) | 301 | #define IGB_FLAG_HAS_MSI (1 << 0) |
302 | #define IGB_FLAG_MSI_ENABLE (1 << 1) | 302 | #define IGB_FLAG_MSI_ENABLE (1 << 1) |
303 | #define IGB_FLAG_HAS_DCA (1 << 2) | 303 | #define IGB_FLAG_DCA_ENABLED (1 << 2) |
304 | #define IGB_FLAG_DCA_ENABLED (1 << 3) | 304 | #define IGB_FLAG_IN_NETPOLL (1 << 3) |
305 | #define IGB_FLAG_IN_NETPOLL (1 << 5) | 305 | #define IGB_FLAG_QUAD_PORT_A (1 << 4) |
306 | #define IGB_FLAG_QUAD_PORT_A (1 << 6) | 306 | #define IGB_FLAG_NEED_CTX_IDX (1 << 5) |
307 | #define IGB_FLAG_NEED_CTX_IDX (1 << 7) | ||
308 | 307 | ||
309 | enum e1000_state_t { | 308 | enum e1000_state_t { |
310 | __IGB_TESTING, | 309 | __IGB_TESTING, |
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c index b82b0fb2056c..a50db5398fa5 100644 --- a/drivers/net/igb/igb_main.c +++ b/drivers/net/igb/igb_main.c | |||
@@ -206,10 +206,11 @@ static int __init igb_init_module(void) | |||
206 | 206 | ||
207 | global_quad_port_a = 0; | 207 | global_quad_port_a = 0; |
208 | 208 | ||
209 | ret = pci_register_driver(&igb_driver); | ||
210 | #ifdef CONFIG_IGB_DCA | 209 | #ifdef CONFIG_IGB_DCA |
211 | dca_register_notify(&dca_notifier); | 210 | dca_register_notify(&dca_notifier); |
212 | #endif | 211 | #endif |
212 | |||
213 | ret = pci_register_driver(&igb_driver); | ||
213 | return ret; | 214 | return ret; |
214 | } | 215 | } |
215 | 216 | ||
@@ -1156,11 +1157,10 @@ static int __devinit igb_probe(struct pci_dev *pdev, | |||
1156 | 1157 | ||
1157 | /* set flags */ | 1158 | /* set flags */ |
1158 | switch (hw->mac.type) { | 1159 | switch (hw->mac.type) { |
1159 | case e1000_82576: | ||
1160 | case e1000_82575: | 1160 | case e1000_82575: |
1161 | adapter->flags |= IGB_FLAG_HAS_DCA; | ||
1162 | adapter->flags |= IGB_FLAG_NEED_CTX_IDX; | 1161 | adapter->flags |= IGB_FLAG_NEED_CTX_IDX; |
1163 | break; | 1162 | break; |
1163 | case e1000_82576: | ||
1164 | default: | 1164 | default: |
1165 | break; | 1165 | break; |
1166 | } | 1166 | } |
@@ -1310,8 +1310,7 @@ static int __devinit igb_probe(struct pci_dev *pdev, | |||
1310 | goto err_register; | 1310 | goto err_register; |
1311 | 1311 | ||
1312 | #ifdef CONFIG_IGB_DCA | 1312 | #ifdef CONFIG_IGB_DCA |
1313 | if ((adapter->flags & IGB_FLAG_HAS_DCA) && | 1313 | if (dca_add_requester(&pdev->dev) == 0) { |
1314 | (dca_add_requester(&pdev->dev) == 0)) { | ||
1315 | adapter->flags |= IGB_FLAG_DCA_ENABLED; | 1314 | adapter->flags |= IGB_FLAG_DCA_ENABLED; |
1316 | dev_info(&pdev->dev, "DCA enabled\n"); | 1315 | dev_info(&pdev->dev, "DCA enabled\n"); |
1317 | /* Always use CB2 mode, difference is masked | 1316 | /* Always use CB2 mode, difference is masked |
@@ -1835,11 +1834,11 @@ static void igb_setup_rctl(struct igb_adapter *adapter) | |||
1835 | rctl |= E1000_RCTL_SECRC; | 1834 | rctl |= E1000_RCTL_SECRC; |
1836 | 1835 | ||
1837 | /* | 1836 | /* |
1838 | * disable store bad packets, long packet enable, and clear size bits. | 1837 | * disable store bad packets and clear size bits. |
1839 | */ | 1838 | */ |
1840 | rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_LPE | E1000_RCTL_SZ_256); | 1839 | rctl &= ~(E1000_RCTL_SBP | E1000_RCTL_SZ_256); |
1841 | 1840 | ||
1842 | if (adapter->netdev->mtu > ETH_DATA_LEN) | 1841 | /* enable LPE when to prevent packets larger than max_frame_size */ |
1843 | rctl |= E1000_RCTL_LPE; | 1842 | rctl |= E1000_RCTL_LPE; |
1844 | 1843 | ||
1845 | /* Setup buffer sizes */ | 1844 | /* Setup buffer sizes */ |
@@ -1865,7 +1864,7 @@ static void igb_setup_rctl(struct igb_adapter *adapter) | |||
1865 | */ | 1864 | */ |
1866 | /* allocations using alloc_page take too long for regular MTU | 1865 | /* allocations using alloc_page take too long for regular MTU |
1867 | * so only enable packet split for jumbo frames */ | 1866 | * so only enable packet split for jumbo frames */ |
1868 | if (rctl & E1000_RCTL_LPE) { | 1867 | if (adapter->netdev->mtu > ETH_DATA_LEN) { |
1869 | adapter->rx_ps_hdr_size = IGB_RXBUFFER_128; | 1868 | adapter->rx_ps_hdr_size = IGB_RXBUFFER_128; |
1870 | srrctl |= adapter->rx_ps_hdr_size << | 1869 | srrctl |= adapter->rx_ps_hdr_size << |
1871 | E1000_SRRCTL_BSIZEHDRSIZE_SHIFT; | 1870 | E1000_SRRCTL_BSIZEHDRSIZE_SHIFT; |
@@ -3473,19 +3472,16 @@ static int __igb_notify_dca(struct device *dev, void *data) | |||
3473 | struct e1000_hw *hw = &adapter->hw; | 3472 | struct e1000_hw *hw = &adapter->hw; |
3474 | unsigned long event = *(unsigned long *)data; | 3473 | unsigned long event = *(unsigned long *)data; |
3475 | 3474 | ||
3476 | if (!(adapter->flags & IGB_FLAG_HAS_DCA)) | ||
3477 | goto out; | ||
3478 | |||
3479 | switch (event) { | 3475 | switch (event) { |
3480 | case DCA_PROVIDER_ADD: | 3476 | case DCA_PROVIDER_ADD: |
3481 | /* if already enabled, don't do it again */ | 3477 | /* if already enabled, don't do it again */ |
3482 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) | 3478 | if (adapter->flags & IGB_FLAG_DCA_ENABLED) |
3483 | break; | 3479 | break; |
3484 | adapter->flags |= IGB_FLAG_DCA_ENABLED; | ||
3485 | /* Always use CB2 mode, difference is masked | 3480 | /* Always use CB2 mode, difference is masked |
3486 | * in the CB driver. */ | 3481 | * in the CB driver. */ |
3487 | wr32(E1000_DCA_CTRL, 2); | 3482 | wr32(E1000_DCA_CTRL, 2); |
3488 | if (dca_add_requester(dev) == 0) { | 3483 | if (dca_add_requester(dev) == 0) { |
3484 | adapter->flags |= IGB_FLAG_DCA_ENABLED; | ||
3489 | dev_info(&adapter->pdev->dev, "DCA enabled\n"); | 3485 | dev_info(&adapter->pdev->dev, "DCA enabled\n"); |
3490 | igb_setup_dca(adapter); | 3486 | igb_setup_dca(adapter); |
3491 | break; | 3487 | break; |
@@ -3502,7 +3498,7 @@ static int __igb_notify_dca(struct device *dev, void *data) | |||
3502 | } | 3498 | } |
3503 | break; | 3499 | break; |
3504 | } | 3500 | } |
3505 | out: | 3501 | |
3506 | return 0; | 3502 | return 0; |
3507 | } | 3503 | } |
3508 | 3504 | ||
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index a75a31005fd3..9c78c963b721 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -210,7 +210,7 @@ | |||
210 | #define MAX_CMD_DESCRIPTORS_HOST 1024 | 210 | #define MAX_CMD_DESCRIPTORS_HOST 1024 |
211 | #define MAX_RCV_DESCRIPTORS_1G 2048 | 211 | #define MAX_RCV_DESCRIPTORS_1G 2048 |
212 | #define MAX_RCV_DESCRIPTORS_10G 4096 | 212 | #define MAX_RCV_DESCRIPTORS_10G 4096 |
213 | #define MAX_JUMBO_RCV_DESCRIPTORS 512 | 213 | #define MAX_JUMBO_RCV_DESCRIPTORS 1024 |
214 | #define MAX_LRO_RCV_DESCRIPTORS 8 | 214 | #define MAX_LRO_RCV_DESCRIPTORS 8 |
215 | #define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS | 215 | #define MAX_RCVSTATUS_DESCRIPTORS MAX_RCV_DESCRIPTORS |
216 | #define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS | 216 | #define MAX_JUMBO_RCV_DESC MAX_JUMBO_RCV_DESCRIPTORS |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index ca7c8d8050c9..ffd37bea1628 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -947,8 +947,10 @@ int netxen_pinit_from_rom(struct netxen_adapter *adapter, int verbose) | |||
947 | } | 947 | } |
948 | for (i = 0; i < n; i++) { | 948 | for (i = 0; i < n; i++) { |
949 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || | 949 | if (netxen_rom_fast_read(adapter, 8*i + 4*offset, &val) != 0 || |
950 | netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) | 950 | netxen_rom_fast_read(adapter, 8*i + 4*offset + 4, &addr) != 0) { |
951 | kfree(buf); | ||
951 | return -EIO; | 952 | return -EIO; |
953 | } | ||
952 | 954 | ||
953 | buf[i].addr = addr; | 955 | buf[i].addr = addr; |
954 | buf[i].data = val; | 956 | buf[i].data = val; |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index c38ed777f0a8..a6999403f37b 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
@@ -586,7 +586,7 @@ static int pcnet_config(struct pcmcia_device *link) | |||
586 | } | 586 | } |
587 | 587 | ||
588 | if ((link->conf.ConfigBase == 0x03c0) | 588 | if ((link->conf.ConfigBase == 0x03c0) |
589 | && (link->manf_id == 0x149) && (link->card_id = 0xc1ab)) { | 589 | && (link->manf_id == 0x149) && (link->card_id == 0xc1ab)) { |
590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); | 590 | printk(KERN_INFO "pcnet_cs: this is an AX88190 card!\n"); |
591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); | 591 | printk(KERN_INFO "pcnet_cs: use axnet_cs instead.\n"); |
592 | goto failed; | 592 | goto failed; |
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c index ec2314246682..335da4831ab3 100644 --- a/drivers/net/ps3_gelic_wireless.c +++ b/drivers/net/ps3_gelic_wireless.c | |||
@@ -2168,7 +2168,7 @@ static void gelic_wl_connected_event(struct gelic_wl_info *wl, | |||
2168 | complete(&wl->assoc_done); | 2168 | complete(&wl->assoc_done); |
2169 | netif_carrier_on(port_to_netdev(wl_port(wl))); | 2169 | netif_carrier_on(port_to_netdev(wl_port(wl))); |
2170 | } else | 2170 | } else |
2171 | pr_debug("%s: event %#lx under wpa\n", | 2171 | pr_debug("%s: event %#llx under wpa\n", |
2172 | __func__, event); | 2172 | __func__, event); |
2173 | } | 2173 | } |
2174 | 2174 | ||
diff --git a/drivers/net/qlge/qlge.h b/drivers/net/qlge/qlge.h index c1dadadfab18..e6fdce9206cc 100644 --- a/drivers/net/qlge/qlge.h +++ b/drivers/net/qlge/qlge.h | |||
@@ -787,12 +787,12 @@ struct mbox_params { | |||
787 | 787 | ||
788 | struct flash_params { | 788 | struct flash_params { |
789 | u8 dev_id_str[4]; | 789 | u8 dev_id_str[4]; |
790 | u16 size; | 790 | __le16 size; |
791 | u16 csum; | 791 | __le16 csum; |
792 | u16 ver; | 792 | __le16 ver; |
793 | u16 sub_dev_id; | 793 | __le16 sub_dev_id; |
794 | u8 mac_addr[6]; | 794 | u8 mac_addr[6]; |
795 | u16 res; | 795 | __le16 res; |
796 | }; | 796 | }; |
797 | 797 | ||
798 | 798 | ||
diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index 45421c8b6010..3d1d7b6e55aa 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c | |||
@@ -641,7 +641,7 @@ static void ql_enable_all_completion_interrupts(struct ql_adapter *qdev) | |||
641 | 641 | ||
642 | } | 642 | } |
643 | 643 | ||
644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | 644 | static int ql_read_flash_word(struct ql_adapter *qdev, int offset, __le32 *data) |
645 | { | 645 | { |
646 | int status = 0; | 646 | int status = 0; |
647 | /* wait for reg to come ready */ | 647 | /* wait for reg to come ready */ |
@@ -656,8 +656,11 @@ static int ql_read_flash_word(struct ql_adapter *qdev, int offset, u32 *data) | |||
656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); | 656 | FLASH_ADDR, FLASH_ADDR_RDY, FLASH_ADDR_ERR); |
657 | if (status) | 657 | if (status) |
658 | goto exit; | 658 | goto exit; |
659 | /* get the data */ | 659 | /* This data is stored on flash as an array of |
660 | *data = ql_read32(qdev, FLASH_DATA); | 660 | * __le32. Since ql_read32() returns cpu endian |
661 | * we need to swap it back. | ||
662 | */ | ||
663 | *data = cpu_to_le32(ql_read32(qdev, FLASH_DATA)); | ||
661 | exit: | 664 | exit: |
662 | return status; | 665 | return status; |
663 | } | 666 | } |
@@ -666,13 +669,20 @@ static int ql_get_flash_params(struct ql_adapter *qdev) | |||
666 | { | 669 | { |
667 | int i; | 670 | int i; |
668 | int status; | 671 | int status; |
669 | u32 *p = (u32 *)&qdev->flash; | 672 | __le32 *p = (__le32 *)&qdev->flash; |
673 | u32 offset = 0; | ||
674 | |||
675 | /* Second function's parameters follow the first | ||
676 | * function's. | ||
677 | */ | ||
678 | if (qdev->func) | ||
679 | offset = sizeof(qdev->flash) / sizeof(u32); | ||
670 | 680 | ||
671 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) | 681 | if (ql_sem_spinlock(qdev, SEM_FLASH_MASK)) |
672 | return -ETIMEDOUT; | 682 | return -ETIMEDOUT; |
673 | 683 | ||
674 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { | 684 | for (i = 0; i < sizeof(qdev->flash) / sizeof(u32); i++, p++) { |
675 | status = ql_read_flash_word(qdev, i, p); | 685 | status = ql_read_flash_word(qdev, i+offset, p); |
676 | if (status) { | 686 | if (status) { |
677 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); | 687 | QPRINTK(qdev, IFUP, ERR, "Error reading flash.\n"); |
678 | goto exit; | 688 | goto exit; |
@@ -3826,7 +3836,7 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3826 | { | 3836 | { |
3827 | struct net_device *ndev = pci_get_drvdata(pdev); | 3837 | struct net_device *ndev = pci_get_drvdata(pdev); |
3828 | struct ql_adapter *qdev = netdev_priv(ndev); | 3838 | struct ql_adapter *qdev = netdev_priv(ndev); |
3829 | int err; | 3839 | int err, i; |
3830 | 3840 | ||
3831 | netif_device_detach(ndev); | 3841 | netif_device_detach(ndev); |
3832 | 3842 | ||
@@ -3836,6 +3846,9 @@ static int qlge_suspend(struct pci_dev *pdev, pm_message_t state) | |||
3836 | return err; | 3846 | return err; |
3837 | } | 3847 | } |
3838 | 3848 | ||
3849 | for (i = qdev->rss_ring_first_cq_id; i < qdev->rx_ring_count; i++) | ||
3850 | netif_napi_del(&qdev->rx_ring[i].napi); | ||
3851 | |||
3839 | err = pci_save_state(pdev); | 3852 | err = pci_save_state(pdev); |
3840 | if (err) | 3853 | if (err) |
3841 | return err; | 3854 | return err; |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 72fd9e97c190..b2dcdb5ed8bd 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -438,7 +438,6 @@ static void r6040_down(struct net_device *dev) | |||
438 | { | 438 | { |
439 | struct r6040_private *lp = netdev_priv(dev); | 439 | struct r6040_private *lp = netdev_priv(dev); |
440 | void __iomem *ioaddr = lp->base; | 440 | void __iomem *ioaddr = lp->base; |
441 | struct pci_dev *pdev = lp->pdev; | ||
442 | int limit = 2048; | 441 | int limit = 2048; |
443 | u16 *adrp; | 442 | u16 *adrp; |
444 | u16 cmd; | 443 | u16 cmd; |
diff --git a/drivers/net/sfc/efx.c b/drivers/net/sfc/efx.c index 7673fd92eaf5..ab0e09bf154d 100644 --- a/drivers/net/sfc/efx.c +++ b/drivers/net/sfc/efx.c | |||
@@ -676,9 +676,8 @@ static int efx_init_port(struct efx_nic *efx) | |||
676 | rc = efx->phy_op->init(efx); | 676 | rc = efx->phy_op->init(efx); |
677 | if (rc) | 677 | if (rc) |
678 | return rc; | 678 | return rc; |
679 | efx->phy_op->reconfigure(efx); | ||
680 | |||
681 | mutex_lock(&efx->mac_lock); | 679 | mutex_lock(&efx->mac_lock); |
680 | efx->phy_op->reconfigure(efx); | ||
682 | rc = falcon_switch_mac(efx); | 681 | rc = falcon_switch_mac(efx); |
683 | mutex_unlock(&efx->mac_lock); | 682 | mutex_unlock(&efx->mac_lock); |
684 | if (rc) | 683 | if (rc) |
@@ -686,7 +685,7 @@ static int efx_init_port(struct efx_nic *efx) | |||
686 | efx->mac_op->reconfigure(efx); | 685 | efx->mac_op->reconfigure(efx); |
687 | 686 | ||
688 | efx->port_initialized = true; | 687 | efx->port_initialized = true; |
689 | efx->stats_enabled = true; | 688 | efx_stats_enable(efx); |
690 | return 0; | 689 | return 0; |
691 | 690 | ||
692 | fail: | 691 | fail: |
@@ -735,6 +734,7 @@ static void efx_fini_port(struct efx_nic *efx) | |||
735 | if (!efx->port_initialized) | 734 | if (!efx->port_initialized) |
736 | return; | 735 | return; |
737 | 736 | ||
737 | efx_stats_disable(efx); | ||
738 | efx->phy_op->fini(efx); | 738 | efx->phy_op->fini(efx); |
739 | efx->port_initialized = false; | 739 | efx->port_initialized = false; |
740 | 740 | ||
@@ -1361,6 +1361,20 @@ static int efx_net_stop(struct net_device *net_dev) | |||
1361 | return 0; | 1361 | return 0; |
1362 | } | 1362 | } |
1363 | 1363 | ||
1364 | void efx_stats_disable(struct efx_nic *efx) | ||
1365 | { | ||
1366 | spin_lock(&efx->stats_lock); | ||
1367 | ++efx->stats_disable_count; | ||
1368 | spin_unlock(&efx->stats_lock); | ||
1369 | } | ||
1370 | |||
1371 | void efx_stats_enable(struct efx_nic *efx) | ||
1372 | { | ||
1373 | spin_lock(&efx->stats_lock); | ||
1374 | --efx->stats_disable_count; | ||
1375 | spin_unlock(&efx->stats_lock); | ||
1376 | } | ||
1377 | |||
1364 | /* Context: process, dev_base_lock or RTNL held, non-blocking. */ | 1378 | /* Context: process, dev_base_lock or RTNL held, non-blocking. */ |
1365 | static struct net_device_stats *efx_net_stats(struct net_device *net_dev) | 1379 | static struct net_device_stats *efx_net_stats(struct net_device *net_dev) |
1366 | { | 1380 | { |
@@ -1369,12 +1383,12 @@ static struct net_device_stats *efx_net_stats(struct net_device *net_dev) | |||
1369 | struct net_device_stats *stats = &net_dev->stats; | 1383 | struct net_device_stats *stats = &net_dev->stats; |
1370 | 1384 | ||
1371 | /* Update stats if possible, but do not wait if another thread | 1385 | /* Update stats if possible, but do not wait if another thread |
1372 | * is updating them (or resetting the NIC); slightly stale | 1386 | * is updating them or if MAC stats fetches are temporarily |
1373 | * stats are acceptable. | 1387 | * disabled; slightly stale stats are acceptable. |
1374 | */ | 1388 | */ |
1375 | if (!spin_trylock(&efx->stats_lock)) | 1389 | if (!spin_trylock(&efx->stats_lock)) |
1376 | return stats; | 1390 | return stats; |
1377 | if (efx->stats_enabled) { | 1391 | if (!efx->stats_disable_count) { |
1378 | efx->mac_op->update_stats(efx); | 1392 | efx->mac_op->update_stats(efx); |
1379 | falcon_update_nic_stats(efx); | 1393 | falcon_update_nic_stats(efx); |
1380 | } | 1394 | } |
@@ -1622,16 +1636,12 @@ static void efx_unregister_netdev(struct efx_nic *efx) | |||
1622 | 1636 | ||
1623 | /* Tears down the entire software state and most of the hardware state | 1637 | /* Tears down the entire software state and most of the hardware state |
1624 | * before reset. */ | 1638 | * before reset. */ |
1625 | void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd) | 1639 | void efx_reset_down(struct efx_nic *efx, enum reset_type method, |
1640 | struct ethtool_cmd *ecmd) | ||
1626 | { | 1641 | { |
1627 | EFX_ASSERT_RESET_SERIALISED(efx); | 1642 | EFX_ASSERT_RESET_SERIALISED(efx); |
1628 | 1643 | ||
1629 | /* The net_dev->get_stats handler is quite slow, and will fail | 1644 | efx_stats_disable(efx); |
1630 | * if a fetch is pending over reset. Serialise against it. */ | ||
1631 | spin_lock(&efx->stats_lock); | ||
1632 | efx->stats_enabled = false; | ||
1633 | spin_unlock(&efx->stats_lock); | ||
1634 | |||
1635 | efx_stop_all(efx); | 1645 | efx_stop_all(efx); |
1636 | mutex_lock(&efx->mac_lock); | 1646 | mutex_lock(&efx->mac_lock); |
1637 | mutex_lock(&efx->spi_lock); | 1647 | mutex_lock(&efx->spi_lock); |
@@ -1639,6 +1649,8 @@ void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
1639 | efx->phy_op->get_settings(efx, ecmd); | 1649 | efx->phy_op->get_settings(efx, ecmd); |
1640 | 1650 | ||
1641 | efx_fini_channels(efx); | 1651 | efx_fini_channels(efx); |
1652 | if (efx->port_initialized && method != RESET_TYPE_INVISIBLE) | ||
1653 | efx->phy_op->fini(efx); | ||
1642 | } | 1654 | } |
1643 | 1655 | ||
1644 | /* This function will always ensure that the locks acquired in | 1656 | /* This function will always ensure that the locks acquired in |
@@ -1646,7 +1658,8 @@ void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd) | |||
1646 | * that we were unable to reinitialise the hardware, and the | 1658 | * that we were unable to reinitialise the hardware, and the |
1647 | * driver should be disabled. If ok is false, then the rx and tx | 1659 | * driver should be disabled. If ok is false, then the rx and tx |
1648 | * engines are not restarted, pending a RESET_DISABLE. */ | 1660 | * engines are not restarted, pending a RESET_DISABLE. */ |
1649 | int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, bool ok) | 1661 | int efx_reset_up(struct efx_nic *efx, enum reset_type method, |
1662 | struct ethtool_cmd *ecmd, bool ok) | ||
1650 | { | 1663 | { |
1651 | int rc; | 1664 | int rc; |
1652 | 1665 | ||
@@ -1658,6 +1671,15 @@ int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, bool ok) | |||
1658 | ok = false; | 1671 | ok = false; |
1659 | } | 1672 | } |
1660 | 1673 | ||
1674 | if (efx->port_initialized && method != RESET_TYPE_INVISIBLE) { | ||
1675 | if (ok) { | ||
1676 | rc = efx->phy_op->init(efx); | ||
1677 | if (rc) | ||
1678 | ok = false; | ||
1679 | } else | ||
1680 | efx->port_initialized = false; | ||
1681 | } | ||
1682 | |||
1661 | if (ok) { | 1683 | if (ok) { |
1662 | efx_init_channels(efx); | 1684 | efx_init_channels(efx); |
1663 | 1685 | ||
@@ -1670,7 +1692,7 @@ int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, bool ok) | |||
1670 | 1692 | ||
1671 | if (ok) { | 1693 | if (ok) { |
1672 | efx_start_all(efx); | 1694 | efx_start_all(efx); |
1673 | efx->stats_enabled = true; | 1695 | efx_stats_enable(efx); |
1674 | } | 1696 | } |
1675 | return rc; | 1697 | return rc; |
1676 | } | 1698 | } |
@@ -1702,7 +1724,7 @@ static int efx_reset(struct efx_nic *efx) | |||
1702 | 1724 | ||
1703 | EFX_INFO(efx, "resetting (%d)\n", method); | 1725 | EFX_INFO(efx, "resetting (%d)\n", method); |
1704 | 1726 | ||
1705 | efx_reset_down(efx, &ecmd); | 1727 | efx_reset_down(efx, method, &ecmd); |
1706 | 1728 | ||
1707 | rc = falcon_reset_hw(efx, method); | 1729 | rc = falcon_reset_hw(efx, method); |
1708 | if (rc) { | 1730 | if (rc) { |
@@ -1721,10 +1743,10 @@ static int efx_reset(struct efx_nic *efx) | |||
1721 | 1743 | ||
1722 | /* Leave device stopped if necessary */ | 1744 | /* Leave device stopped if necessary */ |
1723 | if (method == RESET_TYPE_DISABLE) { | 1745 | if (method == RESET_TYPE_DISABLE) { |
1724 | efx_reset_up(efx, &ecmd, false); | 1746 | efx_reset_up(efx, method, &ecmd, false); |
1725 | rc = -EIO; | 1747 | rc = -EIO; |
1726 | } else { | 1748 | } else { |
1727 | rc = efx_reset_up(efx, &ecmd, true); | 1749 | rc = efx_reset_up(efx, method, &ecmd, true); |
1728 | } | 1750 | } |
1729 | 1751 | ||
1730 | out_disable: | 1752 | out_disable: |
@@ -1876,6 +1898,7 @@ static int efx_init_struct(struct efx_nic *efx, struct efx_nic_type *type, | |||
1876 | efx->rx_checksum_enabled = true; | 1898 | efx->rx_checksum_enabled = true; |
1877 | spin_lock_init(&efx->netif_stop_lock); | 1899 | spin_lock_init(&efx->netif_stop_lock); |
1878 | spin_lock_init(&efx->stats_lock); | 1900 | spin_lock_init(&efx->stats_lock); |
1901 | efx->stats_disable_count = 1; | ||
1879 | mutex_init(&efx->mac_lock); | 1902 | mutex_init(&efx->mac_lock); |
1880 | efx->mac_op = &efx_dummy_mac_operations; | 1903 | efx->mac_op = &efx_dummy_mac_operations; |
1881 | efx->phy_op = &efx_dummy_phy_operations; | 1904 | efx->phy_op = &efx_dummy_phy_operations; |
diff --git a/drivers/net/sfc/efx.h b/drivers/net/sfc/efx.h index 0dd7a532c78a..55d0f131b0e9 100644 --- a/drivers/net/sfc/efx.h +++ b/drivers/net/sfc/efx.h | |||
@@ -36,13 +36,16 @@ extern void efx_process_channel_now(struct efx_channel *channel); | |||
36 | extern void efx_flush_queues(struct efx_nic *efx); | 36 | extern void efx_flush_queues(struct efx_nic *efx); |
37 | 37 | ||
38 | /* Ports */ | 38 | /* Ports */ |
39 | extern void efx_stats_disable(struct efx_nic *efx); | ||
40 | extern void efx_stats_enable(struct efx_nic *efx); | ||
39 | extern void efx_reconfigure_port(struct efx_nic *efx); | 41 | extern void efx_reconfigure_port(struct efx_nic *efx); |
40 | extern void __efx_reconfigure_port(struct efx_nic *efx); | 42 | extern void __efx_reconfigure_port(struct efx_nic *efx); |
41 | 43 | ||
42 | /* Reset handling */ | 44 | /* Reset handling */ |
43 | extern void efx_reset_down(struct efx_nic *efx, struct ethtool_cmd *ecmd); | 45 | extern void efx_reset_down(struct efx_nic *efx, enum reset_type method, |
44 | extern int efx_reset_up(struct efx_nic *efx, struct ethtool_cmd *ecmd, | 46 | struct ethtool_cmd *ecmd); |
45 | bool ok); | 47 | extern int efx_reset_up(struct efx_nic *efx, enum reset_type method, |
48 | struct ethtool_cmd *ecmd, bool ok); | ||
46 | 49 | ||
47 | /* Global */ | 50 | /* Global */ |
48 | extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); | 51 | extern void efx_schedule_reset(struct efx_nic *efx, enum reset_type type); |
diff --git a/drivers/net/sfc/ethtool.c b/drivers/net/sfc/ethtool.c index 53d259e90187..7b5924c039b3 100644 --- a/drivers/net/sfc/ethtool.c +++ b/drivers/net/sfc/ethtool.c | |||
@@ -219,9 +219,6 @@ int efx_ethtool_set_settings(struct net_device *net_dev, | |||
219 | struct efx_nic *efx = netdev_priv(net_dev); | 219 | struct efx_nic *efx = netdev_priv(net_dev); |
220 | int rc; | 220 | int rc; |
221 | 221 | ||
222 | if (EFX_WORKAROUND_13963(efx) && !ecmd->autoneg) | ||
223 | return -EINVAL; | ||
224 | |||
225 | /* Falcon GMAC does not support 1000Mbps HD */ | 222 | /* Falcon GMAC does not support 1000Mbps HD */ |
226 | if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) { | 223 | if (ecmd->speed == SPEED_1000 && ecmd->duplex != DUPLEX_FULL) { |
227 | EFX_LOG(efx, "rejecting unsupported 1000Mbps HD" | 224 | EFX_LOG(efx, "rejecting unsupported 1000Mbps HD" |
diff --git a/drivers/net/sfc/falcon.c b/drivers/net/sfc/falcon.c index 5b9f2d9cc4ed..d5378e60fcdd 100644 --- a/drivers/net/sfc/falcon.c +++ b/drivers/net/sfc/falcon.c | |||
@@ -824,10 +824,6 @@ static void falcon_handle_rx_not_ok(struct efx_rx_queue *rx_queue, | |||
824 | rx_ev_pause_frm ? " [PAUSE]" : ""); | 824 | rx_ev_pause_frm ? " [PAUSE]" : ""); |
825 | } | 825 | } |
826 | #endif | 826 | #endif |
827 | |||
828 | if (unlikely(rx_ev_eth_crc_err && EFX_WORKAROUND_10750(efx) && | ||
829 | efx->phy_type == PHY_TYPE_SFX7101)) | ||
830 | tenxpress_crc_err(efx); | ||
831 | } | 827 | } |
832 | 828 | ||
833 | /* Handle receive events that are not in-order. */ | 829 | /* Handle receive events that are not in-order. */ |
@@ -1887,7 +1883,7 @@ static int falcon_reset_macs(struct efx_nic *efx) | |||
1887 | 1883 | ||
1888 | /* MAC stats will fail whilst the TX fifo is draining. Serialise | 1884 | /* MAC stats will fail whilst the TX fifo is draining. Serialise |
1889 | * the drain sequence with the statistics fetch */ | 1885 | * the drain sequence with the statistics fetch */ |
1890 | spin_lock(&efx->stats_lock); | 1886 | efx_stats_disable(efx); |
1891 | 1887 | ||
1892 | falcon_read(efx, ®, MAC0_CTRL_REG_KER); | 1888 | falcon_read(efx, ®, MAC0_CTRL_REG_KER); |
1893 | EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, 1); | 1889 | EFX_SET_OWORD_FIELD(reg, TXFIFO_DRAIN_EN_B0, 1); |
@@ -1917,7 +1913,7 @@ static int falcon_reset_macs(struct efx_nic *efx) | |||
1917 | udelay(10); | 1913 | udelay(10); |
1918 | } | 1914 | } |
1919 | 1915 | ||
1920 | spin_unlock(&efx->stats_lock); | 1916 | efx_stats_enable(efx); |
1921 | 1917 | ||
1922 | /* If we've reset the EM block and the link is up, then | 1918 | /* If we've reset the EM block and the link is up, then |
1923 | * we'll have to kick the XAUI link so the PHY can recover */ | 1919 | * we'll have to kick the XAUI link so the PHY can recover */ |
@@ -2277,6 +2273,10 @@ int falcon_switch_mac(struct efx_nic *efx) | |||
2277 | struct efx_mac_operations *old_mac_op = efx->mac_op; | 2273 | struct efx_mac_operations *old_mac_op = efx->mac_op; |
2278 | efx_oword_t nic_stat; | 2274 | efx_oword_t nic_stat; |
2279 | unsigned strap_val; | 2275 | unsigned strap_val; |
2276 | int rc = 0; | ||
2277 | |||
2278 | /* Don't try to fetch MAC stats while we're switching MACs */ | ||
2279 | efx_stats_disable(efx); | ||
2280 | 2280 | ||
2281 | /* Internal loopbacks override the phy speed setting */ | 2281 | /* Internal loopbacks override the phy speed setting */ |
2282 | if (efx->loopback_mode == LOOPBACK_GMAC) { | 2282 | if (efx->loopback_mode == LOOPBACK_GMAC) { |
@@ -2287,16 +2287,12 @@ int falcon_switch_mac(struct efx_nic *efx) | |||
2287 | efx->link_fd = true; | 2287 | efx->link_fd = true; |
2288 | } | 2288 | } |
2289 | 2289 | ||
2290 | WARN_ON(!mutex_is_locked(&efx->mac_lock)); | ||
2290 | efx->mac_op = (EFX_IS10G(efx) ? | 2291 | efx->mac_op = (EFX_IS10G(efx) ? |
2291 | &falcon_xmac_operations : &falcon_gmac_operations); | 2292 | &falcon_xmac_operations : &falcon_gmac_operations); |
2292 | if (old_mac_op == efx->mac_op) | ||
2293 | return 0; | ||
2294 | |||
2295 | WARN_ON(!mutex_is_locked(&efx->mac_lock)); | ||
2296 | |||
2297 | /* Not all macs support a mac-level link state */ | ||
2298 | efx->mac_up = true; | ||
2299 | 2293 | ||
2294 | /* Always push the NIC_STAT_REG setting even if the mac hasn't | ||
2295 | * changed, because this function is run post online reset */ | ||
2300 | falcon_read(efx, &nic_stat, NIC_STAT_REG); | 2296 | falcon_read(efx, &nic_stat, NIC_STAT_REG); |
2301 | strap_val = EFX_IS10G(efx) ? 5 : 3; | 2297 | strap_val = EFX_IS10G(efx) ? 5 : 3; |
2302 | if (falcon_rev(efx) >= FALCON_REV_B0) { | 2298 | if (falcon_rev(efx) >= FALCON_REV_B0) { |
@@ -2309,9 +2305,17 @@ int falcon_switch_mac(struct efx_nic *efx) | |||
2309 | BUG_ON(EFX_OWORD_FIELD(nic_stat, STRAP_PINS) != strap_val); | 2305 | BUG_ON(EFX_OWORD_FIELD(nic_stat, STRAP_PINS) != strap_val); |
2310 | } | 2306 | } |
2311 | 2307 | ||
2308 | if (old_mac_op == efx->mac_op) | ||
2309 | goto out; | ||
2312 | 2310 | ||
2313 | EFX_LOG(efx, "selected %cMAC\n", EFX_IS10G(efx) ? 'X' : 'G'); | 2311 | EFX_LOG(efx, "selected %cMAC\n", EFX_IS10G(efx) ? 'X' : 'G'); |
2314 | return falcon_reset_macs(efx); | 2312 | /* Not all macs support a mac-level link state */ |
2313 | efx->mac_up = true; | ||
2314 | |||
2315 | rc = falcon_reset_macs(efx); | ||
2316 | out: | ||
2317 | efx_stats_enable(efx); | ||
2318 | return rc; | ||
2315 | } | 2319 | } |
2316 | 2320 | ||
2317 | /* This call is responsible for hooking in the MAC and PHY operations */ | 2321 | /* This call is responsible for hooking in the MAC and PHY operations */ |
diff --git a/drivers/net/sfc/mdio_10g.c b/drivers/net/sfc/mdio_10g.c index f6a16428113d..f9e2f95c3b48 100644 --- a/drivers/net/sfc/mdio_10g.c +++ b/drivers/net/sfc/mdio_10g.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include "net_driver.h" | 15 | #include "net_driver.h" |
16 | #include "mdio_10g.h" | 16 | #include "mdio_10g.h" |
17 | #include "boards.h" | 17 | #include "boards.h" |
18 | #include "workarounds.h" | ||
18 | 19 | ||
19 | int mdio_clause45_reset_mmd(struct efx_nic *port, int mmd, | 20 | int mdio_clause45_reset_mmd(struct efx_nic *port, int mmd, |
20 | int spins, int spintime) | 21 | int spins, int spintime) |
@@ -179,17 +180,12 @@ bool mdio_clause45_links_ok(struct efx_nic *efx, unsigned int mmd_mask) | |||
179 | return false; | 180 | return false; |
180 | else if (efx_phy_mode_disabled(efx->phy_mode)) | 181 | else if (efx_phy_mode_disabled(efx->phy_mode)) |
181 | return false; | 182 | return false; |
182 | else if (efx->loopback_mode == LOOPBACK_PHYXS) { | 183 | else if (efx->loopback_mode == LOOPBACK_PHYXS) |
183 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PHYXS | | 184 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PHYXS | |
184 | MDIO_MMDREG_DEVS_PCS | | 185 | MDIO_MMDREG_DEVS_PCS | |
185 | MDIO_MMDREG_DEVS_PMAPMD | | 186 | MDIO_MMDREG_DEVS_PMAPMD | |
186 | MDIO_MMDREG_DEVS_AN); | 187 | MDIO_MMDREG_DEVS_AN); |
187 | if (!mmd_mask) { | 188 | else if (efx->loopback_mode == LOOPBACK_PCS) |
188 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PHYXS, | ||
189 | MDIO_PHYXS_STATUS2); | ||
190 | return !(reg & (1 << MDIO_PHYXS_STATUS2_RX_FAULT_LBN)); | ||
191 | } | ||
192 | } else if (efx->loopback_mode == LOOPBACK_PCS) | ||
193 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PCS | | 189 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PCS | |
194 | MDIO_MMDREG_DEVS_PMAPMD | | 190 | MDIO_MMDREG_DEVS_PMAPMD | |
195 | MDIO_MMDREG_DEVS_AN); | 191 | MDIO_MMDREG_DEVS_AN); |
@@ -197,6 +193,13 @@ bool mdio_clause45_links_ok(struct efx_nic *efx, unsigned int mmd_mask) | |||
197 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PMAPMD | | 193 | mmd_mask &= ~(MDIO_MMDREG_DEVS_PMAPMD | |
198 | MDIO_MMDREG_DEVS_AN); | 194 | MDIO_MMDREG_DEVS_AN); |
199 | 195 | ||
196 | if (!mmd_mask) { | ||
197 | /* Use presence of XGMII faults in leui of link state */ | ||
198 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PHYXS, | ||
199 | MDIO_PHYXS_STATUS2); | ||
200 | return !(reg & (1 << MDIO_PHYXS_STATUS2_RX_FAULT_LBN)); | ||
201 | } | ||
202 | |||
200 | while (mmd_mask) { | 203 | while (mmd_mask) { |
201 | if (mmd_mask & 1) { | 204 | if (mmd_mask & 1) { |
202 | /* Double reads because link state is latched, and a | 205 | /* Double reads because link state is latched, and a |
@@ -263,7 +266,7 @@ void mdio_clause45_set_mmds_lpower(struct efx_nic *efx, | |||
263 | } | 266 | } |
264 | } | 267 | } |
265 | 268 | ||
266 | static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr, u32 xnp) | 269 | static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr) |
267 | { | 270 | { |
268 | int phy_id = efx->mii.phy_id; | 271 | int phy_id = efx->mii.phy_id; |
269 | u32 result = 0; | 272 | u32 result = 0; |
@@ -278,9 +281,6 @@ static u32 mdio_clause45_get_an(struct efx_nic *efx, u16 addr, u32 xnp) | |||
278 | result |= ADVERTISED_100baseT_Half; | 281 | result |= ADVERTISED_100baseT_Half; |
279 | if (reg & ADVERTISE_100FULL) | 282 | if (reg & ADVERTISE_100FULL) |
280 | result |= ADVERTISED_100baseT_Full; | 283 | result |= ADVERTISED_100baseT_Full; |
281 | if (reg & LPA_RESV) | ||
282 | result |= xnp; | ||
283 | |||
284 | return result; | 284 | return result; |
285 | } | 285 | } |
286 | 286 | ||
@@ -310,7 +310,7 @@ void mdio_clause45_get_settings(struct efx_nic *efx, | |||
310 | */ | 310 | */ |
311 | void mdio_clause45_get_settings_ext(struct efx_nic *efx, | 311 | void mdio_clause45_get_settings_ext(struct efx_nic *efx, |
312 | struct ethtool_cmd *ecmd, | 312 | struct ethtool_cmd *ecmd, |
313 | u32 xnp, u32 xnp_lpa) | 313 | u32 npage_adv, u32 npage_lpa) |
314 | { | 314 | { |
315 | int phy_id = efx->mii.phy_id; | 315 | int phy_id = efx->mii.phy_id; |
316 | int reg; | 316 | int reg; |
@@ -361,8 +361,8 @@ void mdio_clause45_get_settings_ext(struct efx_nic *efx, | |||
361 | ecmd->autoneg = AUTONEG_ENABLE; | 361 | ecmd->autoneg = AUTONEG_ENABLE; |
362 | ecmd->advertising |= | 362 | ecmd->advertising |= |
363 | ADVERTISED_Autoneg | | 363 | ADVERTISED_Autoneg | |
364 | mdio_clause45_get_an(efx, | 364 | mdio_clause45_get_an(efx, MDIO_AN_ADVERTISE) | |
365 | MDIO_AN_ADVERTISE, xnp); | 365 | npage_adv; |
366 | } else | 366 | } else |
367 | ecmd->autoneg = AUTONEG_DISABLE; | 367 | ecmd->autoneg = AUTONEG_DISABLE; |
368 | } else | 368 | } else |
@@ -371,27 +371,30 @@ void mdio_clause45_get_settings_ext(struct efx_nic *efx, | |||
371 | if (ecmd->autoneg) { | 371 | if (ecmd->autoneg) { |
372 | /* If AN is complete, report best common mode, | 372 | /* If AN is complete, report best common mode, |
373 | * otherwise report best advertised mode. */ | 373 | * otherwise report best advertised mode. */ |
374 | u32 common = ecmd->advertising; | 374 | u32 modes = 0; |
375 | if (mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, | 375 | if (mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, |
376 | MDIO_MMDREG_STAT1) & | 376 | MDIO_MMDREG_STAT1) & |
377 | (1 << MDIO_AN_STATUS_AN_DONE_LBN)) { | 377 | (1 << MDIO_AN_STATUS_AN_DONE_LBN)) |
378 | common &= mdio_clause45_get_an(efx, MDIO_AN_LPA, | 378 | modes = (ecmd->advertising & |
379 | xnp_lpa); | 379 | (mdio_clause45_get_an(efx, MDIO_AN_LPA) | |
380 | } | 380 | npage_lpa)); |
381 | if (common & ADVERTISED_10000baseT_Full) { | 381 | if (modes == 0) |
382 | modes = ecmd->advertising; | ||
383 | |||
384 | if (modes & ADVERTISED_10000baseT_Full) { | ||
382 | ecmd->speed = SPEED_10000; | 385 | ecmd->speed = SPEED_10000; |
383 | ecmd->duplex = DUPLEX_FULL; | 386 | ecmd->duplex = DUPLEX_FULL; |
384 | } else if (common & (ADVERTISED_1000baseT_Full | | 387 | } else if (modes & (ADVERTISED_1000baseT_Full | |
385 | ADVERTISED_1000baseT_Half)) { | 388 | ADVERTISED_1000baseT_Half)) { |
386 | ecmd->speed = SPEED_1000; | 389 | ecmd->speed = SPEED_1000; |
387 | ecmd->duplex = !!(common & ADVERTISED_1000baseT_Full); | 390 | ecmd->duplex = !!(modes & ADVERTISED_1000baseT_Full); |
388 | } else if (common & (ADVERTISED_100baseT_Full | | 391 | } else if (modes & (ADVERTISED_100baseT_Full | |
389 | ADVERTISED_100baseT_Half)) { | 392 | ADVERTISED_100baseT_Half)) { |
390 | ecmd->speed = SPEED_100; | 393 | ecmd->speed = SPEED_100; |
391 | ecmd->duplex = !!(common & ADVERTISED_100baseT_Full); | 394 | ecmd->duplex = !!(modes & ADVERTISED_100baseT_Full); |
392 | } else { | 395 | } else { |
393 | ecmd->speed = SPEED_10; | 396 | ecmd->speed = SPEED_10; |
394 | ecmd->duplex = !!(common & ADVERTISED_10baseT_Full); | 397 | ecmd->duplex = !!(modes & ADVERTISED_10baseT_Full); |
395 | } | 398 | } |
396 | } else { | 399 | } else { |
397 | /* Report forced settings */ | 400 | /* Report forced settings */ |
@@ -415,7 +418,7 @@ int mdio_clause45_set_settings(struct efx_nic *efx, | |||
415 | int phy_id = efx->mii.phy_id; | 418 | int phy_id = efx->mii.phy_id; |
416 | struct ethtool_cmd prev; | 419 | struct ethtool_cmd prev; |
417 | u32 required; | 420 | u32 required; |
418 | int ctrl1_bits, reg; | 421 | int reg; |
419 | 422 | ||
420 | efx->phy_op->get_settings(efx, &prev); | 423 | efx->phy_op->get_settings(efx, &prev); |
421 | 424 | ||
@@ -430,99 +433,83 @@ int mdio_clause45_set_settings(struct efx_nic *efx, | |||
430 | if (prev.port != PORT_TP || ecmd->port != PORT_TP) | 433 | if (prev.port != PORT_TP || ecmd->port != PORT_TP) |
431 | return -EINVAL; | 434 | return -EINVAL; |
432 | 435 | ||
433 | /* Check that PHY supports these settings and work out the | 436 | /* Check that PHY supports these settings */ |
434 | * basic control bits */ | 437 | if (ecmd->autoneg) { |
435 | if (ecmd->duplex) { | 438 | required = SUPPORTED_Autoneg; |
439 | } else if (ecmd->duplex) { | ||
436 | switch (ecmd->speed) { | 440 | switch (ecmd->speed) { |
437 | case SPEED_10: | 441 | case SPEED_10: required = SUPPORTED_10baseT_Full; break; |
438 | ctrl1_bits = BMCR_FULLDPLX; | 442 | case SPEED_100: required = SUPPORTED_100baseT_Full; break; |
439 | required = SUPPORTED_10baseT_Full; | 443 | default: return -EINVAL; |
440 | break; | ||
441 | case SPEED_100: | ||
442 | ctrl1_bits = BMCR_SPEED100 | BMCR_FULLDPLX; | ||
443 | required = SUPPORTED_100baseT_Full; | ||
444 | break; | ||
445 | case SPEED_1000: | ||
446 | ctrl1_bits = BMCR_SPEED1000 | BMCR_FULLDPLX; | ||
447 | required = SUPPORTED_1000baseT_Full; | ||
448 | break; | ||
449 | case SPEED_10000: | ||
450 | ctrl1_bits = (BMCR_SPEED1000 | BMCR_SPEED100 | | ||
451 | BMCR_FULLDPLX); | ||
452 | required = SUPPORTED_10000baseT_Full; | ||
453 | break; | ||
454 | default: | ||
455 | return -EINVAL; | ||
456 | } | 444 | } |
457 | } else { | 445 | } else { |
458 | switch (ecmd->speed) { | 446 | switch (ecmd->speed) { |
459 | case SPEED_10: | 447 | case SPEED_10: required = SUPPORTED_10baseT_Half; break; |
460 | ctrl1_bits = 0; | 448 | case SPEED_100: required = SUPPORTED_100baseT_Half; break; |
461 | required = SUPPORTED_10baseT_Half; | 449 | default: return -EINVAL; |
462 | break; | ||
463 | case SPEED_100: | ||
464 | ctrl1_bits = BMCR_SPEED100; | ||
465 | required = SUPPORTED_100baseT_Half; | ||
466 | break; | ||
467 | case SPEED_1000: | ||
468 | ctrl1_bits = BMCR_SPEED1000; | ||
469 | required = SUPPORTED_1000baseT_Half; | ||
470 | break; | ||
471 | default: | ||
472 | return -EINVAL; | ||
473 | } | 450 | } |
474 | } | 451 | } |
475 | if (ecmd->autoneg) | ||
476 | required |= SUPPORTED_Autoneg; | ||
477 | required |= ecmd->advertising; | 452 | required |= ecmd->advertising; |
478 | if (required & ~prev.supported) | 453 | if (required & ~prev.supported) |
479 | return -EINVAL; | 454 | return -EINVAL; |
480 | 455 | ||
481 | /* Set the basic control bits */ | 456 | if (ecmd->autoneg) { |
482 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, | 457 | bool xnp = (ecmd->advertising & ADVERTISED_10000baseT_Full |
483 | MDIO_MMDREG_CTRL1); | 458 | || EFX_WORKAROUND_13204(efx)); |
484 | reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | 0x003c); | 459 | |
485 | reg |= ctrl1_bits; | 460 | /* Set up the base page */ |
486 | mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, MDIO_MMDREG_CTRL1, | 461 | reg = ADVERTISE_CSMA; |
487 | reg); | 462 | if (ecmd->advertising & ADVERTISED_10baseT_Half) |
488 | 463 | reg |= ADVERTISE_10HALF; | |
489 | /* Set the AN registers */ | 464 | if (ecmd->advertising & ADVERTISED_10baseT_Full) |
490 | if (ecmd->autoneg != prev.autoneg || | 465 | reg |= ADVERTISE_10FULL; |
491 | ecmd->advertising != prev.advertising) { | 466 | if (ecmd->advertising & ADVERTISED_100baseT_Half) |
492 | bool xnp = false; | 467 | reg |= ADVERTISE_100HALF; |
493 | 468 | if (ecmd->advertising & ADVERTISED_100baseT_Full) | |
494 | if (efx->phy_op->set_xnp_advertise) | 469 | reg |= ADVERTISE_100FULL; |
495 | xnp = efx->phy_op->set_xnp_advertise(efx, | 470 | if (xnp) |
496 | ecmd->advertising); | 471 | reg |= ADVERTISE_RESV; |
497 | 472 | else if (ecmd->advertising & (ADVERTISED_1000baseT_Half | | |
498 | if (ecmd->autoneg) { | 473 | ADVERTISED_1000baseT_Full)) |
499 | reg = 0; | 474 | reg |= ADVERTISE_NPAGE; |
500 | if (ecmd->advertising & ADVERTISED_10baseT_Half) | 475 | reg |= efx_fc_advertise(efx->wanted_fc); |
501 | reg |= ADVERTISE_10HALF; | 476 | mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, |
502 | if (ecmd->advertising & ADVERTISED_10baseT_Full) | 477 | MDIO_AN_ADVERTISE, reg); |
503 | reg |= ADVERTISE_10FULL; | 478 | |
504 | if (ecmd->advertising & ADVERTISED_100baseT_Half) | 479 | /* Set up the (extended) next page if necessary */ |
505 | reg |= ADVERTISE_100HALF; | 480 | if (efx->phy_op->set_npage_adv) |
506 | if (ecmd->advertising & ADVERTISED_100baseT_Full) | 481 | efx->phy_op->set_npage_adv(efx, ecmd->advertising); |
507 | reg |= ADVERTISE_100FULL; | ||
508 | if (xnp) | ||
509 | reg |= ADVERTISE_RESV; | ||
510 | mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, | ||
511 | MDIO_AN_ADVERTISE, reg); | ||
512 | } | ||
513 | 482 | ||
483 | /* Enable and restart AN */ | ||
514 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, | 484 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, |
515 | MDIO_MMDREG_CTRL1); | 485 | MDIO_MMDREG_CTRL1); |
516 | if (ecmd->autoneg) | 486 | reg |= BMCR_ANENABLE; |
517 | reg |= BMCR_ANENABLE | BMCR_ANRESTART; | 487 | if (!(EFX_WORKAROUND_15195(efx) && |
518 | else | 488 | LOOPBACK_MASK(efx) & efx->phy_op->loopbacks)) |
519 | reg &= ~BMCR_ANENABLE; | 489 | reg |= BMCR_ANRESTART; |
520 | if (xnp) | 490 | if (xnp) |
521 | reg |= 1 << MDIO_AN_CTRL_XNP_LBN; | 491 | reg |= 1 << MDIO_AN_CTRL_XNP_LBN; |
522 | else | 492 | else |
523 | reg &= ~(1 << MDIO_AN_CTRL_XNP_LBN); | 493 | reg &= ~(1 << MDIO_AN_CTRL_XNP_LBN); |
524 | mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, | 494 | mdio_clause45_write(efx, phy_id, MDIO_MMD_AN, |
525 | MDIO_MMDREG_CTRL1, reg); | 495 | MDIO_MMDREG_CTRL1, reg); |
496 | } else { | ||
497 | /* Disable AN */ | ||
498 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, | ||
499 | MDIO_MMDREG_CTRL1, | ||
500 | __ffs(BMCR_ANENABLE), false); | ||
501 | |||
502 | /* Set the basic control bits */ | ||
503 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, | ||
504 | MDIO_MMDREG_CTRL1); | ||
505 | reg &= ~(BMCR_SPEED1000 | BMCR_SPEED100 | BMCR_FULLDPLX | | ||
506 | 0x003c); | ||
507 | if (ecmd->speed == SPEED_100) | ||
508 | reg |= BMCR_SPEED100; | ||
509 | if (ecmd->duplex) | ||
510 | reg |= BMCR_FULLDPLX; | ||
511 | mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, | ||
512 | MDIO_MMDREG_CTRL1, reg); | ||
526 | } | 513 | } |
527 | 514 | ||
528 | return 0; | 515 | return 0; |
diff --git a/drivers/net/sfc/mdio_10g.h b/drivers/net/sfc/mdio_10g.h index 09bf801d0569..8ba49773ce7e 100644 --- a/drivers/net/sfc/mdio_10g.h +++ b/drivers/net/sfc/mdio_10g.h | |||
@@ -155,7 +155,8 @@ | |||
155 | #define MDIO_AN_XNP 22 | 155 | #define MDIO_AN_XNP 22 |
156 | #define MDIO_AN_LPA_XNP 25 | 156 | #define MDIO_AN_LPA_XNP 25 |
157 | 157 | ||
158 | #define MDIO_AN_10GBT_ADVERTISE 32 | 158 | #define MDIO_AN_10GBT_CTRL 32 |
159 | #define MDIO_AN_10GBT_CTRL_ADV_10G_LBN 12 | ||
159 | #define MDIO_AN_10GBT_STATUS (33) | 160 | #define MDIO_AN_10GBT_STATUS (33) |
160 | #define MDIO_AN_10GBT_STATUS_MS_FLT_LBN (15) /* MASTER/SLAVE config fault */ | 161 | #define MDIO_AN_10GBT_STATUS_MS_FLT_LBN (15) /* MASTER/SLAVE config fault */ |
161 | #define MDIO_AN_10GBT_STATUS_MS_LBN (14) /* MASTER/SLAVE config */ | 162 | #define MDIO_AN_10GBT_STATUS_MS_LBN (14) /* MASTER/SLAVE config */ |
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 5f255f75754e..e019ad1fb9a0 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -566,7 +566,7 @@ struct efx_mac_operations { | |||
566 | * @poll: Poll for hardware state. Serialised by the mac_lock. | 566 | * @poll: Poll for hardware state. Serialised by the mac_lock. |
567 | * @get_settings: Get ethtool settings. Serialised by the mac_lock. | 567 | * @get_settings: Get ethtool settings. Serialised by the mac_lock. |
568 | * @set_settings: Set ethtool settings. Serialised by the mac_lock. | 568 | * @set_settings: Set ethtool settings. Serialised by the mac_lock. |
569 | * @set_xnp_advertise: Set abilities advertised in Extended Next Page | 569 | * @set_npage_adv: Set abilities advertised in (Extended) Next Page |
570 | * (only needed where AN bit is set in mmds) | 570 | * (only needed where AN bit is set in mmds) |
571 | * @num_tests: Number of PHY-specific tests/results | 571 | * @num_tests: Number of PHY-specific tests/results |
572 | * @test_names: Names of the tests/results | 572 | * @test_names: Names of the tests/results |
@@ -586,7 +586,7 @@ struct efx_phy_operations { | |||
586 | struct ethtool_cmd *ecmd); | 586 | struct ethtool_cmd *ecmd); |
587 | int (*set_settings) (struct efx_nic *efx, | 587 | int (*set_settings) (struct efx_nic *efx, |
588 | struct ethtool_cmd *ecmd); | 588 | struct ethtool_cmd *ecmd); |
589 | bool (*set_xnp_advertise) (struct efx_nic *efx, u32); | 589 | void (*set_npage_adv) (struct efx_nic *efx, u32); |
590 | u32 num_tests; | 590 | u32 num_tests; |
591 | const char *const *test_names; | 591 | const char *const *test_names; |
592 | int (*run_tests) (struct efx_nic *efx, int *results, unsigned flags); | 592 | int (*run_tests) (struct efx_nic *efx, int *results, unsigned flags); |
@@ -754,8 +754,7 @@ union efx_multicast_hash { | |||
754 | * &struct net_device_stats. | 754 | * &struct net_device_stats. |
755 | * @stats_buffer: DMA buffer for statistics | 755 | * @stats_buffer: DMA buffer for statistics |
756 | * @stats_lock: Statistics update lock. Serialises statistics fetches | 756 | * @stats_lock: Statistics update lock. Serialises statistics fetches |
757 | * @stats_enabled: Temporarily disable statistics fetches. | 757 | * @stats_disable_count: Nest count for disabling statistics fetches |
758 | * Serialised by @stats_lock | ||
759 | * @mac_op: MAC interface | 758 | * @mac_op: MAC interface |
760 | * @mac_address: Permanent MAC address | 759 | * @mac_address: Permanent MAC address |
761 | * @phy_type: PHY type | 760 | * @phy_type: PHY type |
@@ -837,7 +836,7 @@ struct efx_nic { | |||
837 | struct efx_mac_stats mac_stats; | 836 | struct efx_mac_stats mac_stats; |
838 | struct efx_buffer stats_buffer; | 837 | struct efx_buffer stats_buffer; |
839 | spinlock_t stats_lock; | 838 | spinlock_t stats_lock; |
840 | bool stats_enabled; | 839 | unsigned int stats_disable_count; |
841 | 840 | ||
842 | struct efx_mac_operations *mac_op; | 841 | struct efx_mac_operations *mac_op; |
843 | unsigned char mac_address[ETH_ALEN]; | 842 | unsigned char mac_address[ETH_ALEN]; |
diff --git a/drivers/net/sfc/phy.h b/drivers/net/sfc/phy.h index 58c493ef81bb..07e855c148bc 100644 --- a/drivers/net/sfc/phy.h +++ b/drivers/net/sfc/phy.h | |||
@@ -17,7 +17,6 @@ extern struct efx_phy_operations falcon_sfx7101_phy_ops; | |||
17 | extern struct efx_phy_operations falcon_sft9001_phy_ops; | 17 | extern struct efx_phy_operations falcon_sft9001_phy_ops; |
18 | 18 | ||
19 | extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink); | 19 | extern void tenxpress_phy_blink(struct efx_nic *efx, bool blink); |
20 | extern void tenxpress_crc_err(struct efx_nic *efx); | ||
21 | 20 | ||
22 | /**************************************************************************** | 21 | /**************************************************************************** |
23 | * Exported functions from the driver for XFP optical PHYs | 22 | * Exported functions from the driver for XFP optical PHYs |
diff --git a/drivers/net/sfc/selftest.c b/drivers/net/sfc/selftest.c index dba0d64d50cd..0a598084c513 100644 --- a/drivers/net/sfc/selftest.c +++ b/drivers/net/sfc/selftest.c | |||
@@ -665,6 +665,7 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, | |||
665 | { | 665 | { |
666 | enum efx_loopback_mode loopback_mode = efx->loopback_mode; | 666 | enum efx_loopback_mode loopback_mode = efx->loopback_mode; |
667 | int phy_mode = efx->phy_mode; | 667 | int phy_mode = efx->phy_mode; |
668 | enum reset_type reset_method = RESET_TYPE_INVISIBLE; | ||
668 | struct ethtool_cmd ecmd; | 669 | struct ethtool_cmd ecmd; |
669 | struct efx_channel *channel; | 670 | struct efx_channel *channel; |
670 | int rc_test = 0, rc_reset = 0, rc; | 671 | int rc_test = 0, rc_reset = 0, rc; |
@@ -718,21 +719,21 @@ int efx_selftest(struct efx_nic *efx, struct efx_self_tests *tests, | |||
718 | mutex_unlock(&efx->mac_lock); | 719 | mutex_unlock(&efx->mac_lock); |
719 | 720 | ||
720 | /* free up all consumers of SRAM (including all the queues) */ | 721 | /* free up all consumers of SRAM (including all the queues) */ |
721 | efx_reset_down(efx, &ecmd); | 722 | efx_reset_down(efx, reset_method, &ecmd); |
722 | 723 | ||
723 | rc = efx_test_chip(efx, tests); | 724 | rc = efx_test_chip(efx, tests); |
724 | if (rc && !rc_test) | 725 | if (rc && !rc_test) |
725 | rc_test = rc; | 726 | rc_test = rc; |
726 | 727 | ||
727 | /* reset the chip to recover from the register test */ | 728 | /* reset the chip to recover from the register test */ |
728 | rc_reset = falcon_reset_hw(efx, RESET_TYPE_ALL); | 729 | rc_reset = falcon_reset_hw(efx, reset_method); |
729 | 730 | ||
730 | /* Ensure that the phy is powered and out of loopback | 731 | /* Ensure that the phy is powered and out of loopback |
731 | * for the bist and loopback tests */ | 732 | * for the bist and loopback tests */ |
732 | efx->phy_mode &= ~PHY_MODE_LOW_POWER; | 733 | efx->phy_mode &= ~PHY_MODE_LOW_POWER; |
733 | efx->loopback_mode = LOOPBACK_NONE; | 734 | efx->loopback_mode = LOOPBACK_NONE; |
734 | 735 | ||
735 | rc = efx_reset_up(efx, &ecmd, rc_reset == 0); | 736 | rc = efx_reset_up(efx, reset_method, &ecmd, rc_reset == 0); |
736 | if (rc && !rc_reset) | 737 | if (rc && !rc_reset) |
737 | rc_reset = rc; | 738 | rc_reset = rc; |
738 | 739 | ||
diff --git a/drivers/net/sfc/sfe4001.c b/drivers/net/sfc/sfe4001.c index 16b80acb9992..cb25ae5b257a 100644 --- a/drivers/net/sfc/sfe4001.c +++ b/drivers/net/sfc/sfe4001.c | |||
@@ -186,19 +186,22 @@ static int sfn4111t_reset(struct efx_nic *efx) | |||
186 | { | 186 | { |
187 | efx_oword_t reg; | 187 | efx_oword_t reg; |
188 | 188 | ||
189 | /* GPIO pins are also used for I2C, so block that temporarily */ | 189 | /* GPIO 3 and the GPIO register are shared with I2C, so block that */ |
190 | mutex_lock(&efx->i2c_adap.bus_lock); | 190 | mutex_lock(&efx->i2c_adap.bus_lock); |
191 | 191 | ||
192 | /* Pull RST_N (GPIO 2) low then let it up again, setting the | ||
193 | * FLASH_CFG_1 strap (GPIO 3) appropriately. Only change the | ||
194 | * output enables; the output levels should always be 0 (low) | ||
195 | * and we rely on external pull-ups. */ | ||
192 | falcon_read(efx, ®, GPIO_CTL_REG_KER); | 196 | falcon_read(efx, ®, GPIO_CTL_REG_KER); |
193 | EFX_SET_OWORD_FIELD(reg, GPIO2_OEN, true); | 197 | EFX_SET_OWORD_FIELD(reg, GPIO2_OEN, true); |
194 | EFX_SET_OWORD_FIELD(reg, GPIO2_OUT, false); | ||
195 | falcon_write(efx, ®, GPIO_CTL_REG_KER); | 198 | falcon_write(efx, ®, GPIO_CTL_REG_KER); |
196 | msleep(1000); | 199 | msleep(1000); |
197 | EFX_SET_OWORD_FIELD(reg, GPIO2_OUT, true); | 200 | EFX_SET_OWORD_FIELD(reg, GPIO2_OEN, false); |
198 | EFX_SET_OWORD_FIELD(reg, GPIO3_OEN, true); | 201 | EFX_SET_OWORD_FIELD(reg, GPIO3_OEN, |
199 | EFX_SET_OWORD_FIELD(reg, GPIO3_OUT, | 202 | !!(efx->phy_mode & PHY_MODE_SPECIAL)); |
200 | !(efx->phy_mode & PHY_MODE_SPECIAL)); | ||
201 | falcon_write(efx, ®, GPIO_CTL_REG_KER); | 203 | falcon_write(efx, ®, GPIO_CTL_REG_KER); |
204 | msleep(1); | ||
202 | 205 | ||
203 | mutex_unlock(&efx->i2c_adap.bus_lock); | 206 | mutex_unlock(&efx->i2c_adap.bus_lock); |
204 | 207 | ||
@@ -232,12 +235,18 @@ static ssize_t set_phy_flash_cfg(struct device *dev, | |||
232 | } else if (efx->state != STATE_RUNNING || netif_running(efx->net_dev)) { | 235 | } else if (efx->state != STATE_RUNNING || netif_running(efx->net_dev)) { |
233 | err = -EBUSY; | 236 | err = -EBUSY; |
234 | } else { | 237 | } else { |
238 | /* Reset the PHY, reconfigure the MAC and enable/disable | ||
239 | * MAC stats accordingly. */ | ||
235 | efx->phy_mode = new_mode; | 240 | efx->phy_mode = new_mode; |
241 | if (new_mode & PHY_MODE_SPECIAL) | ||
242 | efx_stats_disable(efx); | ||
236 | if (efx->board_info.type == EFX_BOARD_SFE4001) | 243 | if (efx->board_info.type == EFX_BOARD_SFE4001) |
237 | err = sfe4001_poweron(efx); | 244 | err = sfe4001_poweron(efx); |
238 | else | 245 | else |
239 | err = sfn4111t_reset(efx); | 246 | err = sfn4111t_reset(efx); |
240 | efx_reconfigure_port(efx); | 247 | efx_reconfigure_port(efx); |
248 | if (!(new_mode & PHY_MODE_SPECIAL)) | ||
249 | efx_stats_enable(efx); | ||
241 | } | 250 | } |
242 | rtnl_unlock(); | 251 | rtnl_unlock(); |
243 | 252 | ||
@@ -326,6 +335,11 @@ int sfe4001_init(struct efx_nic *efx) | |||
326 | efx->board_info.monitor = sfe4001_check_hw; | 335 | efx->board_info.monitor = sfe4001_check_hw; |
327 | efx->board_info.fini = sfe4001_fini; | 336 | efx->board_info.fini = sfe4001_fini; |
328 | 337 | ||
338 | if (efx->phy_mode & PHY_MODE_SPECIAL) { | ||
339 | /* PHY won't generate a 156.25 MHz clock and MAC stats fetch | ||
340 | * will fail. */ | ||
341 | efx_stats_disable(efx); | ||
342 | } | ||
329 | rc = sfe4001_poweron(efx); | 343 | rc = sfe4001_poweron(efx); |
330 | if (rc) | 344 | if (rc) |
331 | goto fail_ioexp; | 345 | goto fail_ioexp; |
@@ -372,17 +386,25 @@ static void sfn4111t_fini(struct efx_nic *efx) | |||
372 | i2c_unregister_device(efx->board_info.hwmon_client); | 386 | i2c_unregister_device(efx->board_info.hwmon_client); |
373 | } | 387 | } |
374 | 388 | ||
375 | static struct i2c_board_info sfn4111t_hwmon_info = { | 389 | static struct i2c_board_info sfn4111t_a0_hwmon_info = { |
376 | I2C_BOARD_INFO("max6647", 0x4e), | 390 | I2C_BOARD_INFO("max6647", 0x4e), |
377 | .irq = -1, | 391 | .irq = -1, |
378 | }; | 392 | }; |
379 | 393 | ||
394 | static struct i2c_board_info sfn4111t_r5_hwmon_info = { | ||
395 | I2C_BOARD_INFO("max6646", 0x4d), | ||
396 | .irq = -1, | ||
397 | }; | ||
398 | |||
380 | int sfn4111t_init(struct efx_nic *efx) | 399 | int sfn4111t_init(struct efx_nic *efx) |
381 | { | 400 | { |
382 | int rc; | 401 | int rc; |
383 | 402 | ||
384 | efx->board_info.hwmon_client = | 403 | efx->board_info.hwmon_client = |
385 | i2c_new_device(&efx->i2c_adap, &sfn4111t_hwmon_info); | 404 | i2c_new_device(&efx->i2c_adap, |
405 | (efx->board_info.minor < 5) ? | ||
406 | &sfn4111t_a0_hwmon_info : | ||
407 | &sfn4111t_r5_hwmon_info); | ||
386 | if (!efx->board_info.hwmon_client) | 408 | if (!efx->board_info.hwmon_client) |
387 | return -EIO; | 409 | return -EIO; |
388 | 410 | ||
@@ -394,8 +416,10 @@ int sfn4111t_init(struct efx_nic *efx) | |||
394 | if (rc) | 416 | if (rc) |
395 | goto fail_hwmon; | 417 | goto fail_hwmon; |
396 | 418 | ||
397 | if (efx->phy_mode & PHY_MODE_SPECIAL) | 419 | if (efx->phy_mode & PHY_MODE_SPECIAL) { |
420 | efx_stats_disable(efx); | ||
398 | sfn4111t_reset(efx); | 421 | sfn4111t_reset(efx); |
422 | } | ||
399 | 423 | ||
400 | return 0; | 424 | return 0; |
401 | 425 | ||
diff --git a/drivers/net/sfc/tenxpress.c b/drivers/net/sfc/tenxpress.c index 9ecb77da9545..f0efd246962c 100644 --- a/drivers/net/sfc/tenxpress.c +++ b/drivers/net/sfc/tenxpress.c | |||
@@ -67,6 +67,8 @@ | |||
67 | #define PMA_PMD_EXT_CLK312_WIDTH 1 | 67 | #define PMA_PMD_EXT_CLK312_WIDTH 1 |
68 | #define PMA_PMD_EXT_LPOWER_LBN 12 | 68 | #define PMA_PMD_EXT_LPOWER_LBN 12 |
69 | #define PMA_PMD_EXT_LPOWER_WIDTH 1 | 69 | #define PMA_PMD_EXT_LPOWER_WIDTH 1 |
70 | #define PMA_PMD_EXT_ROBUST_LBN 14 | ||
71 | #define PMA_PMD_EXT_ROBUST_WIDTH 1 | ||
70 | #define PMA_PMD_EXT_SSR_LBN 15 | 72 | #define PMA_PMD_EXT_SSR_LBN 15 |
71 | #define PMA_PMD_EXT_SSR_WIDTH 1 | 73 | #define PMA_PMD_EXT_SSR_WIDTH 1 |
72 | 74 | ||
@@ -177,35 +179,24 @@ | |||
177 | #define C22EXT_STATUS_LINK_LBN 2 | 179 | #define C22EXT_STATUS_LINK_LBN 2 |
178 | #define C22EXT_STATUS_LINK_WIDTH 1 | 180 | #define C22EXT_STATUS_LINK_WIDTH 1 |
179 | 181 | ||
180 | #define C22EXT_MSTSLV_REG 49162 | 182 | #define C22EXT_MSTSLV_CTRL 49161 |
181 | #define C22EXT_MSTSLV_1000_HD_LBN 10 | 183 | #define C22EXT_MSTSLV_CTRL_ADV_1000_HD_LBN 8 |
182 | #define C22EXT_MSTSLV_1000_HD_WIDTH 1 | 184 | #define C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN 9 |
183 | #define C22EXT_MSTSLV_1000_FD_LBN 11 | 185 | |
184 | #define C22EXT_MSTSLV_1000_FD_WIDTH 1 | 186 | #define C22EXT_MSTSLV_STATUS 49162 |
187 | #define C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN 10 | ||
188 | #define C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN 11 | ||
185 | 189 | ||
186 | /* Time to wait between powering down the LNPGA and turning off the power | 190 | /* Time to wait between powering down the LNPGA and turning off the power |
187 | * rails */ | 191 | * rails */ |
188 | #define LNPGA_PDOWN_WAIT (HZ / 5) | 192 | #define LNPGA_PDOWN_WAIT (HZ / 5) |
189 | 193 | ||
190 | static int crc_error_reset_threshold = 100; | ||
191 | module_param(crc_error_reset_threshold, int, 0644); | ||
192 | MODULE_PARM_DESC(crc_error_reset_threshold, | ||
193 | "Max number of CRC errors before XAUI reset"); | ||
194 | |||
195 | struct tenxpress_phy_data { | 194 | struct tenxpress_phy_data { |
196 | enum efx_loopback_mode loopback_mode; | 195 | enum efx_loopback_mode loopback_mode; |
197 | atomic_t bad_crc_count; | ||
198 | enum efx_phy_mode phy_mode; | 196 | enum efx_phy_mode phy_mode; |
199 | int bad_lp_tries; | 197 | int bad_lp_tries; |
200 | }; | 198 | }; |
201 | 199 | ||
202 | void tenxpress_crc_err(struct efx_nic *efx) | ||
203 | { | ||
204 | struct tenxpress_phy_data *phy_data = efx->phy_data; | ||
205 | if (phy_data != NULL) | ||
206 | atomic_inc(&phy_data->bad_crc_count); | ||
207 | } | ||
208 | |||
209 | static ssize_t show_phy_short_reach(struct device *dev, | 200 | static ssize_t show_phy_short_reach(struct device *dev, |
210 | struct device_attribute *attr, char *buf) | 201 | struct device_attribute *attr, char *buf) |
211 | { | 202 | { |
@@ -284,7 +275,9 @@ static int tenxpress_init(struct efx_nic *efx) | |||
284 | PMA_PMD_XCONTROL_REG); | 275 | PMA_PMD_XCONTROL_REG); |
285 | reg |= ((1 << PMA_PMD_EXT_GMII_EN_LBN) | | 276 | reg |= ((1 << PMA_PMD_EXT_GMII_EN_LBN) | |
286 | (1 << PMA_PMD_EXT_CLK_OUT_LBN) | | 277 | (1 << PMA_PMD_EXT_CLK_OUT_LBN) | |
287 | (1 << PMA_PMD_EXT_CLK312_LBN)); | 278 | (1 << PMA_PMD_EXT_CLK312_LBN) | |
279 | (1 << PMA_PMD_EXT_ROBUST_LBN)); | ||
280 | |||
288 | mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, | 281 | mdio_clause45_write(efx, phy_id, MDIO_MMD_PMAPMD, |
289 | PMA_PMD_XCONTROL_REG, reg); | 282 | PMA_PMD_XCONTROL_REG, reg); |
290 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, | 283 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, |
@@ -346,6 +339,7 @@ static int tenxpress_phy_init(struct efx_nic *efx) | |||
346 | rc = tenxpress_init(efx); | 339 | rc = tenxpress_init(efx); |
347 | if (rc < 0) | 340 | if (rc < 0) |
348 | goto fail; | 341 | goto fail; |
342 | mdio_clause45_set_pause(efx); | ||
349 | 343 | ||
350 | if (efx->phy_type == PHY_TYPE_SFT9001B) { | 344 | if (efx->phy_type == PHY_TYPE_SFT9001B) { |
351 | rc = device_create_file(&efx->pci_dev->dev, | 345 | rc = device_create_file(&efx->pci_dev->dev, |
@@ -376,8 +370,8 @@ static int tenxpress_special_reset(struct efx_nic *efx) | |||
376 | 370 | ||
377 | /* The XGMAC clock is driven from the SFC7101/SFT9001 312MHz clock, so | 371 | /* The XGMAC clock is driven from the SFC7101/SFT9001 312MHz clock, so |
378 | * a special software reset can glitch the XGMAC sufficiently for stats | 372 | * a special software reset can glitch the XGMAC sufficiently for stats |
379 | * requests to fail. Since we don't often special_reset, just lock. */ | 373 | * requests to fail. */ |
380 | spin_lock(&efx->stats_lock); | 374 | efx_stats_disable(efx); |
381 | 375 | ||
382 | /* Initiate reset */ | 376 | /* Initiate reset */ |
383 | reg = mdio_clause45_read(efx, efx->mii.phy_id, | 377 | reg = mdio_clause45_read(efx, efx->mii.phy_id, |
@@ -392,17 +386,17 @@ static int tenxpress_special_reset(struct efx_nic *efx) | |||
392 | rc = mdio_clause45_wait_reset_mmds(efx, | 386 | rc = mdio_clause45_wait_reset_mmds(efx, |
393 | TENXPRESS_REQUIRED_DEVS); | 387 | TENXPRESS_REQUIRED_DEVS); |
394 | if (rc < 0) | 388 | if (rc < 0) |
395 | goto unlock; | 389 | goto out; |
396 | 390 | ||
397 | /* Try and reconfigure the device */ | 391 | /* Try and reconfigure the device */ |
398 | rc = tenxpress_init(efx); | 392 | rc = tenxpress_init(efx); |
399 | if (rc < 0) | 393 | if (rc < 0) |
400 | goto unlock; | 394 | goto out; |
401 | 395 | ||
402 | /* Wait for the XGXS state machine to churn */ | 396 | /* Wait for the XGXS state machine to churn */ |
403 | mdelay(10); | 397 | mdelay(10); |
404 | unlock: | 398 | out: |
405 | spin_unlock(&efx->stats_lock); | 399 | efx_stats_enable(efx); |
406 | return rc; | 400 | return rc; |
407 | } | 401 | } |
408 | 402 | ||
@@ -520,7 +514,7 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx) | |||
520 | { | 514 | { |
521 | struct tenxpress_phy_data *phy_data = efx->phy_data; | 515 | struct tenxpress_phy_data *phy_data = efx->phy_data; |
522 | struct ethtool_cmd ecmd; | 516 | struct ethtool_cmd ecmd; |
523 | bool phy_mode_change, loop_reset, loop_toggle, loopback; | 517 | bool phy_mode_change, loop_reset; |
524 | 518 | ||
525 | if (efx->phy_mode & (PHY_MODE_OFF | PHY_MODE_SPECIAL)) { | 519 | if (efx->phy_mode & (PHY_MODE_OFF | PHY_MODE_SPECIAL)) { |
526 | phy_data->phy_mode = efx->phy_mode; | 520 | phy_data->phy_mode = efx->phy_mode; |
@@ -531,12 +525,10 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx) | |||
531 | 525 | ||
532 | phy_mode_change = (efx->phy_mode == PHY_MODE_NORMAL && | 526 | phy_mode_change = (efx->phy_mode == PHY_MODE_NORMAL && |
533 | phy_data->phy_mode != PHY_MODE_NORMAL); | 527 | phy_data->phy_mode != PHY_MODE_NORMAL); |
534 | loopback = LOOPBACK_MASK(efx) & efx->phy_op->loopbacks; | ||
535 | loop_toggle = LOOPBACK_CHANGED(phy_data, efx, efx->phy_op->loopbacks); | ||
536 | loop_reset = (LOOPBACK_OUT_OF(phy_data, efx, efx->phy_op->loopbacks) || | 528 | loop_reset = (LOOPBACK_OUT_OF(phy_data, efx, efx->phy_op->loopbacks) || |
537 | LOOPBACK_CHANGED(phy_data, efx, 1 << LOOPBACK_GPHY)); | 529 | LOOPBACK_CHANGED(phy_data, efx, 1 << LOOPBACK_GPHY)); |
538 | 530 | ||
539 | if (loop_reset || loop_toggle || loopback || phy_mode_change) { | 531 | if (loop_reset || phy_mode_change) { |
540 | int rc; | 532 | int rc; |
541 | 533 | ||
542 | efx->phy_op->get_settings(efx, &ecmd); | 534 | efx->phy_op->get_settings(efx, &ecmd); |
@@ -551,20 +543,6 @@ static void tenxpress_phy_reconfigure(struct efx_nic *efx) | |||
551 | falcon_reset_xaui(efx); | 543 | falcon_reset_xaui(efx); |
552 | } | 544 | } |
553 | 545 | ||
554 | if (efx->phy_type != PHY_TYPE_SFX7101) { | ||
555 | /* Only change autoneg once, on coming out or | ||
556 | * going into loopback */ | ||
557 | if (loop_toggle) | ||
558 | ecmd.autoneg = !loopback; | ||
559 | if (loopback) { | ||
560 | ecmd.duplex = DUPLEX_FULL; | ||
561 | if (efx->loopback_mode == LOOPBACK_GPHY) | ||
562 | ecmd.speed = SPEED_1000; | ||
563 | else | ||
564 | ecmd.speed = SPEED_10000; | ||
565 | } | ||
566 | } | ||
567 | |||
568 | rc = efx->phy_op->set_settings(efx, &ecmd); | 546 | rc = efx->phy_op->set_settings(efx, &ecmd); |
569 | WARN_ON(rc); | 547 | WARN_ON(rc); |
570 | } | 548 | } |
@@ -623,13 +601,6 @@ static void tenxpress_phy_poll(struct efx_nic *efx) | |||
623 | 601 | ||
624 | if (phy_data->phy_mode != PHY_MODE_NORMAL) | 602 | if (phy_data->phy_mode != PHY_MODE_NORMAL) |
625 | return; | 603 | return; |
626 | |||
627 | if (EFX_WORKAROUND_10750(efx) && | ||
628 | atomic_read(&phy_data->bad_crc_count) > crc_error_reset_threshold) { | ||
629 | EFX_ERR(efx, "Resetting XAUI due to too many CRC errors\n"); | ||
630 | falcon_reset_xaui(efx); | ||
631 | atomic_set(&phy_data->bad_crc_count, 0); | ||
632 | } | ||
633 | } | 604 | } |
634 | 605 | ||
635 | static void tenxpress_phy_fini(struct efx_nic *efx) | 606 | static void tenxpress_phy_fini(struct efx_nic *efx) |
@@ -772,107 +743,76 @@ reset: | |||
772 | return rc; | 743 | return rc; |
773 | } | 744 | } |
774 | 745 | ||
775 | static u32 tenxpress_get_xnp_lpa(struct efx_nic *efx) | 746 | static void |
747 | tenxpress_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | ||
776 | { | 748 | { |
777 | int phy = efx->mii.phy_id; | 749 | int phy_id = efx->mii.phy_id; |
778 | u32 lpa = 0; | 750 | u32 adv = 0, lpa = 0; |
779 | int reg; | 751 | int reg; |
780 | 752 | ||
781 | if (efx->phy_type != PHY_TYPE_SFX7101) { | 753 | if (efx->phy_type != PHY_TYPE_SFX7101) { |
782 | reg = mdio_clause45_read(efx, phy, MDIO_MMD_C22EXT, | 754 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, |
783 | C22EXT_MSTSLV_REG); | 755 | C22EXT_MSTSLV_CTRL); |
784 | if (reg & (1 << C22EXT_MSTSLV_1000_HD_LBN)) | 756 | if (reg & (1 << C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN)) |
757 | adv |= ADVERTISED_1000baseT_Full; | ||
758 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, | ||
759 | C22EXT_MSTSLV_STATUS); | ||
760 | if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_HD_LBN)) | ||
785 | lpa |= ADVERTISED_1000baseT_Half; | 761 | lpa |= ADVERTISED_1000baseT_Half; |
786 | if (reg & (1 << C22EXT_MSTSLV_1000_FD_LBN)) | 762 | if (reg & (1 << C22EXT_MSTSLV_STATUS_LP_1000_FD_LBN)) |
787 | lpa |= ADVERTISED_1000baseT_Full; | 763 | lpa |= ADVERTISED_1000baseT_Full; |
788 | } | 764 | } |
789 | reg = mdio_clause45_read(efx, phy, MDIO_MMD_AN, MDIO_AN_10GBT_STATUS); | 765 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, |
766 | MDIO_AN_10GBT_CTRL); | ||
767 | if (reg & (1 << MDIO_AN_10GBT_CTRL_ADV_10G_LBN)) | ||
768 | adv |= ADVERTISED_10000baseT_Full; | ||
769 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_AN, | ||
770 | MDIO_AN_10GBT_STATUS); | ||
790 | if (reg & (1 << MDIO_AN_10GBT_STATUS_LP_10G_LBN)) | 771 | if (reg & (1 << MDIO_AN_10GBT_STATUS_LP_10G_LBN)) |
791 | lpa |= ADVERTISED_10000baseT_Full; | 772 | lpa |= ADVERTISED_10000baseT_Full; |
792 | return lpa; | ||
793 | } | ||
794 | 773 | ||
795 | static void sfx7101_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | 774 | mdio_clause45_get_settings_ext(efx, ecmd, adv, lpa); |
796 | { | 775 | |
797 | mdio_clause45_get_settings_ext(efx, ecmd, ADVERTISED_10000baseT_Full, | 776 | if (efx->phy_type != PHY_TYPE_SFX7101) |
798 | tenxpress_get_xnp_lpa(efx)); | 777 | ecmd->supported |= (SUPPORTED_100baseT_Full | |
799 | ecmd->supported |= SUPPORTED_10000baseT_Full; | 778 | SUPPORTED_1000baseT_Full); |
800 | ecmd->advertising |= ADVERTISED_10000baseT_Full; | 779 | |
780 | /* In loopback, the PHY automatically brings up the correct interface, | ||
781 | * but doesn't advertise the correct speed. So override it */ | ||
782 | if (efx->loopback_mode == LOOPBACK_GPHY) | ||
783 | ecmd->speed = SPEED_1000; | ||
784 | else if (LOOPBACK_MASK(efx) & efx->phy_op->loopbacks) | ||
785 | ecmd->speed = SPEED_10000; | ||
801 | } | 786 | } |
802 | 787 | ||
803 | static void sft9001_get_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | 788 | static int tenxpress_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) |
804 | { | 789 | { |
805 | int phy_id = efx->mii.phy_id; | 790 | if (!ecmd->autoneg) |
806 | u32 xnp_adv = 0; | 791 | return -EINVAL; |
807 | int reg; | ||
808 | |||
809 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_PMAPMD, | ||
810 | PMA_PMD_SPEED_ENABLE_REG); | ||
811 | if (EFX_WORKAROUND_13204(efx) && (reg & (1 << PMA_PMD_100TX_ADV_LBN))) | ||
812 | xnp_adv |= ADVERTISED_100baseT_Full; | ||
813 | if (reg & (1 << PMA_PMD_1000T_ADV_LBN)) | ||
814 | xnp_adv |= ADVERTISED_1000baseT_Full; | ||
815 | if (reg & (1 << PMA_PMD_10000T_ADV_LBN)) | ||
816 | xnp_adv |= ADVERTISED_10000baseT_Full; | ||
817 | |||
818 | mdio_clause45_get_settings_ext(efx, ecmd, xnp_adv, | ||
819 | tenxpress_get_xnp_lpa(efx)); | ||
820 | |||
821 | ecmd->supported |= (SUPPORTED_100baseT_Half | | ||
822 | SUPPORTED_100baseT_Full | | ||
823 | SUPPORTED_1000baseT_Full); | ||
824 | 792 | ||
825 | /* Use the vendor defined C22ext register for duplex settings */ | 793 | return mdio_clause45_set_settings(efx, ecmd); |
826 | if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) { | ||
827 | reg = mdio_clause45_read(efx, phy_id, MDIO_MMD_C22EXT, | ||
828 | GPHY_XCONTROL_REG); | ||
829 | ecmd->duplex = (reg & (1 << GPHY_DUPLEX_LBN) ? | ||
830 | DUPLEX_FULL : DUPLEX_HALF); | ||
831 | } | ||
832 | } | 794 | } |
833 | 795 | ||
834 | static int sft9001_set_settings(struct efx_nic *efx, struct ethtool_cmd *ecmd) | 796 | static void sfx7101_set_npage_adv(struct efx_nic *efx, u32 advertising) |
835 | { | 797 | { |
836 | int phy_id = efx->mii.phy_id; | 798 | mdio_clause45_set_flag(efx, efx->mii.phy_id, MDIO_MMD_AN, |
837 | int rc; | 799 | MDIO_AN_10GBT_CTRL, |
838 | 800 | MDIO_AN_10GBT_CTRL_ADV_10G_LBN, | |
839 | rc = mdio_clause45_set_settings(efx, ecmd); | 801 | advertising & ADVERTISED_10000baseT_Full); |
840 | if (rc) | ||
841 | return rc; | ||
842 | |||
843 | if (ecmd->speed != SPEED_10000 && !ecmd->autoneg) | ||
844 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, | ||
845 | GPHY_XCONTROL_REG, GPHY_DUPLEX_LBN, | ||
846 | ecmd->duplex == DUPLEX_FULL); | ||
847 | |||
848 | return rc; | ||
849 | } | 802 | } |
850 | 803 | ||
851 | static bool sft9001_set_xnp_advertise(struct efx_nic *efx, u32 advertising) | 804 | static void sft9001_set_npage_adv(struct efx_nic *efx, u32 advertising) |
852 | { | 805 | { |
853 | int phy = efx->mii.phy_id; | 806 | int phy_id = efx->mii.phy_id; |
854 | int reg = mdio_clause45_read(efx, phy, MDIO_MMD_PMAPMD, | 807 | |
855 | PMA_PMD_SPEED_ENABLE_REG); | 808 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_C22EXT, |
856 | bool enabled; | 809 | C22EXT_MSTSLV_CTRL, |
857 | 810 | C22EXT_MSTSLV_CTRL_ADV_1000_FD_LBN, | |
858 | reg &= ~((1 << 2) | (1 << 3)); | 811 | advertising & ADVERTISED_1000baseT_Full); |
859 | if (EFX_WORKAROUND_13204(efx) && | 812 | mdio_clause45_set_flag(efx, phy_id, MDIO_MMD_AN, |
860 | (advertising & ADVERTISED_100baseT_Full)) | 813 | MDIO_AN_10GBT_CTRL, |
861 | reg |= 1 << PMA_PMD_100TX_ADV_LBN; | 814 | MDIO_AN_10GBT_CTRL_ADV_10G_LBN, |
862 | if (advertising & ADVERTISED_1000baseT_Full) | 815 | advertising & ADVERTISED_10000baseT_Full); |
863 | reg |= 1 << PMA_PMD_1000T_ADV_LBN; | ||
864 | if (advertising & ADVERTISED_10000baseT_Full) | ||
865 | reg |= 1 << PMA_PMD_10000T_ADV_LBN; | ||
866 | mdio_clause45_write(efx, phy, MDIO_MMD_PMAPMD, | ||
867 | PMA_PMD_SPEED_ENABLE_REG, reg); | ||
868 | |||
869 | enabled = (advertising & | ||
870 | (ADVERTISED_1000baseT_Half | | ||
871 | ADVERTISED_1000baseT_Full | | ||
872 | ADVERTISED_10000baseT_Full)); | ||
873 | if (EFX_WORKAROUND_13204(efx)) | ||
874 | enabled |= (advertising & ADVERTISED_100baseT_Full); | ||
875 | return enabled; | ||
876 | } | 816 | } |
877 | 817 | ||
878 | struct efx_phy_operations falcon_sfx7101_phy_ops = { | 818 | struct efx_phy_operations falcon_sfx7101_phy_ops = { |
@@ -882,8 +822,9 @@ struct efx_phy_operations falcon_sfx7101_phy_ops = { | |||
882 | .poll = tenxpress_phy_poll, | 822 | .poll = tenxpress_phy_poll, |
883 | .fini = tenxpress_phy_fini, | 823 | .fini = tenxpress_phy_fini, |
884 | .clear_interrupt = efx_port_dummy_op_void, | 824 | .clear_interrupt = efx_port_dummy_op_void, |
885 | .get_settings = sfx7101_get_settings, | 825 | .get_settings = tenxpress_get_settings, |
886 | .set_settings = mdio_clause45_set_settings, | 826 | .set_settings = tenxpress_set_settings, |
827 | .set_npage_adv = sfx7101_set_npage_adv, | ||
887 | .num_tests = ARRAY_SIZE(sfx7101_test_names), | 828 | .num_tests = ARRAY_SIZE(sfx7101_test_names), |
888 | .test_names = sfx7101_test_names, | 829 | .test_names = sfx7101_test_names, |
889 | .run_tests = sfx7101_run_tests, | 830 | .run_tests = sfx7101_run_tests, |
@@ -898,9 +839,9 @@ struct efx_phy_operations falcon_sft9001_phy_ops = { | |||
898 | .poll = tenxpress_phy_poll, | 839 | .poll = tenxpress_phy_poll, |
899 | .fini = tenxpress_phy_fini, | 840 | .fini = tenxpress_phy_fini, |
900 | .clear_interrupt = efx_port_dummy_op_void, | 841 | .clear_interrupt = efx_port_dummy_op_void, |
901 | .get_settings = sft9001_get_settings, | 842 | .get_settings = tenxpress_get_settings, |
902 | .set_settings = sft9001_set_settings, | 843 | .set_settings = tenxpress_set_settings, |
903 | .set_xnp_advertise = sft9001_set_xnp_advertise, | 844 | .set_npage_adv = sft9001_set_npage_adv, |
904 | .num_tests = ARRAY_SIZE(sft9001_test_names), | 845 | .num_tests = ARRAY_SIZE(sft9001_test_names), |
905 | .test_names = sft9001_test_names, | 846 | .test_names = sft9001_test_names, |
906 | .run_tests = sft9001_run_tests, | 847 | .run_tests = sft9001_run_tests, |
diff --git a/drivers/net/sfc/workarounds.h b/drivers/net/sfc/workarounds.h index 82e03e1d7371..78de68f4a95b 100644 --- a/drivers/net/sfc/workarounds.h +++ b/drivers/net/sfc/workarounds.h | |||
@@ -18,8 +18,8 @@ | |||
18 | #define EFX_WORKAROUND_ALWAYS(efx) 1 | 18 | #define EFX_WORKAROUND_ALWAYS(efx) 1 |
19 | #define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) | 19 | #define EFX_WORKAROUND_FALCON_A(efx) (falcon_rev(efx) <= FALCON_REV_A1) |
20 | #define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx) | 20 | #define EFX_WORKAROUND_10G(efx) EFX_IS10G(efx) |
21 | #define EFX_WORKAROUND_SFX7101(efx) ((efx)->phy_type == PHY_TYPE_SFX7101) | 21 | #define EFX_WORKAROUND_SFT9001(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A || \ |
22 | #define EFX_WORKAROUND_SFT9001A(efx) ((efx)->phy_type == PHY_TYPE_SFT9001A) | 22 | (efx)->phy_type == PHY_TYPE_SFT9001B) |
23 | 23 | ||
24 | /* XAUI resets if link not detected */ | 24 | /* XAUI resets if link not detected */ |
25 | #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS | 25 | #define EFX_WORKAROUND_5147 EFX_WORKAROUND_ALWAYS |
@@ -29,8 +29,6 @@ | |||
29 | #define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G | 29 | #define EFX_WORKAROUND_7884 EFX_WORKAROUND_10G |
30 | /* TX pkt parser problem with <= 16 byte TXes */ | 30 | /* TX pkt parser problem with <= 16 byte TXes */ |
31 | #define EFX_WORKAROUND_9141 EFX_WORKAROUND_ALWAYS | 31 | #define EFX_WORKAROUND_9141 EFX_WORKAROUND_ALWAYS |
32 | /* Low rate CRC errors require XAUI reset */ | ||
33 | #define EFX_WORKAROUND_10750 EFX_WORKAROUND_SFX7101 | ||
34 | /* TX_EV_PKT_ERR can be caused by a dangling TX descriptor | 32 | /* TX_EV_PKT_ERR can be caused by a dangling TX descriptor |
35 | * or a PCIe error (bug 11028) */ | 33 | * or a PCIe error (bug 11028) */ |
36 | #define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS | 34 | #define EFX_WORKAROUND_10727 EFX_WORKAROUND_ALWAYS |
@@ -55,8 +53,8 @@ | |||
55 | #define EFX_WORKAROUND_8071 EFX_WORKAROUND_FALCON_A | 53 | #define EFX_WORKAROUND_8071 EFX_WORKAROUND_FALCON_A |
56 | 54 | ||
57 | /* Need to send XNP pages for 100BaseT */ | 55 | /* Need to send XNP pages for 100BaseT */ |
58 | #define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001A | 56 | #define EFX_WORKAROUND_13204 EFX_WORKAROUND_SFT9001 |
59 | /* Need to keep AN enabled */ | 57 | /* Don't restart AN in near-side loopback */ |
60 | #define EFX_WORKAROUND_13963 EFX_WORKAROUND_SFT9001A | 58 | #define EFX_WORKAROUND_15195 EFX_WORKAROUND_SFT9001 |
61 | 59 | ||
62 | #endif /* EFX_WORKAROUNDS_H */ | 60 | #endif /* EFX_WORKAROUNDS_H */ |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 607efeaf0bc5..9a00e5566af7 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -1003,9 +1003,9 @@ static int skfp_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
1003 | break; | 1003 | break; |
1004 | case SKFP_CLR_STATS: /* Zero out the driver statistics */ | 1004 | case SKFP_CLR_STATS: /* Zero out the driver statistics */ |
1005 | if (!capable(CAP_NET_ADMIN)) { | 1005 | if (!capable(CAP_NET_ADMIN)) { |
1006 | memset(&lp->MacStat, 0, sizeof(lp->MacStat)); | ||
1007 | } else { | ||
1008 | status = -EPERM; | 1006 | status = -EPERM; |
1007 | } else { | ||
1008 | memset(&lp->MacStat, 0, sizeof(lp->MacStat)); | ||
1009 | } | 1009 | } |
1010 | break; | 1010 | break; |
1011 | default: | 1011 | default: |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 3668e81e474d..994703cc0db3 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1403,9 +1403,6 @@ static int sky2_up(struct net_device *dev) | |||
1403 | 1403 | ||
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | if (netif_msg_ifup(sky2)) | ||
1407 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); | ||
1408 | |||
1409 | netif_carrier_off(dev); | 1406 | netif_carrier_off(dev); |
1410 | 1407 | ||
1411 | /* must be power of 2 */ | 1408 | /* must be power of 2 */ |
@@ -1484,6 +1481,9 @@ static int sky2_up(struct net_device *dev) | |||
1484 | sky2_write32(hw, B0_IMSK, imask); | 1481 | sky2_write32(hw, B0_IMSK, imask); |
1485 | 1482 | ||
1486 | sky2_set_multicast(dev); | 1483 | sky2_set_multicast(dev); |
1484 | |||
1485 | if (netif_msg_ifup(sky2)) | ||
1486 | printk(KERN_INFO PFX "%s: enabling interface\n", dev->name); | ||
1487 | return 0; | 1487 | return 0; |
1488 | 1488 | ||
1489 | err_out: | 1489 | err_out: |
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c index bf3aa2a1effe..223cde0d43be 100644 --- a/drivers/net/smc911x.c +++ b/drivers/net/smc911x.c | |||
@@ -220,9 +220,9 @@ static void smc911x_reset(struct net_device *dev) | |||
220 | 220 | ||
221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ | 221 | /* make sure EEPROM has finished loading before setting GPIO_CFG */ |
222 | timeout=1000; | 222 | timeout=1000; |
223 | while ( timeout-- && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) { | 223 | while (--timeout && (SMC_GET_E2P_CMD(lp) & E2P_CMD_EPC_BUSY_)) |
224 | udelay(10); | 224 | udelay(10); |
225 | } | 225 | |
226 | if (timeout == 0){ | 226 | if (timeout == 0){ |
227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); | 227 | PRINTK("%s: smc911x_reset timeout waiting for EEPROM busy\n", dev->name); |
228 | return; | 228 | return; |
diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c index f513bdf1c887..783c1a7b869e 100644 --- a/drivers/net/smsc911x.c +++ b/drivers/net/smsc911x.c | |||
@@ -953,7 +953,7 @@ smsc911x_rx_fastforward(struct smsc911x_data *pdata, unsigned int pktbytes) | |||
953 | do { | 953 | do { |
954 | udelay(1); | 954 | udelay(1); |
955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); | 955 | val = smsc911x_reg_read(pdata, RX_DP_CTRL); |
956 | } while (timeout-- && (val & RX_DP_CTRL_RX_FFWD_)); | 956 | } while (--timeout && (val & RX_DP_CTRL_RX_FFWD_)); |
957 | 957 | ||
958 | if (unlikely(timeout == 0)) | 958 | if (unlikely(timeout == 0)) |
959 | SMSC_WARNING(HW, "Timed out waiting for " | 959 | SMSC_WARNING(HW, "Timed out waiting for " |
diff --git a/drivers/net/smsc9420.c b/drivers/net/smsc9420.c index c14a4c6452c7..a1e4b3895b33 100644 --- a/drivers/net/smsc9420.c +++ b/drivers/net/smsc9420.c | |||
@@ -498,7 +498,7 @@ static void smsc9420_check_mac_address(struct net_device *dev) | |||
498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | 498 | static void smsc9420_stop_tx(struct smsc9420_pdata *pd) |
499 | { | 499 | { |
500 | u32 dmac_control, mac_cr, dma_intr_ena; | 500 | u32 dmac_control, mac_cr, dma_intr_ena; |
501 | int timeOut = 1000; | 501 | int timeout = 1000; |
502 | 502 | ||
503 | /* disable TX DMAC */ | 503 | /* disable TX DMAC */ |
504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); | 504 | dmac_control = smsc9420_reg_read(pd, DMAC_CONTROL); |
@@ -506,13 +506,13 @@ static void smsc9420_stop_tx(struct smsc9420_pdata *pd) | |||
506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); | 506 | smsc9420_reg_write(pd, DMAC_CONTROL, dmac_control); |
507 | 507 | ||
508 | /* Wait max 10ms for transmit process to stop */ | 508 | /* Wait max 10ms for transmit process to stop */ |
509 | while (timeOut--) { | 509 | while (--timeout) { |
510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) | 510 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_TS_) |
511 | break; | 511 | break; |
512 | udelay(10); | 512 | udelay(10); |
513 | } | 513 | } |
514 | 514 | ||
515 | if (!timeOut) | 515 | if (!timeout) |
516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); | 516 | smsc_warn(IFDOWN, "TX DMAC failed to stop"); |
517 | 517 | ||
518 | /* ACK Tx DMAC stop bit */ | 518 | /* ACK Tx DMAC stop bit */ |
@@ -596,7 +596,7 @@ static void smsc9420_free_rx_ring(struct smsc9420_pdata *pd) | |||
596 | 596 | ||
597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | 597 | static void smsc9420_stop_rx(struct smsc9420_pdata *pd) |
598 | { | 598 | { |
599 | int timeOut = 1000; | 599 | int timeout = 1000; |
600 | u32 mac_cr, dmac_control, dma_intr_ena; | 600 | u32 mac_cr, dmac_control, dma_intr_ena; |
601 | 601 | ||
602 | /* mask RX DMAC interrupts */ | 602 | /* mask RX DMAC interrupts */ |
@@ -617,13 +617,13 @@ static void smsc9420_stop_rx(struct smsc9420_pdata *pd) | |||
617 | smsc9420_pci_flush_write(pd); | 617 | smsc9420_pci_flush_write(pd); |
618 | 618 | ||
619 | /* wait up to 10ms for receive to stop */ | 619 | /* wait up to 10ms for receive to stop */ |
620 | while (timeOut--) { | 620 | while (--timeout) { |
621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) | 621 | if (smsc9420_reg_read(pd, DMAC_STATUS) & DMAC_STS_RS_) |
622 | break; | 622 | break; |
623 | udelay(10); | 623 | udelay(10); |
624 | } | 624 | } |
625 | 625 | ||
626 | if (!timeOut) | 626 | if (!timeout) |
627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); | 627 | smsc_warn(IFDOWN, "RX DMAC did not stop! timeout."); |
628 | 628 | ||
629 | /* ACK the Rx DMAC stop bit */ | 629 | /* ACK the Rx DMAC stop bit */ |
@@ -1378,6 +1378,7 @@ static int smsc9420_open(struct net_device *dev) | |||
1378 | 1378 | ||
1379 | /* test the IRQ connection to the ISR */ | 1379 | /* test the IRQ connection to the ISR */ |
1380 | smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); | 1380 | smsc_dbg(IFUP, "Testing ISR using IRQ %d", dev->irq); |
1381 | pd->software_irq_signal = false; | ||
1381 | 1382 | ||
1382 | spin_lock_irqsave(&pd->int_lock, flags); | 1383 | spin_lock_irqsave(&pd->int_lock, flags); |
1383 | /* configure interrupt deassertion timer and enable interrupts */ | 1384 | /* configure interrupt deassertion timer and enable interrupts */ |
@@ -1393,8 +1394,6 @@ static int smsc9420_open(struct net_device *dev) | |||
1393 | smsc9420_pci_flush_write(pd); | 1394 | smsc9420_pci_flush_write(pd); |
1394 | 1395 | ||
1395 | timeout = 1000; | 1396 | timeout = 1000; |
1396 | pd->software_irq_signal = false; | ||
1397 | smp_wmb(); | ||
1398 | while (timeout--) { | 1397 | while (timeout--) { |
1399 | if (pd->software_irq_signal) | 1398 | if (pd->software_irq_signal) |
1400 | break; | 1399 | break; |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 86c765d83de1..b17efa9cc530 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -148,7 +148,7 @@ static u16 __phy_read(struct gem *gp, int phy_addr, int reg) | |||
148 | cmd |= (MIF_FRAME_TAMSB); | 148 | cmd |= (MIF_FRAME_TAMSB); |
149 | writel(cmd, gp->regs + MIF_FRAME); | 149 | writel(cmd, gp->regs + MIF_FRAME); |
150 | 150 | ||
151 | while (limit--) { | 151 | while (--limit) { |
152 | cmd = readl(gp->regs + MIF_FRAME); | 152 | cmd = readl(gp->regs + MIF_FRAME); |
153 | if (cmd & MIF_FRAME_TALSB) | 153 | if (cmd & MIF_FRAME_TALSB) |
154 | break; | 154 | break; |
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c index 61843fd57525..78f8cee5fd74 100644 --- a/drivers/net/sungem_phy.c +++ b/drivers/net/sungem_phy.c | |||
@@ -79,7 +79,7 @@ static int reset_one_mii_phy(struct mii_phy* phy, int phy_id) | |||
79 | 79 | ||
80 | udelay(100); | 80 | udelay(100); |
81 | 81 | ||
82 | while (limit--) { | 82 | while (--limit) { |
83 | val = __phy_read(phy, phy_id, MII_BMCR); | 83 | val = __phy_read(phy, phy_id, MII_BMCR); |
84 | if ((val & BMCR_RESET) == 0) | 84 | if ((val & BMCR_RESET) == 0) |
85 | break; | 85 | break; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 6e8f377355fe..fe0c3f244562 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -227,7 +227,7 @@ static int qe_init(struct sunqe *qep, int from_irq) | |||
227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { | 227 | if (!(sbus_readb(mregs + MREGS_PHYCONFIG) & MREGS_PHYCONFIG_LTESTDIS)) { |
228 | int tries = 50; | 228 | int tries = 50; |
229 | 229 | ||
230 | while (tries--) { | 230 | while (--tries) { |
231 | u8 tmp; | 231 | u8 tmp; |
232 | 232 | ||
233 | mdelay(5); | 233 | mdelay(5); |
diff --git a/drivers/net/tsi108_eth.c b/drivers/net/tsi108_eth.c index 75461dbd4876..a9fd2b2ccaf6 100644 --- a/drivers/net/tsi108_eth.c +++ b/drivers/net/tsi108_eth.c | |||
@@ -1237,7 +1237,7 @@ static void tsi108_init_phy(struct net_device *dev) | |||
1237 | spin_lock_irqsave(&phy_lock, flags); | 1237 | spin_lock_irqsave(&phy_lock, flags); |
1238 | 1238 | ||
1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); | 1239 | tsi108_write_mii(data, MII_BMCR, BMCR_RESET); |
1240 | while (i--){ | 1240 | while (--i) { |
1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) | 1241 | if(!(tsi108_read_mii(data, MII_BMCR) & BMCR_RESET)) |
1242 | break; | 1242 | break; |
1243 | udelay(10); | 1243 | udelay(10); |
diff --git a/drivers/net/tulip/21142.c b/drivers/net/tulip/21142.c index 1210fb3748a7..db7d5e11855d 100644 --- a/drivers/net/tulip/21142.c +++ b/drivers/net/tulip/21142.c | |||
@@ -9,6 +9,11 @@ | |||
9 | 9 | ||
10 | Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} | 10 | Please refer to Documentation/DocBook/tulip-user.{pdf,ps,html} |
11 | for more information on this driver. | 11 | for more information on this driver. |
12 | |||
13 | DC21143 manual "21143 PCI/CardBus 10/100Mb/s Ethernet LAN Controller | ||
14 | Hardware Reference Manual" is currently available at : | ||
15 | http://developer.intel.com/design/network/manuals/278074.htm | ||
16 | |||
12 | Please submit bugs to http://bugzilla.kernel.org/ . | 17 | Please submit bugs to http://bugzilla.kernel.org/ . |
13 | */ | 18 | */ |
14 | 19 | ||
@@ -32,7 +37,11 @@ void t21142_media_task(struct work_struct *work) | |||
32 | int csr12 = ioread32(ioaddr + CSR12); | 37 | int csr12 = ioread32(ioaddr + CSR12); |
33 | int next_tick = 60*HZ; | 38 | int next_tick = 60*HZ; |
34 | int new_csr6 = 0; | 39 | int new_csr6 = 0; |
40 | int csr14 = ioread32(ioaddr + CSR14); | ||
35 | 41 | ||
42 | /* CSR12[LS10,LS100] are not reliable during autonegotiation */ | ||
43 | if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) | ||
44 | csr12 |= 6; | ||
36 | if (tulip_debug > 2) | 45 | if (tulip_debug > 2) |
37 | printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", | 46 | printk(KERN_INFO"%s: 21143 negotiation status %8.8x, %s.\n", |
38 | dev->name, csr12, medianame[dev->if_port]); | 47 | dev->name, csr12, medianame[dev->if_port]); |
@@ -76,7 +85,7 @@ void t21142_media_task(struct work_struct *work) | |||
76 | new_csr6 = 0x83860000; | 85 | new_csr6 = 0x83860000; |
77 | dev->if_port = 3; | 86 | dev->if_port = 3; |
78 | iowrite32(0, ioaddr + CSR13); | 87 | iowrite32(0, ioaddr + CSR13); |
79 | iowrite32(0x0003FF7F, ioaddr + CSR14); | 88 | iowrite32(0x0003FFFF, ioaddr + CSR14); |
80 | iowrite16(8, ioaddr + CSR15); | 89 | iowrite16(8, ioaddr + CSR15); |
81 | iowrite32(1, ioaddr + CSR13); | 90 | iowrite32(1, ioaddr + CSR13); |
82 | } | 91 | } |
@@ -132,10 +141,14 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
132 | struct tulip_private *tp = netdev_priv(dev); | 141 | struct tulip_private *tp = netdev_priv(dev); |
133 | void __iomem *ioaddr = tp->base_addr; | 142 | void __iomem *ioaddr = tp->base_addr; |
134 | int csr12 = ioread32(ioaddr + CSR12); | 143 | int csr12 = ioread32(ioaddr + CSR12); |
144 | int csr14 = ioread32(ioaddr + CSR14); | ||
135 | 145 | ||
146 | /* CSR12[LS10,LS100] are not reliable during autonegotiation */ | ||
147 | if ((csr14 & 0x80) && (csr12 & 0x7000) != 0x5000) | ||
148 | csr12 |= 6; | ||
136 | if (tulip_debug > 1) | 149 | if (tulip_debug > 1) |
137 | printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " | 150 | printk(KERN_INFO"%s: 21143 link status interrupt %8.8x, CSR5 %x, " |
138 | "%8.8x.\n", dev->name, csr12, csr5, ioread32(ioaddr + CSR14)); | 151 | "%8.8x.\n", dev->name, csr12, csr5, csr14); |
139 | 152 | ||
140 | /* If NWay finished and we have a negotiated partner capability. */ | 153 | /* If NWay finished and we have a negotiated partner capability. */ |
141 | if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { | 154 | if (tp->nway && !tp->nwayset && (csr12 & 0x7000) == 0x5000) { |
@@ -143,7 +156,9 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
143 | int negotiated = tp->sym_advertise & (csr12 >> 16); | 156 | int negotiated = tp->sym_advertise & (csr12 >> 16); |
144 | tp->lpar = csr12 >> 16; | 157 | tp->lpar = csr12 >> 16; |
145 | tp->nwayset = 1; | 158 | tp->nwayset = 1; |
146 | if (negotiated & 0x0100) dev->if_port = 5; | 159 | /* If partner cannot negotiate, it is 10Mbps Half Duplex */ |
160 | if (!(csr12 & 0x8000)) dev->if_port = 0; | ||
161 | else if (negotiated & 0x0100) dev->if_port = 5; | ||
147 | else if (negotiated & 0x0080) dev->if_port = 3; | 162 | else if (negotiated & 0x0080) dev->if_port = 3; |
148 | else if (negotiated & 0x0040) dev->if_port = 4; | 163 | else if (negotiated & 0x0040) dev->if_port = 4; |
149 | else if (negotiated & 0x0020) dev->if_port = 0; | 164 | else if (negotiated & 0x0020) dev->if_port = 0; |
@@ -214,7 +229,7 @@ void t21142_lnk_change(struct net_device *dev, int csr5) | |||
214 | tp->timer.expires = RUN_AT(3*HZ); | 229 | tp->timer.expires = RUN_AT(3*HZ); |
215 | add_timer(&tp->timer); | 230 | add_timer(&tp->timer); |
216 | } else if (dev->if_port == 5) | 231 | } else if (dev->if_port == 5) |
217 | iowrite32(ioread32(ioaddr + CSR14) & ~0x080, ioaddr + CSR14); | 232 | iowrite32(csr14 & ~0x080, ioaddr + CSR14); |
218 | } else if (dev->if_port == 0 || dev->if_port == 4) { | 233 | } else if (dev->if_port == 0 || dev->if_port == 4) { |
219 | if ((csr12 & 4) == 0) | 234 | if ((csr12 & 4) == 0) |
220 | printk(KERN_INFO"%s: 21143 10baseT link beat good.\n", | 235 | printk(KERN_INFO"%s: 21143 10baseT link beat good.\n", |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index d5d53b633cf8..0bf2114738be 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -392,7 +392,7 @@ static void de_rx (struct de_private *de) | |||
392 | unsigned drop = 0; | 392 | unsigned drop = 0; |
393 | int rc; | 393 | int rc; |
394 | 394 | ||
395 | while (rx_work--) { | 395 | while (--rx_work) { |
396 | u32 status, len; | 396 | u32 status, len; |
397 | dma_addr_t mapping; | 397 | dma_addr_t mapping; |
398 | struct sk_buff *skb, *copy_skb; | 398 | struct sk_buff *skb, *copy_skb; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 11441225bf41..e87986867ba5 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -1536,6 +1536,11 @@ static void adjust_link(struct net_device *dev) | |||
1536 | static int init_phy(struct net_device *dev) | 1536 | static int init_phy(struct net_device *dev) |
1537 | { | 1537 | { |
1538 | struct ucc_geth_private *priv = netdev_priv(dev); | 1538 | struct ucc_geth_private *priv = netdev_priv(dev); |
1539 | struct device_node *np = priv->node; | ||
1540 | struct device_node *phy, *mdio; | ||
1541 | const phandle *ph; | ||
1542 | char bus_name[MII_BUS_ID_SIZE]; | ||
1543 | const unsigned int *id; | ||
1539 | struct phy_device *phydev; | 1544 | struct phy_device *phydev; |
1540 | char phy_id[BUS_ID_SIZE]; | 1545 | char phy_id[BUS_ID_SIZE]; |
1541 | 1546 | ||
@@ -1543,8 +1548,18 @@ static int init_phy(struct net_device *dev) | |||
1543 | priv->oldspeed = 0; | 1548 | priv->oldspeed = 0; |
1544 | priv->oldduplex = -1; | 1549 | priv->oldduplex = -1; |
1545 | 1550 | ||
1546 | snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, priv->ug_info->mdio_bus, | 1551 | ph = of_get_property(np, "phy-handle", NULL); |
1547 | priv->ug_info->phy_address); | 1552 | phy = of_find_node_by_phandle(*ph); |
1553 | mdio = of_get_parent(phy); | ||
1554 | |||
1555 | id = of_get_property(phy, "reg", NULL); | ||
1556 | |||
1557 | of_node_put(phy); | ||
1558 | of_node_put(mdio); | ||
1559 | |||
1560 | uec_mdio_bus_name(bus_name, mdio); | ||
1561 | snprintf(phy_id, sizeof(phy_id), "%s:%02x", | ||
1562 | bus_name, *id); | ||
1548 | 1563 | ||
1549 | phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); | 1564 | phydev = phy_connect(dev, phy_id, &adjust_link, 0, priv->phy_interface); |
1550 | 1565 | ||
@@ -3748,6 +3763,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma | |||
3748 | 3763 | ||
3749 | ugeth->ug_info = ug_info; | 3764 | ugeth->ug_info = ug_info; |
3750 | ugeth->dev = dev; | 3765 | ugeth->dev = dev; |
3766 | ugeth->node = np; | ||
3751 | 3767 | ||
3752 | return 0; | 3768 | return 0; |
3753 | } | 3769 | } |
diff --git a/drivers/net/ucc_geth.h b/drivers/net/ucc_geth.h index 8f699cb773ee..16cbe42ba43c 100644 --- a/drivers/net/ucc_geth.h +++ b/drivers/net/ucc_geth.h | |||
@@ -1186,6 +1186,8 @@ struct ucc_geth_private { | |||
1186 | int oldspeed; | 1186 | int oldspeed; |
1187 | int oldduplex; | 1187 | int oldduplex; |
1188 | int oldlink; | 1188 | int oldlink; |
1189 | |||
1190 | struct device_node *node; | ||
1189 | }; | 1191 | }; |
1190 | 1192 | ||
1191 | void uec_set_ethtool_ops(struct net_device *netdev); | 1193 | void uec_set_ethtool_ops(struct net_device *netdev); |
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c index c001d261366b..54635911305c 100644 --- a/drivers/net/ucc_geth_mii.c +++ b/drivers/net/ucc_geth_mii.c | |||
@@ -156,7 +156,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma | |||
156 | if (err) | 156 | if (err) |
157 | goto reg_map_fail; | 157 | goto reg_map_fail; |
158 | 158 | ||
159 | snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); | 159 | uec_mdio_bus_name(new_bus->id, np); |
160 | 160 | ||
161 | new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); | 161 | new_bus->irq = kmalloc(32 * sizeof(int), GFP_KERNEL); |
162 | 162 | ||
@@ -283,3 +283,13 @@ void uec_mdio_exit(void) | |||
283 | { | 283 | { |
284 | of_unregister_platform_driver(&uec_mdio_driver); | 284 | of_unregister_platform_driver(&uec_mdio_driver); |
285 | } | 285 | } |
286 | |||
287 | void uec_mdio_bus_name(char *name, struct device_node *np) | ||
288 | { | ||
289 | const u32 *reg; | ||
290 | |||
291 | reg = of_get_property(np, "reg", NULL); | ||
292 | |||
293 | snprintf(name, MII_BUS_ID_SIZE, "%s@%x", np->name, reg ? *reg : 0); | ||
294 | } | ||
295 | |||
diff --git a/drivers/net/ucc_geth_mii.h b/drivers/net/ucc_geth_mii.h index 1e45b2028a50..840cf80235b7 100644 --- a/drivers/net/ucc_geth_mii.h +++ b/drivers/net/ucc_geth_mii.h | |||
@@ -97,4 +97,5 @@ int uec_mdio_read(struct mii_bus *bus, int mii_id, int regnum); | |||
97 | int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); | 97 | int uec_mdio_write(struct mii_bus *bus, int mii_id, int regnum, u16 value); |
98 | int __init uec_mdio_init(void); | 98 | int __init uec_mdio_init(void); |
99 | void uec_mdio_exit(void); | 99 | void uec_mdio_exit(void); |
100 | void uec_mdio_bus_name(char *name, struct device_node *np); | ||
100 | #endif /* __UEC_MII_H */ | 101 | #endif /* __UEC_MII_H */ |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 0d0fa91c0251..fe98acaead97 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -455,6 +455,7 @@ static const struct usb_device_id hso_ids[] = { | |||
455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ | 455 | {icon321_port_device(0x0af0, 0xd033)}, /* Icon-322 */ |
456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ | 456 | {USB_DEVICE(0x0af0, 0x7301)}, /* GE40x */ |
457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ | 457 | {USB_DEVICE(0x0af0, 0x7361)}, /* GE40x */ |
458 | {USB_DEVICE(0x0af0, 0x7381)}, /* GE40x */ | ||
458 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ | 459 | {USB_DEVICE(0x0af0, 0x7401)}, /* GI 0401 */ |
459 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ | 460 | {USB_DEVICE(0x0af0, 0x7501)}, /* GTM 382 */ |
460 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ | 461 | {USB_DEVICE(0x0af0, 0x7601)}, /* GE40x */ |
@@ -462,7 +463,8 @@ static const struct usb_device_id hso_ids[] = { | |||
462 | {USB_DEVICE(0x0af0, 0x7801)}, | 463 | {USB_DEVICE(0x0af0, 0x7801)}, |
463 | {USB_DEVICE(0x0af0, 0x7901)}, | 464 | {USB_DEVICE(0x0af0, 0x7901)}, |
464 | {USB_DEVICE(0x0af0, 0x7361)}, | 465 | {USB_DEVICE(0x0af0, 0x7361)}, |
465 | {icon321_port_device(0x0af0, 0xd051)}, | 466 | {USB_DEVICE(0x0af0, 0xd057)}, |
467 | {USB_DEVICE(0x0af0, 0xd055)}, | ||
466 | {} | 468 | {} |
467 | }; | 469 | }; |
468 | MODULE_DEVICE_TABLE(usb, hso_ids); | 470 | MODULE_DEVICE_TABLE(usb, hso_ids); |
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 63ef2a8905fb..c68808336c8c 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -287,7 +287,7 @@ static void try_fill_recv_maxbufs(struct virtnet_info *vi) | |||
287 | skb_put(skb, MAX_PACKET_LEN); | 287 | skb_put(skb, MAX_PACKET_LEN); |
288 | 288 | ||
289 | hdr = skb_vnet_hdr(skb); | 289 | hdr = skb_vnet_hdr(skb); |
290 | sg_init_one(sg, hdr, sizeof(*hdr)); | 290 | sg_set_buf(sg, hdr, sizeof(*hdr)); |
291 | 291 | ||
292 | if (vi->big_packets) { | 292 | if (vi->big_packets) { |
293 | for (i = 0; i < MAX_SKB_FRAGS; i++) { | 293 | for (i = 0; i < MAX_SKB_FRAGS; i++) { |
@@ -488,9 +488,9 @@ static int xmit_skb(struct virtnet_info *vi, struct sk_buff *skb) | |||
488 | 488 | ||
489 | /* Encode metadata header at front. */ | 489 | /* Encode metadata header at front. */ |
490 | if (vi->mergeable_rx_bufs) | 490 | if (vi->mergeable_rx_bufs) |
491 | sg_init_one(sg, mhdr, sizeof(*mhdr)); | 491 | sg_set_buf(sg, mhdr, sizeof(*mhdr)); |
492 | else | 492 | else |
493 | sg_init_one(sg, hdr, sizeof(*hdr)); | 493 | sg_set_buf(sg, hdr, sizeof(*hdr)); |
494 | 494 | ||
495 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; | 495 | num = skb_to_sgvec(skb, sg+1, 0, skb->len) + 1; |
496 | 496 | ||
diff --git a/drivers/net/wimax/i2400m/debugfs.c b/drivers/net/wimax/i2400m/debugfs.c index 626632985977..9b81af3f80a9 100644 --- a/drivers/net/wimax/i2400m/debugfs.c +++ b/drivers/net/wimax/i2400m/debugfs.c | |||
@@ -234,20 +234,6 @@ struct dentry *debugfs_create_i2400m_reset( | |||
234 | &fops_i2400m_reset); | 234 | &fops_i2400m_reset); |
235 | } | 235 | } |
236 | 236 | ||
237 | /* | ||
238 | * Debug levels control; see debug.h | ||
239 | */ | ||
240 | struct d_level D_LEVEL[] = { | ||
241 | D_SUBMODULE_DEFINE(control), | ||
242 | D_SUBMODULE_DEFINE(driver), | ||
243 | D_SUBMODULE_DEFINE(debugfs), | ||
244 | D_SUBMODULE_DEFINE(fw), | ||
245 | D_SUBMODULE_DEFINE(netdev), | ||
246 | D_SUBMODULE_DEFINE(rfkill), | ||
247 | D_SUBMODULE_DEFINE(rx), | ||
248 | D_SUBMODULE_DEFINE(tx), | ||
249 | }; | ||
250 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
251 | 237 | ||
252 | #define __debugfs_register(prefix, name, parent) \ | 238 | #define __debugfs_register(prefix, name, parent) \ |
253 | do { \ | 239 | do { \ |
diff --git a/drivers/net/wimax/i2400m/driver.c b/drivers/net/wimax/i2400m/driver.c index 5f98047e18cf..e80a0b65a754 100644 --- a/drivers/net/wimax/i2400m/driver.c +++ b/drivers/net/wimax/i2400m/driver.c | |||
@@ -707,6 +707,22 @@ void i2400m_release(struct i2400m *i2400m) | |||
707 | EXPORT_SYMBOL_GPL(i2400m_release); | 707 | EXPORT_SYMBOL_GPL(i2400m_release); |
708 | 708 | ||
709 | 709 | ||
710 | /* | ||
711 | * Debug levels control; see debug.h | ||
712 | */ | ||
713 | struct d_level D_LEVEL[] = { | ||
714 | D_SUBMODULE_DEFINE(control), | ||
715 | D_SUBMODULE_DEFINE(driver), | ||
716 | D_SUBMODULE_DEFINE(debugfs), | ||
717 | D_SUBMODULE_DEFINE(fw), | ||
718 | D_SUBMODULE_DEFINE(netdev), | ||
719 | D_SUBMODULE_DEFINE(rfkill), | ||
720 | D_SUBMODULE_DEFINE(rx), | ||
721 | D_SUBMODULE_DEFINE(tx), | ||
722 | }; | ||
723 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
724 | |||
725 | |||
710 | static | 726 | static |
711 | int __init i2400m_driver_init(void) | 727 | int __init i2400m_driver_init(void) |
712 | { | 728 | { |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 8ef87356e083..a533ed60bb4d 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -1028,6 +1028,8 @@ ath5k_setup_bands(struct ieee80211_hw *hw) | |||
1028 | * it's done by reseting the chip. To accomplish this we must | 1028 | * it's done by reseting the chip. To accomplish this we must |
1029 | * first cleanup any pending DMA, then restart stuff after a la | 1029 | * first cleanup any pending DMA, then restart stuff after a la |
1030 | * ath5k_init. | 1030 | * ath5k_init. |
1031 | * | ||
1032 | * Called with sc->lock. | ||
1031 | */ | 1033 | */ |
1032 | static int | 1034 | static int |
1033 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) | 1035 | ath5k_chan_set(struct ath5k_softc *sc, struct ieee80211_channel *chan) |
@@ -2814,11 +2816,17 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2814 | { | 2816 | { |
2815 | struct ath5k_softc *sc = hw->priv; | 2817 | struct ath5k_softc *sc = hw->priv; |
2816 | struct ieee80211_conf *conf = &hw->conf; | 2818 | struct ieee80211_conf *conf = &hw->conf; |
2819 | int ret; | ||
2820 | |||
2821 | mutex_lock(&sc->lock); | ||
2817 | 2822 | ||
2818 | sc->bintval = conf->beacon_int; | 2823 | sc->bintval = conf->beacon_int; |
2819 | sc->power_level = conf->power_level; | 2824 | sc->power_level = conf->power_level; |
2820 | 2825 | ||
2821 | return ath5k_chan_set(sc, conf->channel); | 2826 | ret = ath5k_chan_set(sc, conf->channel); |
2827 | |||
2828 | mutex_unlock(&sc->lock); | ||
2829 | return ret; | ||
2822 | } | 2830 | } |
2823 | 2831 | ||
2824 | static int | 2832 | static int |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 0dc8eed16404..b35c8813bef4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -1719,6 +1719,10 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1719 | priv->ucode_data_backup.len = data_size; | 1719 | priv->ucode_data_backup.len = data_size; |
1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); | 1720 | iwl_alloc_fw_desc(priv->pci_dev, &priv->ucode_data_backup); |
1721 | 1721 | ||
1722 | if (!priv->ucode_code.v_addr || !priv->ucode_data.v_addr || | ||
1723 | !priv->ucode_data_backup.v_addr) | ||
1724 | goto err_pci_alloc; | ||
1725 | |||
1722 | /* Initialization instructions and data */ | 1726 | /* Initialization instructions and data */ |
1723 | if (init_size && init_data_size) { | 1727 | if (init_size && init_data_size) { |
1724 | priv->ucode_init.len = init_size; | 1728 | priv->ucode_init.len = init_size; |
diff --git a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c index 4e75e8e7fa90..78df281b297a 100644 --- a/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c +++ b/drivers/net/wireless/rtl818x/rtl8187_rtl8225.c | |||
@@ -285,7 +285,10 @@ static void rtl8225_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; | 285 | ofdm_power = priv->channels[channel - 1].hw_value >> 4; |
286 | 286 | ||
287 | cck_power = min(cck_power, (u8)11); | 287 | cck_power = min(cck_power, (u8)11); |
288 | ofdm_power = min(ofdm_power, (u8)35); | 288 | if (ofdm_power > (u8)15) |
289 | ofdm_power = 25; | ||
290 | else | ||
291 | ofdm_power += 10; | ||
289 | 292 | ||
290 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, | 293 | rtl818x_iowrite8(priv, &priv->map->TX_GAIN_CCK, |
291 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); | 294 | rtl8225_tx_gain_cck_ofdm[cck_power / 6] >> 1); |
@@ -536,7 +539,10 @@ static void rtl8225z2_rf_set_tx_power(struct ieee80211_hw *dev, int channel) | |||
536 | cck_power += priv->txpwr_base & 0xF; | 539 | cck_power += priv->txpwr_base & 0xF; |
537 | cck_power = min(cck_power, (u8)35); | 540 | cck_power = min(cck_power, (u8)35); |
538 | 541 | ||
539 | ofdm_power = min(ofdm_power, (u8)15); | 542 | if (ofdm_power > (u8)15) |
543 | ofdm_power = 25; | ||
544 | else | ||
545 | ofdm_power += 10; | ||
540 | ofdm_power += priv->txpwr_base >> 4; | 546 | ofdm_power += priv->txpwr_base >> 4; |
541 | ofdm_power = min(ofdm_power, (u8)35); | 547 | ofdm_power = min(ofdm_power, (u8)35); |
542 | 548 | ||
diff --git a/drivers/pci/hotplug/Makefile b/drivers/pci/hotplug/Makefile index e31fb91652ce..2aa117c8cd87 100644 --- a/drivers/pci/hotplug/Makefile +++ b/drivers/pci/hotplug/Makefile | |||
@@ -5,11 +5,15 @@ | |||
5 | obj-$(CONFIG_HOTPLUG_PCI) += pci_hotplug.o | 5 | obj-$(CONFIG_HOTPLUG_PCI) += pci_hotplug.o |
6 | obj-$(CONFIG_HOTPLUG_PCI_COMPAQ) += cpqphp.o | 6 | obj-$(CONFIG_HOTPLUG_PCI_COMPAQ) += cpqphp.o |
7 | obj-$(CONFIG_HOTPLUG_PCI_IBM) += ibmphp.o | 7 | obj-$(CONFIG_HOTPLUG_PCI_IBM) += ibmphp.o |
8 | |||
9 | # pciehp should be linked before acpiphp in order to allow the native driver | ||
10 | # to attempt to bind first. We can then fall back to generic support. | ||
11 | |||
12 | obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o | ||
8 | obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o | 13 | obj-$(CONFIG_HOTPLUG_PCI_ACPI) += acpiphp.o |
9 | obj-$(CONFIG_HOTPLUG_PCI_ACPI_IBM) += acpiphp_ibm.o | 14 | obj-$(CONFIG_HOTPLUG_PCI_ACPI_IBM) += acpiphp_ibm.o |
10 | obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o | 15 | obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o |
11 | obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o | 16 | obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o |
12 | obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o | ||
13 | obj-$(CONFIG_HOTPLUG_PCI_SHPC) += shpchp.o | 17 | obj-$(CONFIG_HOTPLUG_PCI_SHPC) += shpchp.o |
14 | obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o | 18 | obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o |
15 | obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o | 19 | obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o |
diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c index b0e7de9e536d..d8649e127298 100644 --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c | |||
@@ -195,13 +195,13 @@ static void remove_slot_worker(struct work_struct *work) | |||
195 | * Tries hard not to re-enable already existing devices; | 195 | * Tries hard not to re-enable already existing devices; |
196 | * also handles scanning of subfunctions. | 196 | * also handles scanning of subfunctions. |
197 | */ | 197 | */ |
198 | static void pci_rescan_slot(struct pci_dev *temp) | 198 | static int pci_rescan_slot(struct pci_dev *temp) |
199 | { | 199 | { |
200 | struct pci_bus *bus = temp->bus; | 200 | struct pci_bus *bus = temp->bus; |
201 | struct pci_dev *dev; | 201 | struct pci_dev *dev; |
202 | int func; | 202 | int func; |
203 | int retval; | ||
204 | u8 hdr_type; | 203 | u8 hdr_type; |
204 | int count = 0; | ||
205 | 205 | ||
206 | if (!pci_read_config_byte(temp, PCI_HEADER_TYPE, &hdr_type)) { | 206 | if (!pci_read_config_byte(temp, PCI_HEADER_TYPE, &hdr_type)) { |
207 | temp->hdr_type = hdr_type & 0x7f; | 207 | temp->hdr_type = hdr_type & 0x7f; |
@@ -213,17 +213,12 @@ static void pci_rescan_slot(struct pci_dev *temp) | |||
213 | dbg("New device on %s function %x:%x\n", | 213 | dbg("New device on %s function %x:%x\n", |
214 | bus->name, temp->devfn >> 3, | 214 | bus->name, temp->devfn >> 3, |
215 | temp->devfn & 7); | 215 | temp->devfn & 7); |
216 | retval = pci_bus_add_device(dev); | 216 | count++; |
217 | if (retval) | ||
218 | dev_err(&dev->dev, "error adding " | ||
219 | "device, continuing.\n"); | ||
220 | else | ||
221 | add_slot(dev); | ||
222 | } | 217 | } |
223 | } | 218 | } |
224 | /* multifunction device? */ | 219 | /* multifunction device? */ |
225 | if (!(hdr_type & 0x80)) | 220 | if (!(hdr_type & 0x80)) |
226 | return; | 221 | return count; |
227 | 222 | ||
228 | /* continue scanning for other functions */ | 223 | /* continue scanning for other functions */ |
229 | for (func = 1, temp->devfn++; func < 8; func++, temp->devfn++) { | 224 | for (func = 1, temp->devfn++; func < 8; func++, temp->devfn++) { |
@@ -239,16 +234,13 @@ static void pci_rescan_slot(struct pci_dev *temp) | |||
239 | dbg("New device on %s function %x:%x\n", | 234 | dbg("New device on %s function %x:%x\n", |
240 | bus->name, temp->devfn >> 3, | 235 | bus->name, temp->devfn >> 3, |
241 | temp->devfn & 7); | 236 | temp->devfn & 7); |
242 | retval = pci_bus_add_device(dev); | 237 | count++; |
243 | if (retval) | ||
244 | dev_err(&dev->dev, "error adding " | ||
245 | "device, continuing.\n"); | ||
246 | else | ||
247 | add_slot(dev); | ||
248 | } | 238 | } |
249 | } | 239 | } |
250 | } | 240 | } |
251 | } | 241 | } |
242 | |||
243 | return count; | ||
252 | } | 244 | } |
253 | 245 | ||
254 | 246 | ||
@@ -262,6 +254,8 @@ static void pci_rescan_bus(const struct pci_bus *bus) | |||
262 | { | 254 | { |
263 | unsigned int devfn; | 255 | unsigned int devfn; |
264 | struct pci_dev *dev; | 256 | struct pci_dev *dev; |
257 | int retval; | ||
258 | int found = 0; | ||
265 | dev = alloc_pci_dev(); | 259 | dev = alloc_pci_dev(); |
266 | if (!dev) | 260 | if (!dev) |
267 | return; | 261 | return; |
@@ -270,7 +264,23 @@ static void pci_rescan_bus(const struct pci_bus *bus) | |||
270 | dev->sysdata = bus->sysdata; | 264 | dev->sysdata = bus->sysdata; |
271 | for (devfn = 0; devfn < 0x100; devfn += 8) { | 265 | for (devfn = 0; devfn < 0x100; devfn += 8) { |
272 | dev->devfn = devfn; | 266 | dev->devfn = devfn; |
273 | pci_rescan_slot(dev); | 267 | found += pci_rescan_slot(dev); |
268 | } | ||
269 | |||
270 | if (found) { | ||
271 | pci_bus_assign_resources(bus); | ||
272 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
273 | /* Skip already-added devices */ | ||
274 | if (dev->is_added) | ||
275 | continue; | ||
276 | retval = pci_bus_add_device(dev); | ||
277 | if (retval) | ||
278 | dev_err(&dev->dev, | ||
279 | "Error adding device, continuing\n"); | ||
280 | else | ||
281 | add_slot(dev); | ||
282 | } | ||
283 | pci_bus_add_devices(bus); | ||
274 | } | 284 | } |
275 | kfree(dev); | 285 | kfree(dev); |
276 | } | 286 | } |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 896a15d70f5b..44f15ff70c1d 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -103,6 +103,16 @@ static void msix_set_enable(struct pci_dev *dev, int enable) | |||
103 | } | 103 | } |
104 | } | 104 | } |
105 | 105 | ||
106 | /* | ||
107 | * Essentially, this is ((1 << (1 << x)) - 1), but without the | ||
108 | * undefinedness of a << 32. | ||
109 | */ | ||
110 | static inline __attribute_const__ u32 msi_mask(unsigned x) | ||
111 | { | ||
112 | static const u32 mask[] = { 1, 2, 4, 0xf, 0xff, 0xffff, 0xffffffff }; | ||
113 | return mask[x]; | ||
114 | } | ||
115 | |||
106 | static void msix_flush_writes(struct irq_desc *desc) | 116 | static void msix_flush_writes(struct irq_desc *desc) |
107 | { | 117 | { |
108 | struct msi_desc *entry; | 118 | struct msi_desc *entry; |
@@ -407,8 +417,7 @@ static int msi_capability_init(struct pci_dev *dev) | |||
407 | 417 | ||
408 | /* All MSIs are unmasked by default, Mask them all */ | 418 | /* All MSIs are unmasked by default, Mask them all */ |
409 | pci_read_config_dword(dev, base, &maskbits); | 419 | pci_read_config_dword(dev, base, &maskbits); |
410 | temp = (1 << multi_msi_capable(control)); | 420 | temp = msi_mask((control & PCI_MSI_FLAGS_QMASK) >> 1); |
411 | temp = ((temp - 1) & ~temp); | ||
412 | maskbits |= temp; | 421 | maskbits |= temp; |
413 | pci_write_config_dword(dev, base, maskbits); | 422 | pci_write_config_dword(dev, base, maskbits); |
414 | entry->msi_attrib.maskbits_mask = temp; | 423 | entry->msi_attrib.maskbits_mask = temp; |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 9de07b75b993..ab1d615425a8 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -370,6 +370,7 @@ static int pci_legacy_suspend(struct device *dev, pm_message_t state) | |||
370 | } | 370 | } |
371 | 371 | ||
372 | pci_save_state(pci_dev); | 372 | pci_save_state(pci_dev); |
373 | pci_dev->state_saved = true; | ||
373 | /* | 374 | /* |
374 | * This is for compatibility with existing code with legacy PM support. | 375 | * This is for compatibility with existing code with legacy PM support. |
375 | */ | 376 | */ |
@@ -419,6 +420,7 @@ static int pci_legacy_resume(struct device *dev) | |||
419 | static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev) | 420 | static void pci_pm_default_resume_noirq(struct pci_dev *pci_dev) |
420 | { | 421 | { |
421 | pci_restore_standard_config(pci_dev); | 422 | pci_restore_standard_config(pci_dev); |
423 | pci_dev->state_saved = false; | ||
422 | pci_fixup_device(pci_fixup_resume_early, pci_dev); | 424 | pci_fixup_device(pci_fixup_resume_early, pci_dev); |
423 | } | 425 | } |
424 | 426 | ||
@@ -555,6 +557,13 @@ static int pci_pm_resume(struct device *dev) | |||
555 | struct device_driver *drv = dev->driver; | 557 | struct device_driver *drv = dev->driver; |
556 | int error = 0; | 558 | int error = 0; |
557 | 559 | ||
560 | /* | ||
561 | * This is necessary for the suspend error path in which resume is | ||
562 | * called without restoring the standard config registers of the device. | ||
563 | */ | ||
564 | if (pci_dev->state_saved) | ||
565 | pci_restore_standard_config(pci_dev); | ||
566 | |||
558 | if (pci_has_legacy_pm_support(pci_dev)) | 567 | if (pci_has_legacy_pm_support(pci_dev)) |
559 | return pci_legacy_resume(dev); | 568 | return pci_legacy_resume(dev); |
560 | 569 | ||
@@ -660,7 +669,10 @@ static int pci_pm_poweroff(struct device *dev) | |||
660 | if (pci_has_legacy_pm_support(pci_dev)) | 669 | if (pci_has_legacy_pm_support(pci_dev)) |
661 | return pci_legacy_suspend(dev, PMSG_HIBERNATE); | 670 | return pci_legacy_suspend(dev, PMSG_HIBERNATE); |
662 | 671 | ||
663 | if (drv && drv->pm && drv->pm->poweroff) { | 672 | if (!drv || !drv->pm) |
673 | return 0; | ||
674 | |||
675 | if (drv->pm->poweroff) { | ||
664 | error = drv->pm->poweroff(dev); | 676 | error = drv->pm->poweroff(dev); |
665 | suspend_report_result(drv->pm->poweroff, error); | 677 | suspend_report_result(drv->pm->poweroff, error); |
666 | } | 678 | } |
@@ -710,6 +722,13 @@ static int pci_pm_restore(struct device *dev) | |||
710 | struct device_driver *drv = dev->driver; | 722 | struct device_driver *drv = dev->driver; |
711 | int error = 0; | 723 | int error = 0; |
712 | 724 | ||
725 | /* | ||
726 | * This is necessary for the hibernation error path in which restore is | ||
727 | * called without restoring the standard config registers of the device. | ||
728 | */ | ||
729 | if (pci_dev->state_saved) | ||
730 | pci_restore_standard_config(pci_dev); | ||
731 | |||
713 | if (pci_has_legacy_pm_support(pci_dev)) | 732 | if (pci_has_legacy_pm_support(pci_dev)) |
714 | return pci_legacy_resume(dev); | 733 | return pci_legacy_resume(dev); |
715 | 734 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 17bd9325a245..48807556b47a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1393,35 +1393,35 @@ int pci_restore_standard_config(struct pci_dev *dev) | |||
1393 | pci_power_t prev_state; | 1393 | pci_power_t prev_state; |
1394 | int error; | 1394 | int error; |
1395 | 1395 | ||
1396 | pci_restore_state(dev); | ||
1397 | pci_update_current_state(dev, PCI_D0); | 1396 | pci_update_current_state(dev, PCI_D0); |
1398 | 1397 | ||
1399 | prev_state = dev->current_state; | 1398 | prev_state = dev->current_state; |
1400 | if (prev_state == PCI_D0) | 1399 | if (prev_state == PCI_D0) |
1401 | return 0; | 1400 | goto Restore; |
1402 | 1401 | ||
1403 | error = pci_raw_set_power_state(dev, PCI_D0, false); | 1402 | error = pci_raw_set_power_state(dev, PCI_D0, false); |
1404 | if (error) | 1403 | if (error) |
1405 | return error; | 1404 | return error; |
1406 | 1405 | ||
1407 | if (pci_is_bridge(dev)) { | 1406 | /* |
1408 | if (prev_state > PCI_D1) | 1407 | * This assumes that we won't get a bus in B2 or B3 from the BIOS, but |
1409 | mdelay(PCI_PM_BUS_WAIT); | 1408 | * we've made this assumption forever and it appears to be universally |
1410 | } else { | 1409 | * satisfied. |
1411 | switch(prev_state) { | 1410 | */ |
1412 | case PCI_D3cold: | 1411 | switch(prev_state) { |
1413 | case PCI_D3hot: | 1412 | case PCI_D3cold: |
1414 | mdelay(pci_pm_d3_delay); | 1413 | case PCI_D3hot: |
1415 | break; | 1414 | mdelay(pci_pm_d3_delay); |
1416 | case PCI_D2: | 1415 | break; |
1417 | udelay(PCI_PM_D2_DELAY); | 1416 | case PCI_D2: |
1418 | break; | 1417 | udelay(PCI_PM_D2_DELAY); |
1419 | } | 1418 | break; |
1420 | } | 1419 | } |
1421 | 1420 | ||
1422 | dev->current_state = PCI_D0; | 1421 | dev->current_state = PCI_D0; |
1423 | 1422 | ||
1424 | return 0; | 1423 | Restore: |
1424 | return pci_restore_state(dev); | ||
1425 | } | 1425 | } |
1426 | 1426 | ||
1427 | /** | 1427 | /** |
diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c index 366565aba865..c175e38a4cd5 100644 --- a/drivers/regulator/bq24022.c +++ b/drivers/regulator/bq24022.c | |||
@@ -152,11 +152,7 @@ static void __exit bq24022_exit(void) | |||
152 | platform_driver_unregister(&bq24022_driver); | 152 | platform_driver_unregister(&bq24022_driver); |
153 | } | 153 | } |
154 | 154 | ||
155 | /* | 155 | module_init(bq24022_init); |
156 | * make sure this is probed before gpio_vbus and pda_power, | ||
157 | * but after asic3 or other GPIO expander drivers. | ||
158 | */ | ||
159 | subsys_initcall(bq24022_init); | ||
160 | module_exit(bq24022_exit); | 156 | module_exit(bq24022_exit); |
161 | 157 | ||
162 | MODULE_AUTHOR("Philipp Zabel"); | 158 | MODULE_AUTHOR("Philipp Zabel"); |
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index 7aa35248181b..5056e23e4414 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1435,7 +1435,7 @@ int wm8350_register_led(struct wm8350 *wm8350, int lednum, int dcdc, int isink, | |||
1435 | struct platform_device *pdev; | 1435 | struct platform_device *pdev; |
1436 | int ret; | 1436 | int ret; |
1437 | 1437 | ||
1438 | if (lednum > ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { | 1438 | if (lednum >= ARRAY_SIZE(wm8350->pmic.led) || lednum < 0) { |
1439 | dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); | 1439 | dev_err(wm8350->dev, "Invalid LED index %d\n", lednum); |
1440 | return -ENODEV; | 1440 | return -ENODEV; |
1441 | } | 1441 | } |
diff --git a/drivers/serial/jsm/jsm_tty.c b/drivers/serial/jsm/jsm_tty.c index 3547558d2caf..324c74d2f666 100644 --- a/drivers/serial/jsm/jsm_tty.c +++ b/drivers/serial/jsm/jsm_tty.c | |||
@@ -161,6 +161,11 @@ static void jsm_tty_stop_rx(struct uart_port *port) | |||
161 | channel->ch_bd->bd_ops->disable_receiver(channel); | 161 | channel->ch_bd->bd_ops->disable_receiver(channel); |
162 | } | 162 | } |
163 | 163 | ||
164 | static void jsm_tty_enable_ms(struct uart_port *port) | ||
165 | { | ||
166 | /* Nothing needed */ | ||
167 | } | ||
168 | |||
164 | static void jsm_tty_break(struct uart_port *port, int break_state) | 169 | static void jsm_tty_break(struct uart_port *port, int break_state) |
165 | { | 170 | { |
166 | unsigned long lock_flags; | 171 | unsigned long lock_flags; |
@@ -345,6 +350,7 @@ static struct uart_ops jsm_ops = { | |||
345 | .start_tx = jsm_tty_start_tx, | 350 | .start_tx = jsm_tty_start_tx, |
346 | .send_xchar = jsm_tty_send_xchar, | 351 | .send_xchar = jsm_tty_send_xchar, |
347 | .stop_rx = jsm_tty_stop_rx, | 352 | .stop_rx = jsm_tty_stop_rx, |
353 | .enable_ms = jsm_tty_enable_ms, | ||
348 | .break_ctl = jsm_tty_break, | 354 | .break_ctl = jsm_tty_break, |
349 | .startup = jsm_tty_open, | 355 | .startup = jsm_tty_open, |
350 | .shutdown = jsm_tty_close, | 356 | .shutdown = jsm_tty_close, |
diff --git a/drivers/usb/host/whci/asl.c b/drivers/usb/host/whci/asl.c index 577c0d29849d..2291c5f5af51 100644 --- a/drivers/usb/host/whci/asl.c +++ b/drivers/usb/host/whci/asl.c | |||
@@ -170,12 +170,17 @@ void asl_stop(struct whc *whc) | |||
170 | void asl_update(struct whc *whc, uint32_t wusbcmd) | 170 | void asl_update(struct whc *whc, uint32_t wusbcmd) |
171 | { | 171 | { |
172 | struct wusbhc *wusbhc = &whc->wusbhc; | 172 | struct wusbhc *wusbhc = &whc->wusbhc; |
173 | long t; | ||
173 | 174 | ||
174 | mutex_lock(&wusbhc->mutex); | 175 | mutex_lock(&wusbhc->mutex); |
175 | if (wusbhc->active) { | 176 | if (wusbhc->active) { |
176 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); | 177 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); |
177 | wait_event(whc->async_list_wq, | 178 | t = wait_event_timeout( |
178 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0); | 179 | whc->async_list_wq, |
180 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_ASYNC_UPDATED) == 0, | ||
181 | msecs_to_jiffies(1000)); | ||
182 | if (t == 0) | ||
183 | whc_hw_error(whc, "ASL update timeout"); | ||
179 | } | 184 | } |
180 | mutex_unlock(&wusbhc->mutex); | 185 | mutex_unlock(&wusbhc->mutex); |
181 | } | 186 | } |
diff --git a/drivers/usb/host/whci/hw.c b/drivers/usb/host/whci/hw.c index d498e7203217..6afa2e379160 100644 --- a/drivers/usb/host/whci/hw.c +++ b/drivers/usb/host/whci/hw.c | |||
@@ -87,3 +87,18 @@ out: | |||
87 | 87 | ||
88 | return ret; | 88 | return ret; |
89 | } | 89 | } |
90 | |||
91 | /** | ||
92 | * whc_hw_error - recover from a hardware error | ||
93 | * @whc: the WHCI HC that broke. | ||
94 | * @reason: a description of the failure. | ||
95 | * | ||
96 | * Recover from broken hardware with a full reset. | ||
97 | */ | ||
98 | void whc_hw_error(struct whc *whc, const char *reason) | ||
99 | { | ||
100 | struct wusbhc *wusbhc = &whc->wusbhc; | ||
101 | |||
102 | dev_err(&whc->umc->dev, "hardware error: %s\n", reason); | ||
103 | wusbhc_reset_all(wusbhc); | ||
104 | } | ||
diff --git a/drivers/usb/host/whci/pzl.c b/drivers/usb/host/whci/pzl.c index 2ae5abf69a6a..7dc85a0bee7c 100644 --- a/drivers/usb/host/whci/pzl.c +++ b/drivers/usb/host/whci/pzl.c | |||
@@ -183,12 +183,17 @@ void pzl_stop(struct whc *whc) | |||
183 | void pzl_update(struct whc *whc, uint32_t wusbcmd) | 183 | void pzl_update(struct whc *whc, uint32_t wusbcmd) |
184 | { | 184 | { |
185 | struct wusbhc *wusbhc = &whc->wusbhc; | 185 | struct wusbhc *wusbhc = &whc->wusbhc; |
186 | long t; | ||
186 | 187 | ||
187 | mutex_lock(&wusbhc->mutex); | 188 | mutex_lock(&wusbhc->mutex); |
188 | if (wusbhc->active) { | 189 | if (wusbhc->active) { |
189 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); | 190 | whc_write_wusbcmd(whc, wusbcmd, wusbcmd); |
190 | wait_event(whc->periodic_list_wq, | 191 | t = wait_event_timeout( |
191 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0); | 192 | whc->periodic_list_wq, |
193 | (le_readl(whc->base + WUSBCMD) & WUSBCMD_PERIODIC_UPDATED) == 0, | ||
194 | msecs_to_jiffies(1000)); | ||
195 | if (t == 0) | ||
196 | whc_hw_error(whc, "PZL update timeout"); | ||
192 | } | 197 | } |
193 | mutex_unlock(&wusbhc->mutex); | 198 | mutex_unlock(&wusbhc->mutex); |
194 | } | 199 | } |
diff --git a/drivers/usb/host/whci/whcd.h b/drivers/usb/host/whci/whcd.h index 0f3540f04f53..d3543a181dc9 100644 --- a/drivers/usb/host/whci/whcd.h +++ b/drivers/usb/host/whci/whcd.h | |||
@@ -137,6 +137,7 @@ void whc_clean_up(struct whc *whc); | |||
137 | /* hw.c */ | 137 | /* hw.c */ |
138 | void whc_write_wusbcmd(struct whc *whc, u32 mask, u32 val); | 138 | void whc_write_wusbcmd(struct whc *whc, u32 mask, u32 val); |
139 | int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len); | 139 | int whc_do_gencmd(struct whc *whc, u32 cmd, u32 params, void *addr, size_t len); |
140 | void whc_hw_error(struct whc *whc, const char *reason); | ||
140 | 141 | ||
141 | /* wusb.c */ | 142 | /* wusb.c */ |
142 | int whc_wusbhc_start(struct wusbhc *wusbhc); | 143 | int whc_wusbhc_start(struct wusbhc *wusbhc); |
diff --git a/drivers/usb/wusbcore/devconnect.c b/drivers/usb/wusbcore/devconnect.c index e2e7e4bc8463..8e18141bb2e0 100644 --- a/drivers/usb/wusbcore/devconnect.c +++ b/drivers/usb/wusbcore/devconnect.c | |||
@@ -386,6 +386,7 @@ static void __wusbhc_dev_disconnect(struct wusbhc *wusbhc, | |||
386 | | USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED); | 386 | | USB_PORT_STAT_LOW_SPEED | USB_PORT_STAT_HIGH_SPEED); |
387 | port->change |= USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE; | 387 | port->change |= USB_PORT_STAT_C_CONNECTION | USB_PORT_STAT_C_ENABLE; |
388 | if (wusb_dev) { | 388 | if (wusb_dev) { |
389 | dev_dbg(wusbhc->dev, "disconnecting device from port %d\n", wusb_dev->port_idx); | ||
389 | if (!list_empty(&wusb_dev->cack_node)) | 390 | if (!list_empty(&wusb_dev->cack_node)) |
390 | list_del_init(&wusb_dev->cack_node); | 391 | list_del_init(&wusb_dev->cack_node); |
391 | /* For the one in cack_add() */ | 392 | /* For the one in cack_add() */ |
diff --git a/drivers/usb/wusbcore/rh.c b/drivers/usb/wusbcore/rh.c index 3937bf6f8cef..9fe4246cecb9 100644 --- a/drivers/usb/wusbcore/rh.c +++ b/drivers/usb/wusbcore/rh.c | |||
@@ -100,6 +100,9 @@ static int wusbhc_rh_port_reset(struct wusbhc *wusbhc, u8 port_idx) | |||
100 | struct wusb_port *port = wusb_port_by_idx(wusbhc, port_idx); | 100 | struct wusb_port *port = wusb_port_by_idx(wusbhc, port_idx); |
101 | struct wusb_dev *wusb_dev = port->wusb_dev; | 101 | struct wusb_dev *wusb_dev = port->wusb_dev; |
102 | 102 | ||
103 | if (wusb_dev == NULL) | ||
104 | return -ENOTCONN; | ||
105 | |||
103 | port->status |= USB_PORT_STAT_RESET; | 106 | port->status |= USB_PORT_STAT_RESET; |
104 | port->change |= USB_PORT_STAT_C_RESET; | 107 | port->change |= USB_PORT_STAT_C_RESET; |
105 | 108 | ||
diff --git a/drivers/uwb/allocator.c b/drivers/uwb/allocator.c index c8185e6b0cd5..c13cec7dcbc5 100644 --- a/drivers/uwb/allocator.c +++ b/drivers/uwb/allocator.c | |||
@@ -15,7 +15,6 @@ | |||
15 | * You should have received a copy of the GNU General Public License | 15 | * You should have received a copy of the GNU General Public License |
16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | */ | 17 | */ |
18 | #include <linux/version.h> | ||
19 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
20 | #include <linux/uwb.h> | 19 | #include <linux/uwb.h> |
21 | 20 | ||
diff --git a/drivers/uwb/drp.c b/drivers/uwb/drp.c index 2b4f9406789d..4f5ca99a04b9 100644 --- a/drivers/uwb/drp.c +++ b/drivers/uwb/drp.c | |||
@@ -66,14 +66,14 @@ static void uwb_rc_set_drp_cmd_done(struct uwb_rc *rc, void *arg, | |||
66 | } else | 66 | } else |
67 | dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); | 67 | dev_err(&rc->uwb_dev.dev, "SET-DRP-IE: timeout\n"); |
68 | 68 | ||
69 | spin_lock(&rc->rsvs_lock); | 69 | spin_lock_bh(&rc->rsvs_lock); |
70 | if (rc->set_drp_ie_pending > 1) { | 70 | if (rc->set_drp_ie_pending > 1) { |
71 | rc->set_drp_ie_pending = 0; | 71 | rc->set_drp_ie_pending = 0; |
72 | uwb_rsv_queue_update(rc); | 72 | uwb_rsv_queue_update(rc); |
73 | } else { | 73 | } else { |
74 | rc->set_drp_ie_pending = 0; | 74 | rc->set_drp_ie_pending = 0; |
75 | } | 75 | } |
76 | spin_unlock(&rc->rsvs_lock); | 76 | spin_unlock_bh(&rc->rsvs_lock); |
77 | } | 77 | } |
78 | 78 | ||
79 | /** | 79 | /** |
diff --git a/drivers/uwb/rsv.c b/drivers/uwb/rsv.c index ec6eecb32f30..6b76f4bb4cc7 100644 --- a/drivers/uwb/rsv.c +++ b/drivers/uwb/rsv.c | |||
@@ -114,7 +114,8 @@ void uwb_rsv_dump(char *text, struct uwb_rsv *rsv) | |||
114 | devaddr = rsv->target.devaddr; | 114 | devaddr = rsv->target.devaddr; |
115 | uwb_dev_addr_print(target, sizeof(target), &devaddr); | 115 | uwb_dev_addr_print(target, sizeof(target), &devaddr); |
116 | 116 | ||
117 | dev_dbg(dev, "rsv %s -> %s: %s\n", owner, target, uwb_rsv_state_str(rsv->state)); | 117 | dev_dbg(dev, "rsv %s %s -> %s: %s\n", |
118 | text, owner, target, uwb_rsv_state_str(rsv->state)); | ||
118 | } | 119 | } |
119 | 120 | ||
120 | static void uwb_rsv_release(struct kref *kref) | 121 | static void uwb_rsv_release(struct kref *kref) |
@@ -511,8 +512,7 @@ void uwb_rsv_remove(struct uwb_rsv *rsv) | |||
511 | 512 | ||
512 | if (uwb_rsv_is_owner(rsv)) | 513 | if (uwb_rsv_is_owner(rsv)) |
513 | uwb_rsv_put_stream(rsv); | 514 | uwb_rsv_put_stream(rsv); |
514 | 515 | ||
515 | del_timer_sync(&rsv->timer); | ||
516 | uwb_dev_put(rsv->owner); | 516 | uwb_dev_put(rsv->owner); |
517 | if (rsv->target.type == UWB_RSV_TARGET_DEV) | 517 | if (rsv->target.type == UWB_RSV_TARGET_DEV) |
518 | uwb_dev_put(rsv->target.dev); | 518 | uwb_dev_put(rsv->target.dev); |
@@ -870,7 +870,7 @@ void uwb_rsv_queue_update(struct uwb_rc *rc) | |||
870 | */ | 870 | */ |
871 | void uwb_rsv_sched_update(struct uwb_rc *rc) | 871 | void uwb_rsv_sched_update(struct uwb_rc *rc) |
872 | { | 872 | { |
873 | spin_lock(&rc->rsvs_lock); | 873 | spin_lock_bh(&rc->rsvs_lock); |
874 | if (!delayed_work_pending(&rc->rsv_update_work)) { | 874 | if (!delayed_work_pending(&rc->rsv_update_work)) { |
875 | if (rc->set_drp_ie_pending > 0) { | 875 | if (rc->set_drp_ie_pending > 0) { |
876 | rc->set_drp_ie_pending++; | 876 | rc->set_drp_ie_pending++; |
@@ -879,7 +879,7 @@ void uwb_rsv_sched_update(struct uwb_rc *rc) | |||
879 | uwb_rsv_queue_update(rc); | 879 | uwb_rsv_queue_update(rc); |
880 | } | 880 | } |
881 | unlock: | 881 | unlock: |
882 | spin_unlock(&rc->rsvs_lock); | 882 | spin_unlock_bh(&rc->rsvs_lock); |
883 | } | 883 | } |
884 | 884 | ||
885 | /* | 885 | /* |
@@ -943,13 +943,22 @@ void uwb_rsv_remove_all(struct uwb_rc *rc) | |||
943 | 943 | ||
944 | mutex_lock(&rc->rsvs_mutex); | 944 | mutex_lock(&rc->rsvs_mutex); |
945 | list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) { | 945 | list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) { |
946 | uwb_rsv_remove(rsv); | 946 | if (rsv->state != UWB_RSV_STATE_NONE) |
947 | uwb_rsv_set_state(rsv, UWB_RSV_STATE_NONE); | ||
948 | del_timer_sync(&rsv->timer); | ||
947 | } | 949 | } |
948 | /* Cancel any postponed update. */ | 950 | /* Cancel any postponed update. */ |
949 | rc->set_drp_ie_pending = 0; | 951 | rc->set_drp_ie_pending = 0; |
950 | mutex_unlock(&rc->rsvs_mutex); | 952 | mutex_unlock(&rc->rsvs_mutex); |
951 | 953 | ||
952 | cancel_delayed_work_sync(&rc->rsv_update_work); | 954 | cancel_delayed_work_sync(&rc->rsv_update_work); |
955 | flush_workqueue(rc->rsv_workq); | ||
956 | |||
957 | mutex_lock(&rc->rsvs_mutex); | ||
958 | list_for_each_entry_safe(rsv, t, &rc->reservations, rc_node) { | ||
959 | uwb_rsv_remove(rsv); | ||
960 | } | ||
961 | mutex_unlock(&rc->rsvs_mutex); | ||
953 | } | 962 | } |
954 | 963 | ||
955 | void uwb_rsv_init(struct uwb_rc *rc) | 964 | void uwb_rsv_init(struct uwb_rc *rc) |
diff --git a/drivers/video/aty/mach64_ct.c b/drivers/video/aty/mach64_ct.c index c50c7cf26fe9..2745b8539485 100644 --- a/drivers/video/aty/mach64_ct.c +++ b/drivers/video/aty/mach64_ct.c | |||
@@ -8,6 +8,9 @@ | |||
8 | #include <asm/io.h> | 8 | #include <asm/io.h> |
9 | #include <video/mach64.h> | 9 | #include <video/mach64.h> |
10 | #include "atyfb.h" | 10 | #include "atyfb.h" |
11 | #ifdef CONFIG_PPC | ||
12 | #include <asm/machdep.h> | ||
13 | #endif | ||
11 | 14 | ||
12 | #undef DEBUG | 15 | #undef DEBUG |
13 | 16 | ||
@@ -536,6 +539,14 @@ static int __devinit aty_init_pll_ct(const struct fb_info *info, | |||
536 | pll->ct.xclk_post_div_real = postdividers[xpost_div]; | 539 | pll->ct.xclk_post_div_real = postdividers[xpost_div]; |
537 | pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; | 540 | pll->ct.mclk_fb_div = q * pll->ct.xclk_post_div_real / 8; |
538 | 541 | ||
542 | #ifdef CONFIG_PPC | ||
543 | if (machine_is(powermac)) { | ||
544 | /* Override PLL_EXT_CNTL & 0x07. */ | ||
545 | pll->ct.xclk_post_div = xpost_div; | ||
546 | pll->ct.xclk_ref_div = 1; | ||
547 | } | ||
548 | #endif | ||
549 | |||
539 | #ifdef DEBUG | 550 | #ifdef DEBUG |
540 | pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) / | 551 | pllmclk = (1000000 * pll->ct.mclk_fb_mult * pll->ct.mclk_fb_div) / |
541 | (par->ref_clk_per * pll->ct.pll_ref_div); | 552 | (par->ref_clk_per * pll->ct.pll_ref_div); |
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index bef6b45e8a5c..330aacbdec1f 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c | |||
@@ -192,7 +192,7 @@ static irqreturn_t vp_interrupt(int irq, void *opaque) | |||
192 | drv = container_of(vp_dev->vdev.dev.driver, | 192 | drv = container_of(vp_dev->vdev.dev.driver, |
193 | struct virtio_driver, driver); | 193 | struct virtio_driver, driver); |
194 | 194 | ||
195 | if (drv->config_changed) | 195 | if (drv && drv->config_changed) |
196 | drv->config_changed(&vp_dev->vdev); | 196 | drv->config_changed(&vp_dev->vdev); |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 2ba8f95516a0..efa4b363ce72 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -498,7 +498,7 @@ static ssize_t store_target_kb(struct sys_device *dev, | |||
498 | if (!capable(CAP_SYS_ADMIN)) | 498 | if (!capable(CAP_SYS_ADMIN)) |
499 | return -EPERM; | 499 | return -EPERM; |
500 | 500 | ||
501 | target_bytes = memparse(buf, &endchar); | 501 | target_bytes = simple_strtoull(buf, &endchar, 0) * 1024; |
502 | 502 | ||
503 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); | 503 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); |
504 | 504 | ||
@@ -508,8 +508,39 @@ static ssize_t store_target_kb(struct sys_device *dev, | |||
508 | static SYSDEV_ATTR(target_kb, S_IRUGO | S_IWUSR, | 508 | static SYSDEV_ATTR(target_kb, S_IRUGO | S_IWUSR, |
509 | show_target_kb, store_target_kb); | 509 | show_target_kb, store_target_kb); |
510 | 510 | ||
511 | |||
512 | static ssize_t show_target(struct sys_device *dev, struct sysdev_attribute *attr, | ||
513 | char *buf) | ||
514 | { | ||
515 | return sprintf(buf, "%llu\n", | ||
516 | (u64)balloon_stats.target_pages << PAGE_SHIFT); | ||
517 | } | ||
518 | |||
519 | static ssize_t store_target(struct sys_device *dev, | ||
520 | struct sysdev_attribute *attr, | ||
521 | const char *buf, | ||
522 | size_t count) | ||
523 | { | ||
524 | char *endchar; | ||
525 | unsigned long long target_bytes; | ||
526 | |||
527 | if (!capable(CAP_SYS_ADMIN)) | ||
528 | return -EPERM; | ||
529 | |||
530 | target_bytes = memparse(buf, &endchar); | ||
531 | |||
532 | balloon_set_new_target(target_bytes >> PAGE_SHIFT); | ||
533 | |||
534 | return count; | ||
535 | } | ||
536 | |||
537 | static SYSDEV_ATTR(target, S_IRUGO | S_IWUSR, | ||
538 | show_target, store_target); | ||
539 | |||
540 | |||
511 | static struct sysdev_attribute *balloon_attrs[] = { | 541 | static struct sysdev_attribute *balloon_attrs[] = { |
512 | &attr_target_kb, | 542 | &attr_target_kb, |
543 | &attr_target, | ||
513 | }; | 544 | }; |
514 | 545 | ||
515 | static struct attribute *balloon_info_attrs[] = { | 546 | static struct attribute *balloon_info_attrs[] = { |
diff --git a/fs/bio-integrity.c b/fs/bio-integrity.c index 77ebc3c263d6..549b0144da11 100644 --- a/fs/bio-integrity.c +++ b/fs/bio-integrity.c | |||
@@ -140,7 +140,6 @@ int bio_integrity_add_page(struct bio *bio, struct page *page, | |||
140 | 140 | ||
141 | iv = bip_vec_idx(bip, bip->bip_vcnt); | 141 | iv = bip_vec_idx(bip, bip->bip_vcnt); |
142 | BUG_ON(iv == NULL); | 142 | BUG_ON(iv == NULL); |
143 | BUG_ON(iv->bv_page != NULL); | ||
144 | 143 | ||
145 | iv->bv_page = page; | 144 | iv->bv_page = page; |
146 | iv->bv_len = len; | 145 | iv->bv_len = len; |
@@ -465,7 +464,7 @@ static int bio_integrity_verify(struct bio *bio) | |||
465 | 464 | ||
466 | if (ret) { | 465 | if (ret) { |
467 | kunmap_atomic(kaddr, KM_USER0); | 466 | kunmap_atomic(kaddr, KM_USER0); |
468 | break; | 467 | return ret; |
469 | } | 468 | } |
470 | 469 | ||
471 | sectors = bv->bv_len / bi->sector_size; | 470 | sectors = bv->bv_len / bi->sector_size; |
@@ -493,18 +492,13 @@ static void bio_integrity_verify_fn(struct work_struct *work) | |||
493 | struct bio_integrity_payload *bip = | 492 | struct bio_integrity_payload *bip = |
494 | container_of(work, struct bio_integrity_payload, bip_work); | 493 | container_of(work, struct bio_integrity_payload, bip_work); |
495 | struct bio *bio = bip->bip_bio; | 494 | struct bio *bio = bip->bip_bio; |
496 | int error = bip->bip_error; | 495 | int error; |
497 | 496 | ||
498 | if (bio_integrity_verify(bio)) { | 497 | error = bio_integrity_verify(bio); |
499 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | ||
500 | error = -EIO; | ||
501 | } | ||
502 | 498 | ||
503 | /* Restore original bio completion handler */ | 499 | /* Restore original bio completion handler */ |
504 | bio->bi_end_io = bip->bip_end_io; | 500 | bio->bi_end_io = bip->bip_end_io; |
505 | 501 | bio_endio(bio, error); | |
506 | if (bio->bi_end_io) | ||
507 | bio->bi_end_io(bio, error); | ||
508 | } | 502 | } |
509 | 503 | ||
510 | /** | 504 | /** |
@@ -525,7 +519,17 @@ void bio_integrity_endio(struct bio *bio, int error) | |||
525 | 519 | ||
526 | BUG_ON(bip->bip_bio != bio); | 520 | BUG_ON(bip->bip_bio != bio); |
527 | 521 | ||
528 | bip->bip_error = error; | 522 | /* In case of an I/O error there is no point in verifying the |
523 | * integrity metadata. Restore original bio end_io handler | ||
524 | * and run it. | ||
525 | */ | ||
526 | if (error) { | ||
527 | bio->bi_end_io = bip->bip_end_io; | ||
528 | bio_endio(bio, error); | ||
529 | |||
530 | return; | ||
531 | } | ||
532 | |||
529 | INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); | 533 | INIT_WORK(&bip->bip_work, bio_integrity_verify_fn); |
530 | queue_work(kintegrityd_wq, &bip->bip_work); | 534 | queue_work(kintegrityd_wq, &bip->bip_work); |
531 | } | 535 | } |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 5235c67e7594..c8f8d5904f5e 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -538,6 +538,7 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg) | |||
538 | * cannot be fixed without breaking all existing apps. | 538 | * cannot be fixed without breaking all existing apps. |
539 | */ | 539 | */ |
540 | case TUNSETIFF: | 540 | case TUNSETIFF: |
541 | case TUNGETIFF: | ||
541 | case SIOCGIFFLAGS: | 542 | case SIOCGIFFLAGS: |
542 | case SIOCGIFMETRIC: | 543 | case SIOCGIFMETRIC: |
543 | case SIOCGIFMTU: | 544 | case SIOCGIFMTU: |
@@ -1982,6 +1983,11 @@ COMPATIBLE_IOCTL(TUNSETNOCSUM) | |||
1982 | COMPATIBLE_IOCTL(TUNSETDEBUG) | 1983 | COMPATIBLE_IOCTL(TUNSETDEBUG) |
1983 | COMPATIBLE_IOCTL(TUNSETPERSIST) | 1984 | COMPATIBLE_IOCTL(TUNSETPERSIST) |
1984 | COMPATIBLE_IOCTL(TUNSETOWNER) | 1985 | COMPATIBLE_IOCTL(TUNSETOWNER) |
1986 | COMPATIBLE_IOCTL(TUNSETLINK) | ||
1987 | COMPATIBLE_IOCTL(TUNSETGROUP) | ||
1988 | COMPATIBLE_IOCTL(TUNGETFEATURES) | ||
1989 | COMPATIBLE_IOCTL(TUNSETOFFLOAD) | ||
1990 | COMPATIBLE_IOCTL(TUNSETTXFILTER) | ||
1985 | /* Big V */ | 1991 | /* Big V */ |
1986 | COMPATIBLE_IOCTL(VT_SETMODE) | 1992 | COMPATIBLE_IOCTL(VT_SETMODE) |
1987 | COMPATIBLE_IOCTL(VT_GETMODE) | 1993 | COMPATIBLE_IOCTL(VT_GETMODE) |
@@ -2573,6 +2579,7 @@ HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc) | |||
2573 | HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc) | 2579 | HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc) |
2574 | HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc) | 2580 | HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc) |
2575 | HANDLE_IOCTL(TUNSETIFF, dev_ifsioc) | 2581 | HANDLE_IOCTL(TUNSETIFF, dev_ifsioc) |
2582 | HANDLE_IOCTL(TUNGETIFF, dev_ifsioc) | ||
2576 | HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl) | 2583 | HANDLE_IOCTL(SIOCETHTOOL, ethtool_ioctl) |
2577 | HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl) | 2584 | HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl) |
2578 | HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl) | 2585 | HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl) |
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c index 8e93341f3e82..9c2358391147 100644 --- a/fs/configfs/dir.c +++ b/fs/configfs/dir.c | |||
@@ -553,12 +553,24 @@ static void detach_groups(struct config_group *group) | |||
553 | 553 | ||
554 | child = sd->s_dentry; | 554 | child = sd->s_dentry; |
555 | 555 | ||
556 | /* | ||
557 | * Note: we hide this from lockdep since we have no way | ||
558 | * to teach lockdep about recursive | ||
559 | * I_MUTEX_PARENT -> I_MUTEX_CHILD patterns along a path | ||
560 | * in an inode tree, which are valid as soon as | ||
561 | * I_MUTEX_PARENT -> I_MUTEX_CHILD is valid from a | ||
562 | * parent inode to one of its children. | ||
563 | */ | ||
564 | lockdep_off(); | ||
556 | mutex_lock(&child->d_inode->i_mutex); | 565 | mutex_lock(&child->d_inode->i_mutex); |
566 | lockdep_on(); | ||
557 | 567 | ||
558 | configfs_detach_group(sd->s_element); | 568 | configfs_detach_group(sd->s_element); |
559 | child->d_inode->i_flags |= S_DEAD; | 569 | child->d_inode->i_flags |= S_DEAD; |
560 | 570 | ||
571 | lockdep_off(); | ||
561 | mutex_unlock(&child->d_inode->i_mutex); | 572 | mutex_unlock(&child->d_inode->i_mutex); |
573 | lockdep_on(); | ||
562 | 574 | ||
563 | d_delete(child); | 575 | d_delete(child); |
564 | dput(child); | 576 | dput(child); |
@@ -748,11 +760,22 @@ static int configfs_attach_item(struct config_item *parent_item, | |||
748 | * We are going to remove an inode and its dentry but | 760 | * We are going to remove an inode and its dentry but |
749 | * the VFS may already have hit and used them. Thus, | 761 | * the VFS may already have hit and used them. Thus, |
750 | * we must lock them as rmdir() would. | 762 | * we must lock them as rmdir() would. |
763 | * | ||
764 | * Note: we hide this from lockdep since we have no way | ||
765 | * to teach lockdep about recursive | ||
766 | * I_MUTEX_PARENT -> I_MUTEX_CHILD patterns along a path | ||
767 | * in an inode tree, which are valid as soon as | ||
768 | * I_MUTEX_PARENT -> I_MUTEX_CHILD is valid from a | ||
769 | * parent inode to one of its children. | ||
751 | */ | 770 | */ |
771 | lockdep_off(); | ||
752 | mutex_lock(&dentry->d_inode->i_mutex); | 772 | mutex_lock(&dentry->d_inode->i_mutex); |
773 | lockdep_on(); | ||
753 | configfs_remove_dir(item); | 774 | configfs_remove_dir(item); |
754 | dentry->d_inode->i_flags |= S_DEAD; | 775 | dentry->d_inode->i_flags |= S_DEAD; |
776 | lockdep_off(); | ||
755 | mutex_unlock(&dentry->d_inode->i_mutex); | 777 | mutex_unlock(&dentry->d_inode->i_mutex); |
778 | lockdep_on(); | ||
756 | d_delete(dentry); | 779 | d_delete(dentry); |
757 | } | 780 | } |
758 | } | 781 | } |
@@ -787,14 +810,25 @@ static int configfs_attach_group(struct config_item *parent_item, | |||
787 | * | 810 | * |
788 | * We must also lock the inode to remove it safely in case of | 811 | * We must also lock the inode to remove it safely in case of |
789 | * error, as rmdir() would. | 812 | * error, as rmdir() would. |
813 | * | ||
814 | * Note: we hide this from lockdep since we have no way | ||
815 | * to teach lockdep about recursive | ||
816 | * I_MUTEX_PARENT -> I_MUTEX_CHILD patterns along a path | ||
817 | * in an inode tree, which are valid as soon as | ||
818 | * I_MUTEX_PARENT -> I_MUTEX_CHILD is valid from a | ||
819 | * parent inode to one of its children. | ||
790 | */ | 820 | */ |
821 | lockdep_off(); | ||
791 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); | 822 | mutex_lock_nested(&dentry->d_inode->i_mutex, I_MUTEX_CHILD); |
823 | lockdep_on(); | ||
792 | ret = populate_groups(to_config_group(item)); | 824 | ret = populate_groups(to_config_group(item)); |
793 | if (ret) { | 825 | if (ret) { |
794 | configfs_detach_item(item); | 826 | configfs_detach_item(item); |
795 | dentry->d_inode->i_flags |= S_DEAD; | 827 | dentry->d_inode->i_flags |= S_DEAD; |
796 | } | 828 | } |
829 | lockdep_off(); | ||
797 | mutex_unlock(&dentry->d_inode->i_mutex); | 830 | mutex_unlock(&dentry->d_inode->i_mutex); |
831 | lockdep_on(); | ||
798 | if (ret) | 832 | if (ret) |
799 | d_delete(dentry); | 833 | d_delete(dentry); |
800 | } | 834 | } |
@@ -956,7 +990,17 @@ static int configfs_depend_prep(struct dentry *origin, | |||
956 | BUG_ON(!origin || !sd); | 990 | BUG_ON(!origin || !sd); |
957 | 991 | ||
958 | /* Lock this guy on the way down */ | 992 | /* Lock this guy on the way down */ |
993 | /* | ||
994 | * Note: we hide this from lockdep since we have no way | ||
995 | * to teach lockdep about recursive | ||
996 | * I_MUTEX_PARENT -> I_MUTEX_CHILD patterns along a path | ||
997 | * in an inode tree, which are valid as soon as | ||
998 | * I_MUTEX_PARENT -> I_MUTEX_CHILD is valid from a | ||
999 | * parent inode to one of its children. | ||
1000 | */ | ||
1001 | lockdep_off(); | ||
959 | mutex_lock(&sd->s_dentry->d_inode->i_mutex); | 1002 | mutex_lock(&sd->s_dentry->d_inode->i_mutex); |
1003 | lockdep_on(); | ||
960 | if (sd->s_element == target) /* Boo-yah */ | 1004 | if (sd->s_element == target) /* Boo-yah */ |
961 | goto out; | 1005 | goto out; |
962 | 1006 | ||
@@ -970,7 +1014,9 @@ static int configfs_depend_prep(struct dentry *origin, | |||
970 | } | 1014 | } |
971 | 1015 | ||
972 | /* We looped all our children and didn't find target */ | 1016 | /* We looped all our children and didn't find target */ |
1017 | lockdep_off(); | ||
973 | mutex_unlock(&sd->s_dentry->d_inode->i_mutex); | 1018 | mutex_unlock(&sd->s_dentry->d_inode->i_mutex); |
1019 | lockdep_on(); | ||
974 | ret = -ENOENT; | 1020 | ret = -ENOENT; |
975 | 1021 | ||
976 | out: | 1022 | out: |
@@ -990,11 +1036,16 @@ static void configfs_depend_rollback(struct dentry *origin, | |||
990 | struct dentry *dentry = item->ci_dentry; | 1036 | struct dentry *dentry = item->ci_dentry; |
991 | 1037 | ||
992 | while (dentry != origin) { | 1038 | while (dentry != origin) { |
1039 | /* See comments in configfs_depend_prep() */ | ||
1040 | lockdep_off(); | ||
993 | mutex_unlock(&dentry->d_inode->i_mutex); | 1041 | mutex_unlock(&dentry->d_inode->i_mutex); |
1042 | lockdep_on(); | ||
994 | dentry = dentry->d_parent; | 1043 | dentry = dentry->d_parent; |
995 | } | 1044 | } |
996 | 1045 | ||
1046 | lockdep_off(); | ||
997 | mutex_unlock(&origin->d_inode->i_mutex); | 1047 | mutex_unlock(&origin->d_inode->i_mutex); |
1048 | lockdep_on(); | ||
998 | } | 1049 | } |
999 | 1050 | ||
1000 | int configfs_depend_item(struct configfs_subsystem *subsys, | 1051 | int configfs_depend_item(struct configfs_subsystem *subsys, |
@@ -1329,8 +1380,16 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry) | |||
1329 | } | 1380 | } |
1330 | 1381 | ||
1331 | /* Wait until the racing operation terminates */ | 1382 | /* Wait until the racing operation terminates */ |
1383 | /* | ||
1384 | * Note: we hide this from lockdep since we are locked | ||
1385 | * with subclass I_MUTEX_NORMAL from vfs_rmdir() (why | ||
1386 | * not I_MUTEX_CHILD?), and I_MUTEX_XATTR or | ||
1387 | * I_MUTEX_QUOTA are not relevant for the locked inode. | ||
1388 | */ | ||
1389 | lockdep_off(); | ||
1332 | mutex_lock(wait_mutex); | 1390 | mutex_lock(wait_mutex); |
1333 | mutex_unlock(wait_mutex); | 1391 | mutex_unlock(wait_mutex); |
1392 | lockdep_on(); | ||
1334 | } | 1393 | } |
1335 | } while (ret == -EAGAIN); | 1394 | } while (ret == -EAGAIN); |
1336 | 1395 | ||
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 69a3d19ca9fd..4db4ffa1edad 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1358,7 +1358,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1358 | struct fake_dirent *fde; | 1358 | struct fake_dirent *fde; |
1359 | 1359 | ||
1360 | blocksize = dir->i_sb->s_blocksize; | 1360 | blocksize = dir->i_sb->s_blocksize; |
1361 | dxtrace(printk("Creating index\n")); | 1361 | dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); |
1362 | retval = ext3_journal_get_write_access(handle, bh); | 1362 | retval = ext3_journal_get_write_access(handle, bh); |
1363 | if (retval) { | 1363 | if (retval) { |
1364 | ext3_std_error(dir->i_sb, retval); | 1364 | ext3_std_error(dir->i_sb, retval); |
@@ -1367,6 +1367,19 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1367 | } | 1367 | } |
1368 | root = (struct dx_root *) bh->b_data; | 1368 | root = (struct dx_root *) bh->b_data; |
1369 | 1369 | ||
1370 | /* The 0th block becomes the root, move the dirents out */ | ||
1371 | fde = &root->dotdot; | ||
1372 | de = (struct ext3_dir_entry_2 *)((char *)fde + | ||
1373 | ext3_rec_len_from_disk(fde->rec_len)); | ||
1374 | if ((char *) de >= (((char *) root) + blocksize)) { | ||
1375 | ext3_error(dir->i_sb, __func__, | ||
1376 | "invalid rec_len for '..' in inode %lu", | ||
1377 | dir->i_ino); | ||
1378 | brelse(bh); | ||
1379 | return -EIO; | ||
1380 | } | ||
1381 | len = ((char *) root) + blocksize - (char *) de; | ||
1382 | |||
1370 | bh2 = ext3_append (handle, dir, &block, &retval); | 1383 | bh2 = ext3_append (handle, dir, &block, &retval); |
1371 | if (!(bh2)) { | 1384 | if (!(bh2)) { |
1372 | brelse(bh); | 1385 | brelse(bh); |
@@ -1375,11 +1388,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1375 | EXT3_I(dir)->i_flags |= EXT3_INDEX_FL; | 1388 | EXT3_I(dir)->i_flags |= EXT3_INDEX_FL; |
1376 | data1 = bh2->b_data; | 1389 | data1 = bh2->b_data; |
1377 | 1390 | ||
1378 | /* The 0th block becomes the root, move the dirents out */ | ||
1379 | fde = &root->dotdot; | ||
1380 | de = (struct ext3_dir_entry_2 *)((char *)fde + | ||
1381 | ext3_rec_len_from_disk(fde->rec_len)); | ||
1382 | len = ((char *) root) + blocksize - (char *) de; | ||
1383 | memcpy (data1, de, len); | 1391 | memcpy (data1, de, len); |
1384 | de = (struct ext3_dir_entry_2 *) data1; | 1392 | de = (struct ext3_dir_entry_2 *) data1; |
1385 | top = data1 + len; | 1393 | top = data1 + len; |
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c index 6bba06b09dd1..9a50b8052dcf 100644 --- a/fs/ext4/balloc.c +++ b/fs/ext4/balloc.c | |||
@@ -684,15 +684,15 @@ ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb) | |||
684 | gdp = ext4_get_group_desc(sb, i, NULL); | 684 | gdp = ext4_get_group_desc(sb, i, NULL); |
685 | if (!gdp) | 685 | if (!gdp) |
686 | continue; | 686 | continue; |
687 | desc_count += le16_to_cpu(gdp->bg_free_blocks_count); | 687 | desc_count += ext4_free_blks_count(sb, gdp); |
688 | brelse(bitmap_bh); | 688 | brelse(bitmap_bh); |
689 | bitmap_bh = ext4_read_block_bitmap(sb, i); | 689 | bitmap_bh = ext4_read_block_bitmap(sb, i); |
690 | if (bitmap_bh == NULL) | 690 | if (bitmap_bh == NULL) |
691 | continue; | 691 | continue; |
692 | 692 | ||
693 | x = ext4_count_free(bitmap_bh, sb->s_blocksize); | 693 | x = ext4_count_free(bitmap_bh, sb->s_blocksize); |
694 | printk(KERN_DEBUG "group %lu: stored = %d, counted = %u\n", | 694 | printk(KERN_DEBUG "group %u: stored = %d, counted = %u\n", |
695 | i, le16_to_cpu(gdp->bg_free_blocks_count), x); | 695 | i, ext4_free_blks_count(sb, gdp), x); |
696 | bitmap_count += x; | 696 | bitmap_count += x; |
697 | } | 697 | } |
698 | brelse(bitmap_bh); | 698 | brelse(bitmap_bh); |
diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index c668e4377d76..aafc9eba1c25 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h | |||
@@ -1206,8 +1206,11 @@ static inline void ext4_r_blocks_count_set(struct ext4_super_block *es, | |||
1206 | 1206 | ||
1207 | static inline loff_t ext4_isize(struct ext4_inode *raw_inode) | 1207 | static inline loff_t ext4_isize(struct ext4_inode *raw_inode) |
1208 | { | 1208 | { |
1209 | return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | | 1209 | if (S_ISREG(le16_to_cpu(raw_inode->i_mode))) |
1210 | le32_to_cpu(raw_inode->i_size_lo); | 1210 | return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) | |
1211 | le32_to_cpu(raw_inode->i_size_lo); | ||
1212 | else | ||
1213 | return (loff_t) le32_to_cpu(raw_inode->i_size_lo); | ||
1211 | } | 1214 | } |
1212 | 1215 | ||
1213 | static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size) | 1216 | static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size) |
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c index 54bf0623a9ae..e2eab196875f 100644 --- a/fs/ext4/extents.c +++ b/fs/ext4/extents.c | |||
@@ -3048,7 +3048,7 @@ retry: | |||
3048 | WARN_ON(ret <= 0); | 3048 | WARN_ON(ret <= 0); |
3049 | printk(KERN_ERR "%s: ext4_ext_get_blocks " | 3049 | printk(KERN_ERR "%s: ext4_ext_get_blocks " |
3050 | "returned error inode#%lu, block=%u, " | 3050 | "returned error inode#%lu, block=%u, " |
3051 | "max_blocks=%lu", __func__, | 3051 | "max_blocks=%u", __func__, |
3052 | inode->i_ino, block, max_blocks); | 3052 | inode->i_ino, block, max_blocks); |
3053 | #endif | 3053 | #endif |
3054 | ext4_mark_inode_dirty(handle, inode); | 3054 | ext4_mark_inode_dirty(handle, inode); |
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a6444cee0c7e..03ba20be1329 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c | |||
@@ -360,9 +360,9 @@ static int ext4_block_to_path(struct inode *inode, | |||
360 | final = ptrs; | 360 | final = ptrs; |
361 | } else { | 361 | } else { |
362 | ext4_warning(inode->i_sb, "ext4_block_to_path", | 362 | ext4_warning(inode->i_sb, "ext4_block_to_path", |
363 | "block %lu > max", | 363 | "block %lu > max in inode %lu", |
364 | i_block + direct_blocks + | 364 | i_block + direct_blocks + |
365 | indirect_blocks + double_blocks); | 365 | indirect_blocks + double_blocks, inode->i_ino); |
366 | } | 366 | } |
367 | if (boundary) | 367 | if (boundary) |
368 | *boundary = final - 1 - (i_block & (ptrs - 1)); | 368 | *boundary = final - 1 - (i_block & (ptrs - 1)); |
@@ -2821,9 +2821,6 @@ static sector_t ext4_bmap(struct address_space *mapping, sector_t block) | |||
2821 | filemap_write_and_wait(mapping); | 2821 | filemap_write_and_wait(mapping); |
2822 | } | 2822 | } |
2823 | 2823 | ||
2824 | BUG_ON(!EXT4_JOURNAL(inode) && | ||
2825 | EXT4_I(inode)->i_state & EXT4_STATE_JDATA); | ||
2826 | |||
2827 | if (EXT4_JOURNAL(inode) && EXT4_I(inode)->i_state & EXT4_STATE_JDATA) { | 2824 | if (EXT4_JOURNAL(inode) && EXT4_I(inode)->i_state & EXT4_STATE_JDATA) { |
2828 | /* | 2825 | /* |
2829 | * This is a REALLY heavyweight approach, but the use of | 2826 | * This is a REALLY heavyweight approach, but the use of |
@@ -3622,7 +3619,7 @@ static void ext4_free_data(handle_t *handle, struct inode *inode, | |||
3622 | * block pointed to itself, it would have been detached when | 3619 | * block pointed to itself, it would have been detached when |
3623 | * the block was cleared. Check for this instead of OOPSing. | 3620 | * the block was cleared. Check for this instead of OOPSing. |
3624 | */ | 3621 | */ |
3625 | if (bh2jh(this_bh)) | 3622 | if ((EXT4_JOURNAL(inode) == NULL) || bh2jh(this_bh)) |
3626 | ext4_handle_dirty_metadata(handle, inode, this_bh); | 3623 | ext4_handle_dirty_metadata(handle, inode, this_bh); |
3627 | else | 3624 | else |
3628 | ext4_error(inode->i_sb, __func__, | 3625 | ext4_error(inode->i_sb, __func__, |
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 918aec0c8a11..deba54f6cbed 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3025,7 +3025,7 @@ ext4_mb_mark_diskspace_used(struct ext4_allocation_context *ac, | |||
3025 | goto out_err; | 3025 | goto out_err; |
3026 | 3026 | ||
3027 | ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, | 3027 | ext4_debug("using block group %u(%d)\n", ac->ac_b_ex.fe_group, |
3028 | gdp->bg_free_blocks_count); | 3028 | ext4_free_blks_count(sb, gdp)); |
3029 | 3029 | ||
3030 | err = ext4_journal_get_write_access(handle, gdp_bh); | 3030 | err = ext4_journal_get_write_access(handle, gdp_bh); |
3031 | if (err) | 3031 | if (err) |
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index fec0b4c2f5f1..ba702bd7910d 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -1368,7 +1368,7 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1368 | struct fake_dirent *fde; | 1368 | struct fake_dirent *fde; |
1369 | 1369 | ||
1370 | blocksize = dir->i_sb->s_blocksize; | 1370 | blocksize = dir->i_sb->s_blocksize; |
1371 | dxtrace(printk(KERN_DEBUG "Creating index\n")); | 1371 | dxtrace(printk(KERN_DEBUG "Creating index: inode %lu\n", dir->i_ino)); |
1372 | retval = ext4_journal_get_write_access(handle, bh); | 1372 | retval = ext4_journal_get_write_access(handle, bh); |
1373 | if (retval) { | 1373 | if (retval) { |
1374 | ext4_std_error(dir->i_sb, retval); | 1374 | ext4_std_error(dir->i_sb, retval); |
@@ -1377,6 +1377,20 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1377 | } | 1377 | } |
1378 | root = (struct dx_root *) bh->b_data; | 1378 | root = (struct dx_root *) bh->b_data; |
1379 | 1379 | ||
1380 | /* The 0th block becomes the root, move the dirents out */ | ||
1381 | fde = &root->dotdot; | ||
1382 | de = (struct ext4_dir_entry_2 *)((char *)fde + | ||
1383 | ext4_rec_len_from_disk(fde->rec_len)); | ||
1384 | if ((char *) de >= (((char *) root) + blocksize)) { | ||
1385 | ext4_error(dir->i_sb, __func__, | ||
1386 | "invalid rec_len for '..' in inode %lu", | ||
1387 | dir->i_ino); | ||
1388 | brelse(bh); | ||
1389 | return -EIO; | ||
1390 | } | ||
1391 | len = ((char *) root) + blocksize - (char *) de; | ||
1392 | |||
1393 | /* Allocate new block for the 0th block's dirents */ | ||
1380 | bh2 = ext4_append(handle, dir, &block, &retval); | 1394 | bh2 = ext4_append(handle, dir, &block, &retval); |
1381 | if (!(bh2)) { | 1395 | if (!(bh2)) { |
1382 | brelse(bh); | 1396 | brelse(bh); |
@@ -1385,11 +1399,6 @@ static int make_indexed_dir(handle_t *handle, struct dentry *dentry, | |||
1385 | EXT4_I(dir)->i_flags |= EXT4_INDEX_FL; | 1399 | EXT4_I(dir)->i_flags |= EXT4_INDEX_FL; |
1386 | data1 = bh2->b_data; | 1400 | data1 = bh2->b_data; |
1387 | 1401 | ||
1388 | /* The 0th block becomes the root, move the dirents out */ | ||
1389 | fde = &root->dotdot; | ||
1390 | de = (struct ext4_dir_entry_2 *)((char *)fde + | ||
1391 | ext4_rec_len_from_disk(fde->rec_len)); | ||
1392 | len = ((char *) root) + blocksize - (char *) de; | ||
1393 | memcpy (data1, de, len); | 1402 | memcpy (data1, de, len); |
1394 | de = (struct ext4_dir_entry_2 *) data1; | 1403 | de = (struct ext4_dir_entry_2 *) data1; |
1395 | top = data1 + len; | 1404 | top = data1 + len; |
diff --git a/fs/ext4/resize.c b/fs/ext4/resize.c index c328be5d6885..c06886abd658 100644 --- a/fs/ext4/resize.c +++ b/fs/ext4/resize.c | |||
@@ -861,12 +861,13 @@ int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input) | |||
861 | gdp = (struct ext4_group_desc *)((char *)primary->b_data + | 861 | gdp = (struct ext4_group_desc *)((char *)primary->b_data + |
862 | gdb_off * EXT4_DESC_SIZE(sb)); | 862 | gdb_off * EXT4_DESC_SIZE(sb)); |
863 | 863 | ||
864 | memset(gdp, 0, EXT4_DESC_SIZE(sb)); | ||
864 | ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ | 865 | ext4_block_bitmap_set(sb, gdp, input->block_bitmap); /* LV FIXME */ |
865 | ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ | 866 | ext4_inode_bitmap_set(sb, gdp, input->inode_bitmap); /* LV FIXME */ |
866 | ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */ | 867 | ext4_inode_table_set(sb, gdp, input->inode_table); /* LV FIXME */ |
867 | ext4_free_blks_set(sb, gdp, input->free_blocks_count); | 868 | ext4_free_blks_set(sb, gdp, input->free_blocks_count); |
868 | ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); | 869 | ext4_free_inodes_set(sb, gdp, EXT4_INODES_PER_GROUP(sb)); |
869 | gdp->bg_flags |= cpu_to_le16(EXT4_BG_INODE_ZEROED); | 870 | gdp->bg_flags = cpu_to_le16(EXT4_BG_INODE_ZEROED); |
870 | gdp->bg_checksum = ext4_group_desc_csum(sbi, input->group, gdp); | 871 | gdp->bg_checksum = ext4_group_desc_csum(sbi, input->group, gdp); |
871 | 872 | ||
872 | /* | 873 | /* |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 56675306ed81..eb343008eded 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
@@ -37,10 +37,10 @@ | |||
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | #include <linux/debugfs.h> | 38 | #include <linux/debugfs.h> |
39 | #include <linux/seq_file.h> | 39 | #include <linux/seq_file.h> |
40 | #include <linux/math64.h> | ||
40 | 41 | ||
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
42 | #include <asm/page.h> | 43 | #include <asm/page.h> |
43 | #include <asm/div64.h> | ||
44 | 44 | ||
45 | EXPORT_SYMBOL(jbd2_journal_start); | 45 | EXPORT_SYMBOL(jbd2_journal_start); |
46 | EXPORT_SYMBOL(jbd2_journal_restart); | 46 | EXPORT_SYMBOL(jbd2_journal_restart); |
@@ -846,8 +846,8 @@ static int jbd2_seq_info_show(struct seq_file *seq, void *v) | |||
846 | jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid)); | 846 | jiffies_to_msecs(s->stats->u.run.rs_flushing / s->stats->ts_tid)); |
847 | seq_printf(seq, " %ums logging transaction\n", | 847 | seq_printf(seq, " %ums logging transaction\n", |
848 | jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid)); | 848 | jiffies_to_msecs(s->stats->u.run.rs_logging / s->stats->ts_tid)); |
849 | seq_printf(seq, " %luus average transaction commit time\n", | 849 | seq_printf(seq, " %lluus average transaction commit time\n", |
850 | do_div(s->journal->j_average_commit_time, 1000)); | 850 | div_u64(s->journal->j_average_commit_time, 1000)); |
851 | seq_printf(seq, " %lu handles per transaction\n", | 851 | seq_printf(seq, " %lu handles per transaction\n", |
852 | s->stats->u.run.rs_handle_count / s->stats->ts_tid); | 852 | s->stats->u.run.rs_handle_count / s->stats->ts_tid); |
853 | seq_printf(seq, " %lu blocks per transaction\n", | 853 | seq_printf(seq, " %lu blocks per transaction\n", |
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c index d861096c9d81..60fe74035db5 100644 --- a/fs/ocfs2/alloc.c +++ b/fs/ocfs2/alloc.c | |||
@@ -5390,6 +5390,9 @@ int ocfs2_remove_btree_range(struct inode *inode, | |||
5390 | goto out; | 5390 | goto out; |
5391 | } | 5391 | } |
5392 | 5392 | ||
5393 | vfs_dq_free_space_nodirty(inode, | ||
5394 | ocfs2_clusters_to_bytes(inode->i_sb, len)); | ||
5395 | |||
5393 | ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac, | 5396 | ret = ocfs2_remove_extent(inode, et, cpos, len, handle, meta_ac, |
5394 | dealloc); | 5397 | dealloc); |
5395 | if (ret) { | 5398 | if (ret) { |
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c index b1cc7c381e88..e9d7c2038c0f 100644 --- a/fs/ocfs2/dcache.c +++ b/fs/ocfs2/dcache.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include "dlmglue.h" | 38 | #include "dlmglue.h" |
39 | #include "file.h" | 39 | #include "file.h" |
40 | #include "inode.h" | 40 | #include "inode.h" |
41 | #include "super.h" | ||
41 | 42 | ||
42 | 43 | ||
43 | static int ocfs2_dentry_revalidate(struct dentry *dentry, | 44 | static int ocfs2_dentry_revalidate(struct dentry *dentry, |
@@ -294,6 +295,34 @@ out_attach: | |||
294 | return ret; | 295 | return ret; |
295 | } | 296 | } |
296 | 297 | ||
298 | static DEFINE_SPINLOCK(dentry_list_lock); | ||
299 | |||
300 | /* We limit the number of dentry locks to drop in one go. We have | ||
301 | * this limit so that we don't starve other users of ocfs2_wq. */ | ||
302 | #define DL_INODE_DROP_COUNT 64 | ||
303 | |||
304 | /* Drop inode references from dentry locks */ | ||
305 | void ocfs2_drop_dl_inodes(struct work_struct *work) | ||
306 | { | ||
307 | struct ocfs2_super *osb = container_of(work, struct ocfs2_super, | ||
308 | dentry_lock_work); | ||
309 | struct ocfs2_dentry_lock *dl; | ||
310 | int drop_count = DL_INODE_DROP_COUNT; | ||
311 | |||
312 | spin_lock(&dentry_list_lock); | ||
313 | while (osb->dentry_lock_list && drop_count--) { | ||
314 | dl = osb->dentry_lock_list; | ||
315 | osb->dentry_lock_list = dl->dl_next; | ||
316 | spin_unlock(&dentry_list_lock); | ||
317 | iput(dl->dl_inode); | ||
318 | kfree(dl); | ||
319 | spin_lock(&dentry_list_lock); | ||
320 | } | ||
321 | if (osb->dentry_lock_list) | ||
322 | queue_work(ocfs2_wq, &osb->dentry_lock_work); | ||
323 | spin_unlock(&dentry_list_lock); | ||
324 | } | ||
325 | |||
297 | /* | 326 | /* |
298 | * ocfs2_dentry_iput() and friends. | 327 | * ocfs2_dentry_iput() and friends. |
299 | * | 328 | * |
@@ -318,16 +347,23 @@ out_attach: | |||
318 | static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb, | 347 | static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb, |
319 | struct ocfs2_dentry_lock *dl) | 348 | struct ocfs2_dentry_lock *dl) |
320 | { | 349 | { |
321 | iput(dl->dl_inode); | ||
322 | ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); | 350 | ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); |
323 | ocfs2_lock_res_free(&dl->dl_lockres); | 351 | ocfs2_lock_res_free(&dl->dl_lockres); |
324 | kfree(dl); | 352 | |
353 | /* We leave dropping of inode reference to ocfs2_wq as that can | ||
354 | * possibly lead to inode deletion which gets tricky */ | ||
355 | spin_lock(&dentry_list_lock); | ||
356 | if (!osb->dentry_lock_list) | ||
357 | queue_work(ocfs2_wq, &osb->dentry_lock_work); | ||
358 | dl->dl_next = osb->dentry_lock_list; | ||
359 | osb->dentry_lock_list = dl; | ||
360 | spin_unlock(&dentry_list_lock); | ||
325 | } | 361 | } |
326 | 362 | ||
327 | void ocfs2_dentry_lock_put(struct ocfs2_super *osb, | 363 | void ocfs2_dentry_lock_put(struct ocfs2_super *osb, |
328 | struct ocfs2_dentry_lock *dl) | 364 | struct ocfs2_dentry_lock *dl) |
329 | { | 365 | { |
330 | int unlock = 0; | 366 | int unlock; |
331 | 367 | ||
332 | BUG_ON(dl->dl_count == 0); | 368 | BUG_ON(dl->dl_count == 0); |
333 | 369 | ||
diff --git a/fs/ocfs2/dcache.h b/fs/ocfs2/dcache.h index c091c34d9883..d06e16c06640 100644 --- a/fs/ocfs2/dcache.h +++ b/fs/ocfs2/dcache.h | |||
@@ -29,8 +29,13 @@ | |||
29 | extern struct dentry_operations ocfs2_dentry_ops; | 29 | extern struct dentry_operations ocfs2_dentry_ops; |
30 | 30 | ||
31 | struct ocfs2_dentry_lock { | 31 | struct ocfs2_dentry_lock { |
32 | /* Use count of dentry lock */ | ||
32 | unsigned int dl_count; | 33 | unsigned int dl_count; |
33 | u64 dl_parent_blkno; | 34 | union { |
35 | /* Linked list of dentry locks to release */ | ||
36 | struct ocfs2_dentry_lock *dl_next; | ||
37 | u64 dl_parent_blkno; | ||
38 | }; | ||
34 | 39 | ||
35 | /* | 40 | /* |
36 | * The ocfs2_dentry_lock keeps an inode reference until | 41 | * The ocfs2_dentry_lock keeps an inode reference until |
@@ -47,6 +52,8 @@ int ocfs2_dentry_attach_lock(struct dentry *dentry, struct inode *inode, | |||
47 | void ocfs2_dentry_lock_put(struct ocfs2_super *osb, | 52 | void ocfs2_dentry_lock_put(struct ocfs2_super *osb, |
48 | struct ocfs2_dentry_lock *dl); | 53 | struct ocfs2_dentry_lock *dl); |
49 | 54 | ||
55 | void ocfs2_drop_dl_inodes(struct work_struct *work); | ||
56 | |||
50 | struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, | 57 | struct dentry *ocfs2_find_local_alias(struct inode *inode, u64 parent_blkno, |
51 | int skip_unhashed); | 58 | int skip_unhashed); |
52 | 59 | ||
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index b0c4cadd4c45..206a2370876a 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -2860,6 +2860,10 @@ static void ocfs2_unlock_ast(void *opaque, int error) | |||
2860 | case OCFS2_UNLOCK_CANCEL_CONVERT: | 2860 | case OCFS2_UNLOCK_CANCEL_CONVERT: |
2861 | mlog(0, "Cancel convert success for %s\n", lockres->l_name); | 2861 | mlog(0, "Cancel convert success for %s\n", lockres->l_name); |
2862 | lockres->l_action = OCFS2_AST_INVALID; | 2862 | lockres->l_action = OCFS2_AST_INVALID; |
2863 | /* Downconvert thread may have requeued this lock, we | ||
2864 | * need to wake it. */ | ||
2865 | if (lockres->l_flags & OCFS2_LOCK_BLOCKED) | ||
2866 | ocfs2_wake_downconvert_thread(ocfs2_get_lockres_osb(lockres)); | ||
2863 | break; | 2867 | break; |
2864 | case OCFS2_UNLOCK_DROP_LOCK: | 2868 | case OCFS2_UNLOCK_DROP_LOCK: |
2865 | lockres->l_level = DLM_LOCK_IV; | 2869 | lockres->l_level = DLM_LOCK_IV; |
diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index ad5c24a29edd..077384135f4e 100644 --- a/fs/ocfs2/ocfs2.h +++ b/fs/ocfs2/ocfs2.h | |||
@@ -210,6 +210,7 @@ struct ocfs2_journal; | |||
210 | struct ocfs2_slot_info; | 210 | struct ocfs2_slot_info; |
211 | struct ocfs2_recovery_map; | 211 | struct ocfs2_recovery_map; |
212 | struct ocfs2_quota_recovery; | 212 | struct ocfs2_quota_recovery; |
213 | struct ocfs2_dentry_lock; | ||
213 | struct ocfs2_super | 214 | struct ocfs2_super |
214 | { | 215 | { |
215 | struct task_struct *commit_task; | 216 | struct task_struct *commit_task; |
@@ -325,6 +326,11 @@ struct ocfs2_super | |||
325 | struct list_head blocked_lock_list; | 326 | struct list_head blocked_lock_list; |
326 | unsigned long blocked_lock_count; | 327 | unsigned long blocked_lock_count; |
327 | 328 | ||
329 | /* List of dentry locks to release. Anyone can add locks to | ||
330 | * the list, ocfs2_wq processes the list */ | ||
331 | struct ocfs2_dentry_lock *dentry_lock_list; | ||
332 | struct work_struct dentry_lock_work; | ||
333 | |||
328 | wait_queue_head_t osb_mount_event; | 334 | wait_queue_head_t osb_mount_event; |
329 | 335 | ||
330 | /* Truncate log info */ | 336 | /* Truncate log info */ |
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index f4efa89baee5..1ed0f7c86869 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -754,7 +754,9 @@ static int ocfs2_mark_dquot_dirty(struct dquot *dquot) | |||
754 | if (dquot->dq_flags & mask) | 754 | if (dquot->dq_flags & mask) |
755 | sync = 1; | 755 | sync = 1; |
756 | spin_unlock(&dq_data_lock); | 756 | spin_unlock(&dq_data_lock); |
757 | if (!sync) { | 757 | /* This is a slight hack but we can't afford getting global quota |
758 | * lock if we already have a transaction started. */ | ||
759 | if (!sync || journal_current_handle()) { | ||
758 | status = ocfs2_write_dquot(dquot); | 760 | status = ocfs2_write_dquot(dquot); |
759 | goto out; | 761 | goto out; |
760 | } | 762 | } |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 43ed11345b59..b1cb38fbe807 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -1887,6 +1887,9 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
1887 | INIT_WORK(&journal->j_recovery_work, ocfs2_complete_recovery); | 1887 | INIT_WORK(&journal->j_recovery_work, ocfs2_complete_recovery); |
1888 | journal->j_state = OCFS2_JOURNAL_FREE; | 1888 | journal->j_state = OCFS2_JOURNAL_FREE; |
1889 | 1889 | ||
1890 | INIT_WORK(&osb->dentry_lock_work, ocfs2_drop_dl_inodes); | ||
1891 | osb->dentry_lock_list = NULL; | ||
1892 | |||
1890 | /* get some pseudo constants for clustersize bits */ | 1893 | /* get some pseudo constants for clustersize bits */ |
1891 | osb->s_clustersize_bits = | 1894 | osb->s_clustersize_bits = |
1892 | le32_to_cpu(di->id2.i_super.s_clustersize_bits); | 1895 | le32_to_cpu(di->id2.i_super.s_clustersize_bits); |
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c index e1d638af6ac3..915039fffe6e 100644 --- a/fs/ocfs2/xattr.c +++ b/fs/ocfs2/xattr.c | |||
@@ -4729,13 +4729,6 @@ static int ocfs2_xattr_bucket_value_truncate(struct inode *inode, | |||
4729 | vb.vb_xv = (struct ocfs2_xattr_value_root *) | 4729 | vb.vb_xv = (struct ocfs2_xattr_value_root *) |
4730 | (vb.vb_bh->b_data + offset % blocksize); | 4730 | (vb.vb_bh->b_data + offset % blocksize); |
4731 | 4731 | ||
4732 | ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket, | ||
4733 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
4734 | if (ret) { | ||
4735 | mlog_errno(ret); | ||
4736 | goto out; | ||
4737 | } | ||
4738 | |||
4739 | /* | 4732 | /* |
4740 | * From here on out we have to dirty the bucket. The generic | 4733 | * From here on out we have to dirty the bucket. The generic |
4741 | * value calls only modify one of the bucket's bhs, but we need | 4734 | * value calls only modify one of the bucket's bhs, but we need |
@@ -4748,12 +4741,18 @@ static int ocfs2_xattr_bucket_value_truncate(struct inode *inode, | |||
4748 | ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt); | 4741 | ret = ocfs2_xattr_value_truncate(inode, &vb, len, ctxt); |
4749 | if (ret) { | 4742 | if (ret) { |
4750 | mlog_errno(ret); | 4743 | mlog_errno(ret); |
4751 | goto out_dirty; | 4744 | goto out; |
4745 | } | ||
4746 | |||
4747 | ret = ocfs2_xattr_bucket_journal_access(ctxt->handle, bucket, | ||
4748 | OCFS2_JOURNAL_ACCESS_WRITE); | ||
4749 | if (ret) { | ||
4750 | mlog_errno(ret); | ||
4751 | goto out; | ||
4752 | } | 4752 | } |
4753 | 4753 | ||
4754 | xe->xe_value_size = cpu_to_le64(len); | 4754 | xe->xe_value_size = cpu_to_le64(len); |
4755 | 4755 | ||
4756 | out_dirty: | ||
4757 | ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket); | 4756 | ocfs2_xattr_bucket_journal_dirty(ctxt->handle, bucket); |
4758 | 4757 | ||
4759 | out: | 4758 | out: |
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c index 175f9c590b77..f393620890ee 100644 --- a/fs/ubifs/budget.c +++ b/fs/ubifs/budget.c | |||
@@ -689,7 +689,7 @@ long long ubifs_reported_space(const struct ubifs_info *c, long long free) | |||
689 | } | 689 | } |
690 | 690 | ||
691 | /** | 691 | /** |
692 | * ubifs_get_free_space - return amount of free space. | 692 | * ubifs_get_free_space_nolock - return amount of free space. |
693 | * @c: UBIFS file-system description object | 693 | * @c: UBIFS file-system description object |
694 | * | 694 | * |
695 | * This function calculates amount of free space to report to user-space. | 695 | * This function calculates amount of free space to report to user-space. |
@@ -704,16 +704,14 @@ long long ubifs_reported_space(const struct ubifs_info *c, long long free) | |||
704 | * traditional file-systems, because they have way less overhead than UBIFS. | 704 | * traditional file-systems, because they have way less overhead than UBIFS. |
705 | * So, to keep users happy, UBIFS tries to take the overhead into account. | 705 | * So, to keep users happy, UBIFS tries to take the overhead into account. |
706 | */ | 706 | */ |
707 | long long ubifs_get_free_space(struct ubifs_info *c) | 707 | long long ubifs_get_free_space_nolock(struct ubifs_info *c) |
708 | { | 708 | { |
709 | int min_idx_lebs, rsvd_idx_lebs, lebs; | 709 | int rsvd_idx_lebs, lebs; |
710 | long long available, outstanding, free; | 710 | long long available, outstanding, free; |
711 | 711 | ||
712 | spin_lock(&c->space_lock); | 712 | ubifs_assert(c->min_idx_lebs == ubifs_calc_min_idx_lebs(c)); |
713 | min_idx_lebs = c->min_idx_lebs; | ||
714 | ubifs_assert(min_idx_lebs == ubifs_calc_min_idx_lebs(c)); | ||
715 | outstanding = c->budg_data_growth + c->budg_dd_growth; | 713 | outstanding = c->budg_data_growth + c->budg_dd_growth; |
716 | available = ubifs_calc_available(c, min_idx_lebs); | 714 | available = ubifs_calc_available(c, c->min_idx_lebs); |
717 | 715 | ||
718 | /* | 716 | /* |
719 | * When reporting free space to user-space, UBIFS guarantees that it is | 717 | * When reporting free space to user-space, UBIFS guarantees that it is |
@@ -726,15 +724,14 @@ long long ubifs_get_free_space(struct ubifs_info *c) | |||
726 | * Note, the calculations below are similar to what we have in | 724 | * Note, the calculations below are similar to what we have in |
727 | * 'do_budget_space()', so refer there for comments. | 725 | * 'do_budget_space()', so refer there for comments. |
728 | */ | 726 | */ |
729 | if (min_idx_lebs > c->lst.idx_lebs) | 727 | if (c->min_idx_lebs > c->lst.idx_lebs) |
730 | rsvd_idx_lebs = min_idx_lebs - c->lst.idx_lebs; | 728 | rsvd_idx_lebs = c->min_idx_lebs - c->lst.idx_lebs; |
731 | else | 729 | else |
732 | rsvd_idx_lebs = 0; | 730 | rsvd_idx_lebs = 0; |
733 | lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - | 731 | lebs = c->lst.empty_lebs + c->freeable_cnt + c->idx_gc_cnt - |
734 | c->lst.taken_empty_lebs; | 732 | c->lst.taken_empty_lebs; |
735 | lebs -= rsvd_idx_lebs; | 733 | lebs -= rsvd_idx_lebs; |
736 | available += lebs * (c->dark_wm - c->leb_overhead); | 734 | available += lebs * (c->dark_wm - c->leb_overhead); |
737 | spin_unlock(&c->space_lock); | ||
738 | 735 | ||
739 | if (available > outstanding) | 736 | if (available > outstanding) |
740 | free = ubifs_reported_space(c, available - outstanding); | 737 | free = ubifs_reported_space(c, available - outstanding); |
@@ -742,3 +739,21 @@ long long ubifs_get_free_space(struct ubifs_info *c) | |||
742 | free = 0; | 739 | free = 0; |
743 | return free; | 740 | return free; |
744 | } | 741 | } |
742 | |||
743 | /** | ||
744 | * ubifs_get_free_space - return amount of free space. | ||
745 | * @c: UBIFS file-system description object | ||
746 | * | ||
747 | * This function calculates and retuns amount of free space to report to | ||
748 | * user-space. | ||
749 | */ | ||
750 | long long ubifs_get_free_space(struct ubifs_info *c) | ||
751 | { | ||
752 | long long free; | ||
753 | |||
754 | spin_lock(&c->space_lock); | ||
755 | free = ubifs_get_free_space_nolock(c); | ||
756 | spin_unlock(&c->space_lock); | ||
757 | |||
758 | return free; | ||
759 | } | ||
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index 792c5a16c182..e975bd82f38b 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -620,9 +620,11 @@ void dbg_dump_budg(struct ubifs_info *c) | |||
620 | c->dark_wm, c->dead_wm, c->max_idx_node_sz); | 620 | c->dark_wm, c->dead_wm, c->max_idx_node_sz); |
621 | printk(KERN_DEBUG "\tgc_lnum %d, ihead_lnum %d\n", | 621 | printk(KERN_DEBUG "\tgc_lnum %d, ihead_lnum %d\n", |
622 | c->gc_lnum, c->ihead_lnum); | 622 | c->gc_lnum, c->ihead_lnum); |
623 | for (i = 0; i < c->jhead_cnt; i++) | 623 | /* If we are in R/O mode, journal heads do not exist */ |
624 | printk(KERN_DEBUG "\tjhead %d\t LEB %d\n", | 624 | if (c->jheads) |
625 | c->jheads[i].wbuf.jhead, c->jheads[i].wbuf.lnum); | 625 | for (i = 0; i < c->jhead_cnt; i++) |
626 | printk(KERN_DEBUG "\tjhead %d\t LEB %d\n", | ||
627 | c->jheads[i].wbuf.jhead, c->jheads[i].wbuf.lnum); | ||
626 | for (rb = rb_first(&c->buds); rb; rb = rb_next(rb)) { | 628 | for (rb = rb_first(&c->buds); rb; rb = rb_next(rb)) { |
627 | bud = rb_entry(rb, struct ubifs_bud, rb); | 629 | bud = rb_entry(rb, struct ubifs_bud, rb); |
628 | printk(KERN_DEBUG "\tbud LEB %d\n", bud->lnum); | 630 | printk(KERN_DEBUG "\tbud LEB %d\n", bud->lnum); |
@@ -637,10 +639,7 @@ void dbg_dump_budg(struct ubifs_info *c) | |||
637 | /* Print budgeting predictions */ | 639 | /* Print budgeting predictions */ |
638 | available = ubifs_calc_available(c, c->min_idx_lebs); | 640 | available = ubifs_calc_available(c, c->min_idx_lebs); |
639 | outstanding = c->budg_data_growth + c->budg_dd_growth; | 641 | outstanding = c->budg_data_growth + c->budg_dd_growth; |
640 | if (available > outstanding) | 642 | free = ubifs_get_free_space_nolock(c); |
641 | free = ubifs_reported_space(c, available - outstanding); | ||
642 | else | ||
643 | free = 0; | ||
644 | printk(KERN_DEBUG "Budgeting predictions:\n"); | 643 | printk(KERN_DEBUG "Budgeting predictions:\n"); |
645 | printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n", | 644 | printk(KERN_DEBUG "\tavailable: %lld, outstanding %lld, free %lld\n", |
646 | available, outstanding, free); | 645 | available, outstanding, free); |
@@ -861,6 +860,65 @@ void dbg_dump_index(struct ubifs_info *c) | |||
861 | } | 860 | } |
862 | 861 | ||
863 | /** | 862 | /** |
863 | * dbg_save_space_info - save information about flash space. | ||
864 | * @c: UBIFS file-system description object | ||
865 | * | ||
866 | * This function saves information about UBIFS free space, dirty space, etc, in | ||
867 | * order to check it later. | ||
868 | */ | ||
869 | void dbg_save_space_info(struct ubifs_info *c) | ||
870 | { | ||
871 | struct ubifs_debug_info *d = c->dbg; | ||
872 | |||
873 | ubifs_get_lp_stats(c, &d->saved_lst); | ||
874 | |||
875 | spin_lock(&c->space_lock); | ||
876 | d->saved_free = ubifs_get_free_space_nolock(c); | ||
877 | spin_unlock(&c->space_lock); | ||
878 | } | ||
879 | |||
880 | /** | ||
881 | * dbg_check_space_info - check flash space information. | ||
882 | * @c: UBIFS file-system description object | ||
883 | * | ||
884 | * This function compares current flash space information with the information | ||
885 | * which was saved when the 'dbg_save_space_info()' function was called. | ||
886 | * Returns zero if the information has not changed, and %-EINVAL it it has | ||
887 | * changed. | ||
888 | */ | ||
889 | int dbg_check_space_info(struct ubifs_info *c) | ||
890 | { | ||
891 | struct ubifs_debug_info *d = c->dbg; | ||
892 | struct ubifs_lp_stats lst; | ||
893 | long long avail, free; | ||
894 | |||
895 | spin_lock(&c->space_lock); | ||
896 | avail = ubifs_calc_available(c, c->min_idx_lebs); | ||
897 | spin_unlock(&c->space_lock); | ||
898 | free = ubifs_get_free_space(c); | ||
899 | |||
900 | if (free != d->saved_free) { | ||
901 | ubifs_err("free space changed from %lld to %lld", | ||
902 | d->saved_free, free); | ||
903 | goto out; | ||
904 | } | ||
905 | |||
906 | return 0; | ||
907 | |||
908 | out: | ||
909 | ubifs_msg("saved lprops statistics dump"); | ||
910 | dbg_dump_lstats(&d->saved_lst); | ||
911 | ubifs_get_lp_stats(c, &lst); | ||
912 | ubifs_msg("current lprops statistics dump"); | ||
913 | dbg_dump_lstats(&d->saved_lst); | ||
914 | spin_lock(&c->space_lock); | ||
915 | dbg_dump_budg(c); | ||
916 | spin_unlock(&c->space_lock); | ||
917 | dump_stack(); | ||
918 | return -EINVAL; | ||
919 | } | ||
920 | |||
921 | /** | ||
864 | * dbg_check_synced_i_size - check synchronized inode size. | 922 | * dbg_check_synced_i_size - check synchronized inode size. |
865 | * @inode: inode to check | 923 | * @inode: inode to check |
866 | * | 924 | * |
@@ -1349,7 +1407,7 @@ int dbg_check_tnc(struct ubifs_info *c, int extra) | |||
1349 | * @c: UBIFS file-system description object | 1407 | * @c: UBIFS file-system description object |
1350 | * @leaf_cb: called for each leaf node | 1408 | * @leaf_cb: called for each leaf node |
1351 | * @znode_cb: called for each indexing node | 1409 | * @znode_cb: called for each indexing node |
1352 | * @priv: private date which is passed to callbacks | 1410 | * @priv: private data which is passed to callbacks |
1353 | * | 1411 | * |
1354 | * This function walks the UBIFS index and calls the @leaf_cb for each leaf | 1412 | * This function walks the UBIFS index and calls the @leaf_cb for each leaf |
1355 | * node and @znode_cb for each indexing node. Returns zero in case of success | 1413 | * node and @znode_cb for each indexing node. Returns zero in case of success |
@@ -2409,7 +2467,7 @@ void ubifs_debugging_exit(struct ubifs_info *c) | |||
2409 | * Root directory for UBIFS stuff in debugfs. Contains sub-directories which | 2467 | * Root directory for UBIFS stuff in debugfs. Contains sub-directories which |
2410 | * contain the stuff specific to particular file-system mounts. | 2468 | * contain the stuff specific to particular file-system mounts. |
2411 | */ | 2469 | */ |
2412 | static struct dentry *debugfs_rootdir; | 2470 | static struct dentry *dfs_rootdir; |
2413 | 2471 | ||
2414 | /** | 2472 | /** |
2415 | * dbg_debugfs_init - initialize debugfs file-system. | 2473 | * dbg_debugfs_init - initialize debugfs file-system. |
@@ -2421,9 +2479,9 @@ static struct dentry *debugfs_rootdir; | |||
2421 | */ | 2479 | */ |
2422 | int dbg_debugfs_init(void) | 2480 | int dbg_debugfs_init(void) |
2423 | { | 2481 | { |
2424 | debugfs_rootdir = debugfs_create_dir("ubifs", NULL); | 2482 | dfs_rootdir = debugfs_create_dir("ubifs", NULL); |
2425 | if (IS_ERR(debugfs_rootdir)) { | 2483 | if (IS_ERR(dfs_rootdir)) { |
2426 | int err = PTR_ERR(debugfs_rootdir); | 2484 | int err = PTR_ERR(dfs_rootdir); |
2427 | ubifs_err("cannot create \"ubifs\" debugfs directory, " | 2485 | ubifs_err("cannot create \"ubifs\" debugfs directory, " |
2428 | "error %d\n", err); | 2486 | "error %d\n", err); |
2429 | return err; | 2487 | return err; |
@@ -2437,7 +2495,7 @@ int dbg_debugfs_init(void) | |||
2437 | */ | 2495 | */ |
2438 | void dbg_debugfs_exit(void) | 2496 | void dbg_debugfs_exit(void) |
2439 | { | 2497 | { |
2440 | debugfs_remove(debugfs_rootdir); | 2498 | debugfs_remove(dfs_rootdir); |
2441 | } | 2499 | } |
2442 | 2500 | ||
2443 | static int open_debugfs_file(struct inode *inode, struct file *file) | 2501 | static int open_debugfs_file(struct inode *inode, struct file *file) |
@@ -2452,13 +2510,13 @@ static ssize_t write_debugfs_file(struct file *file, const char __user *buf, | |||
2452 | struct ubifs_info *c = file->private_data; | 2510 | struct ubifs_info *c = file->private_data; |
2453 | struct ubifs_debug_info *d = c->dbg; | 2511 | struct ubifs_debug_info *d = c->dbg; |
2454 | 2512 | ||
2455 | if (file->f_path.dentry == d->dump_lprops) | 2513 | if (file->f_path.dentry == d->dfs_dump_lprops) |
2456 | dbg_dump_lprops(c); | 2514 | dbg_dump_lprops(c); |
2457 | else if (file->f_path.dentry == d->dump_budg) { | 2515 | else if (file->f_path.dentry == d->dfs_dump_budg) { |
2458 | spin_lock(&c->space_lock); | 2516 | spin_lock(&c->space_lock); |
2459 | dbg_dump_budg(c); | 2517 | dbg_dump_budg(c); |
2460 | spin_unlock(&c->space_lock); | 2518 | spin_unlock(&c->space_lock); |
2461 | } else if (file->f_path.dentry == d->dump_tnc) { | 2519 | } else if (file->f_path.dentry == d->dfs_dump_tnc) { |
2462 | mutex_lock(&c->tnc_mutex); | 2520 | mutex_lock(&c->tnc_mutex); |
2463 | dbg_dump_tnc(c); | 2521 | dbg_dump_tnc(c); |
2464 | mutex_unlock(&c->tnc_mutex); | 2522 | mutex_unlock(&c->tnc_mutex); |
@@ -2469,7 +2527,7 @@ static ssize_t write_debugfs_file(struct file *file, const char __user *buf, | |||
2469 | return count; | 2527 | return count; |
2470 | } | 2528 | } |
2471 | 2529 | ||
2472 | static const struct file_operations debugfs_fops = { | 2530 | static const struct file_operations dfs_fops = { |
2473 | .open = open_debugfs_file, | 2531 | .open = open_debugfs_file, |
2474 | .write = write_debugfs_file, | 2532 | .write = write_debugfs_file, |
2475 | .owner = THIS_MODULE, | 2533 | .owner = THIS_MODULE, |
@@ -2494,36 +2552,32 @@ int dbg_debugfs_init_fs(struct ubifs_info *c) | |||
2494 | struct dentry *dent; | 2552 | struct dentry *dent; |
2495 | struct ubifs_debug_info *d = c->dbg; | 2553 | struct ubifs_debug_info *d = c->dbg; |
2496 | 2554 | ||
2497 | sprintf(d->debugfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); | 2555 | sprintf(d->dfs_dir_name, "ubi%d_%d", c->vi.ubi_num, c->vi.vol_id); |
2498 | d->debugfs_dir = debugfs_create_dir(d->debugfs_dir_name, | 2556 | d->dfs_dir = debugfs_create_dir(d->dfs_dir_name, dfs_rootdir); |
2499 | debugfs_rootdir); | 2557 | if (IS_ERR(d->dfs_dir)) { |
2500 | if (IS_ERR(d->debugfs_dir)) { | 2558 | err = PTR_ERR(d->dfs_dir); |
2501 | err = PTR_ERR(d->debugfs_dir); | ||
2502 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | 2559 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", |
2503 | d->debugfs_dir_name, err); | 2560 | d->dfs_dir_name, err); |
2504 | goto out; | 2561 | goto out; |
2505 | } | 2562 | } |
2506 | 2563 | ||
2507 | fname = "dump_lprops"; | 2564 | fname = "dump_lprops"; |
2508 | dent = debugfs_create_file(fname, S_IWUGO, d->debugfs_dir, c, | 2565 | dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); |
2509 | &debugfs_fops); | ||
2510 | if (IS_ERR(dent)) | 2566 | if (IS_ERR(dent)) |
2511 | goto out_remove; | 2567 | goto out_remove; |
2512 | d->dump_lprops = dent; | 2568 | d->dfs_dump_lprops = dent; |
2513 | 2569 | ||
2514 | fname = "dump_budg"; | 2570 | fname = "dump_budg"; |
2515 | dent = debugfs_create_file(fname, S_IWUGO, d->debugfs_dir, c, | 2571 | dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); |
2516 | &debugfs_fops); | ||
2517 | if (IS_ERR(dent)) | 2572 | if (IS_ERR(dent)) |
2518 | goto out_remove; | 2573 | goto out_remove; |
2519 | d->dump_budg = dent; | 2574 | d->dfs_dump_budg = dent; |
2520 | 2575 | ||
2521 | fname = "dump_tnc"; | 2576 | fname = "dump_tnc"; |
2522 | dent = debugfs_create_file(fname, S_IWUGO, d->debugfs_dir, c, | 2577 | dent = debugfs_create_file(fname, S_IWUGO, d->dfs_dir, c, &dfs_fops); |
2523 | &debugfs_fops); | ||
2524 | if (IS_ERR(dent)) | 2578 | if (IS_ERR(dent)) |
2525 | goto out_remove; | 2579 | goto out_remove; |
2526 | d->dump_tnc = dent; | 2580 | d->dfs_dump_tnc = dent; |
2527 | 2581 | ||
2528 | return 0; | 2582 | return 0; |
2529 | 2583 | ||
@@ -2531,7 +2585,7 @@ out_remove: | |||
2531 | err = PTR_ERR(dent); | 2585 | err = PTR_ERR(dent); |
2532 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", | 2586 | ubifs_err("cannot create \"%s\" debugfs directory, error %d\n", |
2533 | fname, err); | 2587 | fname, err); |
2534 | debugfs_remove_recursive(d->debugfs_dir); | 2588 | debugfs_remove_recursive(d->dfs_dir); |
2535 | out: | 2589 | out: |
2536 | return err; | 2590 | return err; |
2537 | } | 2591 | } |
@@ -2542,7 +2596,7 @@ out: | |||
2542 | */ | 2596 | */ |
2543 | void dbg_debugfs_exit_fs(struct ubifs_info *c) | 2597 | void dbg_debugfs_exit_fs(struct ubifs_info *c) |
2544 | { | 2598 | { |
2545 | debugfs_remove_recursive(c->dbg->debugfs_dir); | 2599 | debugfs_remove_recursive(c->dbg->dfs_dir); |
2546 | } | 2600 | } |
2547 | 2601 | ||
2548 | #endif /* CONFIG_UBIFS_FS_DEBUG */ | 2602 | #endif /* CONFIG_UBIFS_FS_DEBUG */ |
diff --git a/fs/ubifs/debug.h b/fs/ubifs/debug.h index 9820d6999f7e..c1cd73b2e06e 100644 --- a/fs/ubifs/debug.h +++ b/fs/ubifs/debug.h | |||
@@ -41,15 +41,17 @@ | |||
41 | * @chk_lpt_wastage: used by LPT tree size checker | 41 | * @chk_lpt_wastage: used by LPT tree size checker |
42 | * @chk_lpt_lebs: used by LPT tree size checker | 42 | * @chk_lpt_lebs: used by LPT tree size checker |
43 | * @new_nhead_offs: used by LPT tree size checker | 43 | * @new_nhead_offs: used by LPT tree size checker |
44 | * @new_ihead_lnum: used by debugging to check ihead_lnum | 44 | * @new_ihead_lnum: used by debugging to check @c->ihead_lnum |
45 | * @new_ihead_offs: used by debugging to check ihead_offs | 45 | * @new_ihead_offs: used by debugging to check @c->ihead_offs |
46 | * | 46 | * |
47 | * debugfs_dir_name: name of debugfs directory containing this file-system's | 47 | * @saved_lst: saved lprops statistics (used by 'dbg_save_space_info()') |
48 | * files | 48 | * @saved_free: saved free space (used by 'dbg_save_space_info()') |
49 | * debugfs_dir: direntry object of the file-system debugfs directory | 49 | * |
50 | * dump_lprops: "dump lprops" debugfs knob | 50 | * dfs_dir_name: name of debugfs directory containing this file-system's files |
51 | * dump_budg: "dump budgeting information" debugfs knob | 51 | * dfs_dir: direntry object of the file-system debugfs directory |
52 | * dump_tnc: "dump TNC" debugfs knob | 52 | * dfs_dump_lprops: "dump lprops" debugfs knob |
53 | * dfs_dump_budg: "dump budgeting information" debugfs knob | ||
54 | * dfs_dump_tnc: "dump TNC" debugfs knob | ||
53 | */ | 55 | */ |
54 | struct ubifs_debug_info { | 56 | struct ubifs_debug_info { |
55 | void *buf; | 57 | void *buf; |
@@ -69,11 +71,14 @@ struct ubifs_debug_info { | |||
69 | int new_ihead_lnum; | 71 | int new_ihead_lnum; |
70 | int new_ihead_offs; | 72 | int new_ihead_offs; |
71 | 73 | ||
72 | char debugfs_dir_name[100]; | 74 | struct ubifs_lp_stats saved_lst; |
73 | struct dentry *debugfs_dir; | 75 | long long saved_free; |
74 | struct dentry *dump_lprops; | 76 | |
75 | struct dentry *dump_budg; | 77 | char dfs_dir_name[100]; |
76 | struct dentry *dump_tnc; | 78 | struct dentry *dfs_dir; |
79 | struct dentry *dfs_dump_lprops; | ||
80 | struct dentry *dfs_dump_budg; | ||
81 | struct dentry *dfs_dump_tnc; | ||
77 | }; | 82 | }; |
78 | 83 | ||
79 | #define ubifs_assert(expr) do { \ | 84 | #define ubifs_assert(expr) do { \ |
@@ -297,7 +302,8 @@ int dbg_walk_index(struct ubifs_info *c, dbg_leaf_callback leaf_cb, | |||
297 | dbg_znode_callback znode_cb, void *priv); | 302 | dbg_znode_callback znode_cb, void *priv); |
298 | 303 | ||
299 | /* Checking functions */ | 304 | /* Checking functions */ |
300 | 305 | void dbg_save_space_info(struct ubifs_info *c); | |
306 | int dbg_check_space_info(struct ubifs_info *c); | ||
301 | int dbg_check_lprops(struct ubifs_info *c); | 307 | int dbg_check_lprops(struct ubifs_info *c); |
302 | int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot); | 308 | int dbg_old_index_check_init(struct ubifs_info *c, struct ubifs_zbranch *zroot); |
303 | int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot); | 309 | int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot); |
@@ -439,6 +445,8 @@ void dbg_debugfs_exit_fs(struct ubifs_info *c); | |||
439 | 445 | ||
440 | #define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0 | 446 | #define dbg_walk_index(c, leaf_cb, znode_cb, priv) 0 |
441 | #define dbg_old_index_check_init(c, zroot) 0 | 447 | #define dbg_old_index_check_init(c, zroot) 0 |
448 | #define dbg_save_space_info(c) ({}) | ||
449 | #define dbg_check_space_info(c) 0 | ||
442 | #define dbg_check_old_index(c, zroot) 0 | 450 | #define dbg_check_old_index(c, zroot) 0 |
443 | #define dbg_check_cats(c) 0 | 451 | #define dbg_check_cats(c) 0 |
444 | #define dbg_check_ltab(c) 0 | 452 | #define dbg_check_ltab(c) 0 |
diff --git a/fs/ubifs/dir.c b/fs/ubifs/dir.c index f448ab1f9c38..f55d523c52bb 100644 --- a/fs/ubifs/dir.c +++ b/fs/ubifs/dir.c | |||
@@ -482,30 +482,29 @@ static int ubifs_dir_release(struct inode *dir, struct file *file) | |||
482 | } | 482 | } |
483 | 483 | ||
484 | /** | 484 | /** |
485 | * lock_2_inodes - lock two UBIFS inodes. | 485 | * lock_2_inodes - a wrapper for locking two UBIFS inodes. |
486 | * @inode1: first inode | 486 | * @inode1: first inode |
487 | * @inode2: second inode | 487 | * @inode2: second inode |
488 | * | ||
489 | * We do not implement any tricks to guarantee strict lock ordering, because | ||
490 | * VFS has already done it for us on the @i_mutex. So this is just a simple | ||
491 | * wrapper function. | ||
488 | */ | 492 | */ |
489 | static void lock_2_inodes(struct inode *inode1, struct inode *inode2) | 493 | static void lock_2_inodes(struct inode *inode1, struct inode *inode2) |
490 | { | 494 | { |
491 | if (inode1->i_ino < inode2->i_ino) { | 495 | mutex_lock_nested(&ubifs_inode(inode1)->ui_mutex, WB_MUTEX_1); |
492 | mutex_lock_nested(&ubifs_inode(inode1)->ui_mutex, WB_MUTEX_2); | 496 | mutex_lock_nested(&ubifs_inode(inode2)->ui_mutex, WB_MUTEX_2); |
493 | mutex_lock_nested(&ubifs_inode(inode2)->ui_mutex, WB_MUTEX_3); | ||
494 | } else { | ||
495 | mutex_lock_nested(&ubifs_inode(inode2)->ui_mutex, WB_MUTEX_2); | ||
496 | mutex_lock_nested(&ubifs_inode(inode1)->ui_mutex, WB_MUTEX_3); | ||
497 | } | ||
498 | } | 497 | } |
499 | 498 | ||
500 | /** | 499 | /** |
501 | * unlock_2_inodes - unlock two UBIFS inodes inodes. | 500 | * unlock_2_inodes - a wrapper for unlocking two UBIFS inodes. |
502 | * @inode1: first inode | 501 | * @inode1: first inode |
503 | * @inode2: second inode | 502 | * @inode2: second inode |
504 | */ | 503 | */ |
505 | static void unlock_2_inodes(struct inode *inode1, struct inode *inode2) | 504 | static void unlock_2_inodes(struct inode *inode1, struct inode *inode2) |
506 | { | 505 | { |
507 | mutex_unlock(&ubifs_inode(inode1)->ui_mutex); | ||
508 | mutex_unlock(&ubifs_inode(inode2)->ui_mutex); | 506 | mutex_unlock(&ubifs_inode(inode2)->ui_mutex); |
507 | mutex_unlock(&ubifs_inode(inode1)->ui_mutex); | ||
509 | } | 508 | } |
510 | 509 | ||
511 | static int ubifs_link(struct dentry *old_dentry, struct inode *dir, | 510 | static int ubifs_link(struct dentry *old_dentry, struct inode *dir, |
@@ -527,6 +526,8 @@ static int ubifs_link(struct dentry *old_dentry, struct inode *dir, | |||
527 | dbg_gen("dent '%.*s' to ino %lu (nlink %d) in dir ino %lu", | 526 | dbg_gen("dent '%.*s' to ino %lu (nlink %d) in dir ino %lu", |
528 | dentry->d_name.len, dentry->d_name.name, inode->i_ino, | 527 | dentry->d_name.len, dentry->d_name.name, inode->i_ino, |
529 | inode->i_nlink, dir->i_ino); | 528 | inode->i_nlink, dir->i_ino); |
529 | ubifs_assert(mutex_is_locked(&dir->i_mutex)); | ||
530 | ubifs_assert(mutex_is_locked(&inode->i_mutex)); | ||
530 | err = dbg_check_synced_i_size(inode); | 531 | err = dbg_check_synced_i_size(inode); |
531 | if (err) | 532 | if (err) |
532 | return err; | 533 | return err; |
@@ -580,6 +581,8 @@ static int ubifs_unlink(struct inode *dir, struct dentry *dentry) | |||
580 | dbg_gen("dent '%.*s' from ino %lu (nlink %d) in dir ino %lu", | 581 | dbg_gen("dent '%.*s' from ino %lu (nlink %d) in dir ino %lu", |
581 | dentry->d_name.len, dentry->d_name.name, inode->i_ino, | 582 | dentry->d_name.len, dentry->d_name.name, inode->i_ino, |
582 | inode->i_nlink, dir->i_ino); | 583 | inode->i_nlink, dir->i_ino); |
584 | ubifs_assert(mutex_is_locked(&dir->i_mutex)); | ||
585 | ubifs_assert(mutex_is_locked(&inode->i_mutex)); | ||
583 | err = dbg_check_synced_i_size(inode); | 586 | err = dbg_check_synced_i_size(inode); |
584 | if (err) | 587 | if (err) |
585 | return err; | 588 | return err; |
@@ -667,7 +670,8 @@ static int ubifs_rmdir(struct inode *dir, struct dentry *dentry) | |||
667 | 670 | ||
668 | dbg_gen("directory '%.*s', ino %lu in dir ino %lu", dentry->d_name.len, | 671 | dbg_gen("directory '%.*s', ino %lu in dir ino %lu", dentry->d_name.len, |
669 | dentry->d_name.name, inode->i_ino, dir->i_ino); | 672 | dentry->d_name.name, inode->i_ino, dir->i_ino); |
670 | 673 | ubifs_assert(mutex_is_locked(&dir->i_mutex)); | |
674 | ubifs_assert(mutex_is_locked(&inode->i_mutex)); | ||
671 | err = check_dir_empty(c, dentry->d_inode); | 675 | err = check_dir_empty(c, dentry->d_inode); |
672 | if (err) | 676 | if (err) |
673 | return err; | 677 | return err; |
@@ -922,59 +926,30 @@ out_budg: | |||
922 | } | 926 | } |
923 | 927 | ||
924 | /** | 928 | /** |
925 | * lock_3_inodes - lock three UBIFS inodes for rename. | 929 | * lock_3_inodes - a wrapper for locking three UBIFS inodes. |
926 | * @inode1: first inode | 930 | * @inode1: first inode |
927 | * @inode2: second inode | 931 | * @inode2: second inode |
928 | * @inode3: third inode | 932 | * @inode3: third inode |
929 | * | 933 | * |
930 | * For 'ubifs_rename()', @inode1 may be the same as @inode2 whereas @inode3 may | 934 | * This function is used for 'ubifs_rename()' and @inode1 may be the same as |
931 | * be null. | 935 | * @inode2 whereas @inode3 may be %NULL. |
936 | * | ||
937 | * We do not implement any tricks to guarantee strict lock ordering, because | ||
938 | * VFS has already done it for us on the @i_mutex. So this is just a simple | ||
939 | * wrapper function. | ||
932 | */ | 940 | */ |
933 | static void lock_3_inodes(struct inode *inode1, struct inode *inode2, | 941 | static void lock_3_inodes(struct inode *inode1, struct inode *inode2, |
934 | struct inode *inode3) | 942 | struct inode *inode3) |
935 | { | 943 | { |
936 | struct inode *i1, *i2, *i3; | 944 | mutex_lock_nested(&ubifs_inode(inode1)->ui_mutex, WB_MUTEX_1); |
937 | 945 | if (inode2 != inode1) | |
938 | if (!inode3) { | 946 | mutex_lock_nested(&ubifs_inode(inode2)->ui_mutex, WB_MUTEX_2); |
939 | if (inode1 != inode2) { | 947 | if (inode3) |
940 | lock_2_inodes(inode1, inode2); | 948 | mutex_lock_nested(&ubifs_inode(inode3)->ui_mutex, WB_MUTEX_3); |
941 | return; | ||
942 | } | ||
943 | mutex_lock_nested(&ubifs_inode(inode1)->ui_mutex, WB_MUTEX_1); | ||
944 | return; | ||
945 | } | ||
946 | |||
947 | if (inode1 == inode2) { | ||
948 | lock_2_inodes(inode1, inode3); | ||
949 | return; | ||
950 | } | ||
951 | |||
952 | /* 3 different inodes */ | ||
953 | if (inode1 < inode2) { | ||
954 | i3 = inode2; | ||
955 | if (inode1 < inode3) { | ||
956 | i1 = inode1; | ||
957 | i2 = inode3; | ||
958 | } else { | ||
959 | i1 = inode3; | ||
960 | i2 = inode1; | ||
961 | } | ||
962 | } else { | ||
963 | i3 = inode1; | ||
964 | if (inode2 < inode3) { | ||
965 | i1 = inode2; | ||
966 | i2 = inode3; | ||
967 | } else { | ||
968 | i1 = inode3; | ||
969 | i2 = inode2; | ||
970 | } | ||
971 | } | ||
972 | mutex_lock_nested(&ubifs_inode(i1)->ui_mutex, WB_MUTEX_1); | ||
973 | lock_2_inodes(i2, i3); | ||
974 | } | 949 | } |
975 | 950 | ||
976 | /** | 951 | /** |
977 | * unlock_3_inodes - unlock three UBIFS inodes for rename. | 952 | * unlock_3_inodes - a wrapper for unlocking three UBIFS inodes for rename. |
978 | * @inode1: first inode | 953 | * @inode1: first inode |
979 | * @inode2: second inode | 954 | * @inode2: second inode |
980 | * @inode3: third inode | 955 | * @inode3: third inode |
@@ -982,11 +957,11 @@ static void lock_3_inodes(struct inode *inode1, struct inode *inode2, | |||
982 | static void unlock_3_inodes(struct inode *inode1, struct inode *inode2, | 957 | static void unlock_3_inodes(struct inode *inode1, struct inode *inode2, |
983 | struct inode *inode3) | 958 | struct inode *inode3) |
984 | { | 959 | { |
985 | mutex_unlock(&ubifs_inode(inode1)->ui_mutex); | ||
986 | if (inode1 != inode2) | ||
987 | mutex_unlock(&ubifs_inode(inode2)->ui_mutex); | ||
988 | if (inode3) | 960 | if (inode3) |
989 | mutex_unlock(&ubifs_inode(inode3)->ui_mutex); | 961 | mutex_unlock(&ubifs_inode(inode3)->ui_mutex); |
962 | if (inode1 != inode2) | ||
963 | mutex_unlock(&ubifs_inode(inode2)->ui_mutex); | ||
964 | mutex_unlock(&ubifs_inode(inode1)->ui_mutex); | ||
990 | } | 965 | } |
991 | 966 | ||
992 | static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, | 967 | static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, |
@@ -1020,6 +995,11 @@ static int ubifs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
1020 | "dir ino %lu", old_dentry->d_name.len, old_dentry->d_name.name, | 995 | "dir ino %lu", old_dentry->d_name.len, old_dentry->d_name.name, |
1021 | old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, | 996 | old_inode->i_ino, old_dir->i_ino, new_dentry->d_name.len, |
1022 | new_dentry->d_name.name, new_dir->i_ino); | 997 | new_dentry->d_name.name, new_dir->i_ino); |
998 | ubifs_assert(mutex_is_locked(&old_dir->i_mutex)); | ||
999 | ubifs_assert(mutex_is_locked(&new_dir->i_mutex)); | ||
1000 | if (unlink) | ||
1001 | ubifs_assert(mutex_is_locked(&new_inode->i_mutex)); | ||
1002 | |||
1023 | 1003 | ||
1024 | if (unlink && is_dir) { | 1004 | if (unlink && is_dir) { |
1025 | err = check_dir_empty(c, new_inode); | 1005 | err = check_dir_empty(c, new_inode); |
@@ -1199,7 +1179,7 @@ int ubifs_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
1199 | return 0; | 1179 | return 0; |
1200 | } | 1180 | } |
1201 | 1181 | ||
1202 | struct inode_operations ubifs_dir_inode_operations = { | 1182 | const struct inode_operations ubifs_dir_inode_operations = { |
1203 | .lookup = ubifs_lookup, | 1183 | .lookup = ubifs_lookup, |
1204 | .create = ubifs_create, | 1184 | .create = ubifs_create, |
1205 | .link = ubifs_link, | 1185 | .link = ubifs_link, |
@@ -1219,7 +1199,7 @@ struct inode_operations ubifs_dir_inode_operations = { | |||
1219 | #endif | 1199 | #endif |
1220 | }; | 1200 | }; |
1221 | 1201 | ||
1222 | struct file_operations ubifs_dir_operations = { | 1202 | const struct file_operations ubifs_dir_operations = { |
1223 | .llseek = ubifs_dir_llseek, | 1203 | .llseek = ubifs_dir_llseek, |
1224 | .release = ubifs_dir_release, | 1204 | .release = ubifs_dir_release, |
1225 | .read = generic_read_dir, | 1205 | .read = generic_read_dir, |
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index bf37374567fa..93b6de51f261 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -432,7 +432,6 @@ static int ubifs_write_begin(struct file *file, struct address_space *mapping, | |||
432 | int uninitialized_var(err), appending = !!(pos + len > inode->i_size); | 432 | int uninitialized_var(err), appending = !!(pos + len > inode->i_size); |
433 | struct page *page; | 433 | struct page *page; |
434 | 434 | ||
435 | |||
436 | ubifs_assert(ubifs_inode(inode)->ui_size == inode->i_size); | 435 | ubifs_assert(ubifs_inode(inode)->ui_size == inode->i_size); |
437 | 436 | ||
438 | if (unlikely(c->ro_media)) | 437 | if (unlikely(c->ro_media)) |
@@ -1541,7 +1540,7 @@ static int ubifs_file_mmap(struct file *file, struct vm_area_struct *vma) | |||
1541 | return 0; | 1540 | return 0; |
1542 | } | 1541 | } |
1543 | 1542 | ||
1544 | struct address_space_operations ubifs_file_address_operations = { | 1543 | const struct address_space_operations ubifs_file_address_operations = { |
1545 | .readpage = ubifs_readpage, | 1544 | .readpage = ubifs_readpage, |
1546 | .writepage = ubifs_writepage, | 1545 | .writepage = ubifs_writepage, |
1547 | .write_begin = ubifs_write_begin, | 1546 | .write_begin = ubifs_write_begin, |
@@ -1551,7 +1550,7 @@ struct address_space_operations ubifs_file_address_operations = { | |||
1551 | .releasepage = ubifs_releasepage, | 1550 | .releasepage = ubifs_releasepage, |
1552 | }; | 1551 | }; |
1553 | 1552 | ||
1554 | struct inode_operations ubifs_file_inode_operations = { | 1553 | const struct inode_operations ubifs_file_inode_operations = { |
1555 | .setattr = ubifs_setattr, | 1554 | .setattr = ubifs_setattr, |
1556 | .getattr = ubifs_getattr, | 1555 | .getattr = ubifs_getattr, |
1557 | #ifdef CONFIG_UBIFS_FS_XATTR | 1556 | #ifdef CONFIG_UBIFS_FS_XATTR |
@@ -1562,14 +1561,14 @@ struct inode_operations ubifs_file_inode_operations = { | |||
1562 | #endif | 1561 | #endif |
1563 | }; | 1562 | }; |
1564 | 1563 | ||
1565 | struct inode_operations ubifs_symlink_inode_operations = { | 1564 | const struct inode_operations ubifs_symlink_inode_operations = { |
1566 | .readlink = generic_readlink, | 1565 | .readlink = generic_readlink, |
1567 | .follow_link = ubifs_follow_link, | 1566 | .follow_link = ubifs_follow_link, |
1568 | .setattr = ubifs_setattr, | 1567 | .setattr = ubifs_setattr, |
1569 | .getattr = ubifs_getattr, | 1568 | .getattr = ubifs_getattr, |
1570 | }; | 1569 | }; |
1571 | 1570 | ||
1572 | struct file_operations ubifs_file_operations = { | 1571 | const struct file_operations ubifs_file_operations = { |
1573 | .llseek = generic_file_llseek, | 1572 | .llseek = generic_file_llseek, |
1574 | .read = do_sync_read, | 1573 | .read = do_sync_read, |
1575 | .write = do_sync_write, | 1574 | .write = do_sync_write, |
diff --git a/fs/ubifs/gc.c b/fs/ubifs/gc.c index 9832f9abe28e..a711d33b3d3e 100644 --- a/fs/ubifs/gc.c +++ b/fs/ubifs/gc.c | |||
@@ -31,6 +31,26 @@ | |||
31 | * to be reused. Garbage collection will cause the number of dirty index nodes | 31 | * to be reused. Garbage collection will cause the number of dirty index nodes |
32 | * to grow, however sufficient space is reserved for the index to ensure the | 32 | * to grow, however sufficient space is reserved for the index to ensure the |
33 | * commit will never run out of space. | 33 | * commit will never run out of space. |
34 | * | ||
35 | * Notes about dead watermark. At current UBIFS implementation we assume that | ||
36 | * LEBs which have less than @c->dead_wm bytes of free + dirty space are full | ||
37 | * and not worth garbage-collecting. The dead watermark is one min. I/O unit | ||
38 | * size, or min. UBIFS node size, depending on what is greater. Indeed, UBIFS | ||
39 | * Garbage Collector has to synchronize the GC head's write buffer before | ||
40 | * returning, so this is about wasting one min. I/O unit. However, UBIFS GC can | ||
41 | * actually reclaim even very small pieces of dirty space by garbage collecting | ||
42 | * enough dirty LEBs, but we do not bother doing this at this implementation. | ||
43 | * | ||
44 | * Notes about dark watermark. The results of GC work depends on how big are | ||
45 | * the UBIFS nodes GC deals with. Large nodes make GC waste more space. Indeed, | ||
46 | * if GC move data from LEB A to LEB B and nodes in LEB A are large, GC would | ||
47 | * have to waste large pieces of free space at the end of LEB B, because nodes | ||
48 | * from LEB A would not fit. And the worst situation is when all nodes are of | ||
49 | * maximum size. So dark watermark is the amount of free + dirty space in LEB | ||
50 | * which are guaranteed to be reclaimable. If LEB has less space, the GC migh | ||
51 | * be unable to reclaim it. So, LEBs with free + dirty greater than dark | ||
52 | * watermark are "good" LEBs from GC's point of few. The other LEBs are not so | ||
53 | * good, and GC takes extra care when moving them. | ||
34 | */ | 54 | */ |
35 | 55 | ||
36 | #include <linux/pagemap.h> | 56 | #include <linux/pagemap.h> |
@@ -381,7 +401,7 @@ int ubifs_garbage_collect_leb(struct ubifs_info *c, struct ubifs_lprops *lp) | |||
381 | 401 | ||
382 | /* | 402 | /* |
383 | * Don't release the LEB until after the next commit, because | 403 | * Don't release the LEB until after the next commit, because |
384 | * it may contain date which is needed for recovery. So | 404 | * it may contain data which is needed for recovery. So |
385 | * although we freed this LEB, it will become usable only after | 405 | * although we freed this LEB, it will become usable only after |
386 | * the commit. | 406 | * the commit. |
387 | */ | 407 | */ |
@@ -810,8 +830,9 @@ out: | |||
810 | * ubifs_destroy_idx_gc - destroy idx_gc list. | 830 | * ubifs_destroy_idx_gc - destroy idx_gc list. |
811 | * @c: UBIFS file-system description object | 831 | * @c: UBIFS file-system description object |
812 | * | 832 | * |
813 | * This function destroys the idx_gc list. It is called when unmounting or | 833 | * This function destroys the @c->idx_gc list. It is called when unmounting |
814 | * remounting read-only so locks are not needed. | 834 | * so locks are not needed. Returns zero in case of success and a negative |
835 | * error code in case of failure. | ||
815 | */ | 836 | */ |
816 | void ubifs_destroy_idx_gc(struct ubifs_info *c) | 837 | void ubifs_destroy_idx_gc(struct ubifs_info *c) |
817 | { | 838 | { |
@@ -824,7 +845,6 @@ void ubifs_destroy_idx_gc(struct ubifs_info *c) | |||
824 | list_del(&idx_gc->list); | 845 | list_del(&idx_gc->list); |
825 | kfree(idx_gc); | 846 | kfree(idx_gc); |
826 | } | 847 | } |
827 | |||
828 | } | 848 | } |
829 | 849 | ||
830 | /** | 850 | /** |
diff --git a/fs/ubifs/io.c b/fs/ubifs/io.c index 01682713af69..e8e632a1dcdf 100644 --- a/fs/ubifs/io.c +++ b/fs/ubifs/io.c | |||
@@ -29,7 +29,7 @@ | |||
29 | * would have been wasted for padding to the nearest minimal I/O unit boundary. | 29 | * would have been wasted for padding to the nearest minimal I/O unit boundary. |
30 | * Instead, data first goes to the write-buffer and is flushed when the | 30 | * Instead, data first goes to the write-buffer and is flushed when the |
31 | * buffer is full or when it is not used for some time (by timer). This is | 31 | * buffer is full or when it is not used for some time (by timer). This is |
32 | * similarto the mechanism is used by JFFS2. | 32 | * similar to the mechanism is used by JFFS2. |
33 | * | 33 | * |
34 | * Write-buffers are defined by 'struct ubifs_wbuf' objects and protected by | 34 | * Write-buffers are defined by 'struct ubifs_wbuf' objects and protected by |
35 | * mutexes defined inside these objects. Since sometimes upper-level code | 35 | * mutexes defined inside these objects. Since sometimes upper-level code |
@@ -75,7 +75,7 @@ void ubifs_ro_mode(struct ubifs_info *c, int err) | |||
75 | * @lnum: logical eraseblock number | 75 | * @lnum: logical eraseblock number |
76 | * @offs: offset within the logical eraseblock | 76 | * @offs: offset within the logical eraseblock |
77 | * @quiet: print no messages | 77 | * @quiet: print no messages |
78 | * @chk_crc: indicates whether to always check the CRC | 78 | * @must_chk_crc: indicates whether to always check the CRC |
79 | * | 79 | * |
80 | * This function checks node magic number and CRC checksum. This function also | 80 | * This function checks node magic number and CRC checksum. This function also |
81 | * validates node length to prevent UBIFS from becoming crazy when an attacker | 81 | * validates node length to prevent UBIFS from becoming crazy when an attacker |
@@ -83,11 +83,17 @@ void ubifs_ro_mode(struct ubifs_info *c, int err) | |||
83 | * node length in the common header could cause UBIFS to read memory outside of | 83 | * node length in the common header could cause UBIFS to read memory outside of |
84 | * allocated buffer when checking the CRC checksum. | 84 | * allocated buffer when checking the CRC checksum. |
85 | * | 85 | * |
86 | * This function returns zero in case of success %-EUCLEAN in case of bad CRC | 86 | * This function may skip data nodes CRC checking if @c->no_chk_data_crc is |
87 | * or magic. | 87 | * true, which is controlled by corresponding UBIFS mount option. However, if |
88 | * @must_chk_crc is true, then @c->no_chk_data_crc is ignored and CRC is | ||
89 | * checked. Similarly, if @c->always_chk_crc is true, @c->no_chk_data_crc is | ||
90 | * ignored and CRC is checked. | ||
91 | * | ||
92 | * This function returns zero in case of success and %-EUCLEAN in case of bad | ||
93 | * CRC or magic. | ||
88 | */ | 94 | */ |
89 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, | 95 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, |
90 | int offs, int quiet, int chk_crc) | 96 | int offs, int quiet, int must_chk_crc) |
91 | { | 97 | { |
92 | int err = -EINVAL, type, node_len; | 98 | int err = -EINVAL, type, node_len; |
93 | uint32_t crc, node_crc, magic; | 99 | uint32_t crc, node_crc, magic; |
@@ -123,9 +129,9 @@ int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, | |||
123 | node_len > c->ranges[type].max_len) | 129 | node_len > c->ranges[type].max_len) |
124 | goto out_len; | 130 | goto out_len; |
125 | 131 | ||
126 | if (!chk_crc && type == UBIFS_DATA_NODE && !c->always_chk_crc) | 132 | if (!must_chk_crc && type == UBIFS_DATA_NODE && !c->always_chk_crc && |
127 | if (c->no_chk_data_crc) | 133 | c->no_chk_data_crc) |
128 | return 0; | 134 | return 0; |
129 | 135 | ||
130 | crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); | 136 | crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); |
131 | node_crc = le32_to_cpu(ch->crc); | 137 | node_crc = le32_to_cpu(ch->crc); |
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index 9b7c54e0cd2a..a11ca0958a23 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c | |||
@@ -208,7 +208,7 @@ again: | |||
208 | offs = 0; | 208 | offs = 0; |
209 | 209 | ||
210 | out: | 210 | out: |
211 | err = ubifs_wbuf_seek_nolock(wbuf, lnum, offs, UBI_SHORTTERM); | 211 | err = ubifs_wbuf_seek_nolock(wbuf, lnum, offs, wbuf->dtype); |
212 | if (err) | 212 | if (err) |
213 | goto out_unlock; | 213 | goto out_unlock; |
214 | 214 | ||
diff --git a/fs/ubifs/lprops.c b/fs/ubifs/lprops.c index dfd2bcece27a..4cdd284dea56 100644 --- a/fs/ubifs/lprops.c +++ b/fs/ubifs/lprops.c | |||
@@ -635,10 +635,10 @@ const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, | |||
635 | * @c: UBIFS file-system description object | 635 | * @c: UBIFS file-system description object |
636 | * @st: return statistics | 636 | * @st: return statistics |
637 | */ | 637 | */ |
638 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *st) | 638 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *lst) |
639 | { | 639 | { |
640 | spin_lock(&c->space_lock); | 640 | spin_lock(&c->space_lock); |
641 | memcpy(st, &c->lst, sizeof(struct ubifs_lp_stats)); | 641 | memcpy(lst, &c->lst, sizeof(struct ubifs_lp_stats)); |
642 | spin_unlock(&c->space_lock); | 642 | spin_unlock(&c->space_lock); |
643 | } | 643 | } |
644 | 644 | ||
@@ -678,6 +678,9 @@ int ubifs_change_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, | |||
678 | 678 | ||
679 | out: | 679 | out: |
680 | ubifs_release_lprops(c); | 680 | ubifs_release_lprops(c); |
681 | if (err) | ||
682 | ubifs_err("cannot change properties of LEB %d, error %d", | ||
683 | lnum, err); | ||
681 | return err; | 684 | return err; |
682 | } | 685 | } |
683 | 686 | ||
@@ -714,6 +717,9 @@ int ubifs_update_one_lp(struct ubifs_info *c, int lnum, int free, int dirty, | |||
714 | 717 | ||
715 | out: | 718 | out: |
716 | ubifs_release_lprops(c); | 719 | ubifs_release_lprops(c); |
720 | if (err) | ||
721 | ubifs_err("cannot update properties of LEB %d, error %d", | ||
722 | lnum, err); | ||
717 | return err; | 723 | return err; |
718 | } | 724 | } |
719 | 725 | ||
@@ -737,6 +743,8 @@ int ubifs_read_one_lp(struct ubifs_info *c, int lnum, struct ubifs_lprops *lp) | |||
737 | lpp = ubifs_lpt_lookup(c, lnum); | 743 | lpp = ubifs_lpt_lookup(c, lnum); |
738 | if (IS_ERR(lpp)) { | 744 | if (IS_ERR(lpp)) { |
739 | err = PTR_ERR(lpp); | 745 | err = PTR_ERR(lpp); |
746 | ubifs_err("cannot read properties of LEB %d, error %d", | ||
747 | lnum, err); | ||
740 | goto out; | 748 | goto out; |
741 | } | 749 | } |
742 | 750 | ||
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c index 96ca95707175..3216a1f277f8 100644 --- a/fs/ubifs/lpt_commit.c +++ b/fs/ubifs/lpt_commit.c | |||
@@ -556,23 +556,23 @@ no_space: | |||
556 | } | 556 | } |
557 | 557 | ||
558 | /** | 558 | /** |
559 | * next_pnode - find next pnode. | 559 | * next_pnode_to_dirty - find next pnode to dirty. |
560 | * @c: UBIFS file-system description object | 560 | * @c: UBIFS file-system description object |
561 | * @pnode: pnode | 561 | * @pnode: pnode |
562 | * | 562 | * |
563 | * This function returns the next pnode or %NULL if there are no more pnodes. | 563 | * This function returns the next pnode to dirty or %NULL if there are no more |
564 | * pnodes. Note that pnodes that have never been written (lnum == 0) are | ||
565 | * skipped. | ||
564 | */ | 566 | */ |
565 | static struct ubifs_pnode *next_pnode(struct ubifs_info *c, | 567 | static struct ubifs_pnode *next_pnode_to_dirty(struct ubifs_info *c, |
566 | struct ubifs_pnode *pnode) | 568 | struct ubifs_pnode *pnode) |
567 | { | 569 | { |
568 | struct ubifs_nnode *nnode; | 570 | struct ubifs_nnode *nnode; |
569 | int iip; | 571 | int iip; |
570 | 572 | ||
571 | /* Try to go right */ | 573 | /* Try to go right */ |
572 | nnode = pnode->parent; | 574 | nnode = pnode->parent; |
573 | iip = pnode->iip + 1; | 575 | for (iip = pnode->iip + 1; iip < UBIFS_LPT_FANOUT; iip++) { |
574 | if (iip < UBIFS_LPT_FANOUT) { | ||
575 | /* We assume here that LEB zero is never an LPT LEB */ | ||
576 | if (nnode->nbranch[iip].lnum) | 576 | if (nnode->nbranch[iip].lnum) |
577 | return ubifs_get_pnode(c, nnode, iip); | 577 | return ubifs_get_pnode(c, nnode, iip); |
578 | } | 578 | } |
@@ -583,8 +583,11 @@ static struct ubifs_pnode *next_pnode(struct ubifs_info *c, | |||
583 | nnode = nnode->parent; | 583 | nnode = nnode->parent; |
584 | if (!nnode) | 584 | if (!nnode) |
585 | return NULL; | 585 | return NULL; |
586 | /* We assume here that LEB zero is never an LPT LEB */ | 586 | for (; iip < UBIFS_LPT_FANOUT; iip++) { |
587 | } while (iip >= UBIFS_LPT_FANOUT || !nnode->nbranch[iip].lnum); | 587 | if (nnode->nbranch[iip].lnum) |
588 | break; | ||
589 | } | ||
590 | } while (iip >= UBIFS_LPT_FANOUT); | ||
588 | 591 | ||
589 | /* Go right */ | 592 | /* Go right */ |
590 | nnode = ubifs_get_nnode(c, nnode, iip); | 593 | nnode = ubifs_get_nnode(c, nnode, iip); |
@@ -593,12 +596,29 @@ static struct ubifs_pnode *next_pnode(struct ubifs_info *c, | |||
593 | 596 | ||
594 | /* Go down to level 1 */ | 597 | /* Go down to level 1 */ |
595 | while (nnode->level > 1) { | 598 | while (nnode->level > 1) { |
596 | nnode = ubifs_get_nnode(c, nnode, 0); | 599 | for (iip = 0; iip < UBIFS_LPT_FANOUT; iip++) { |
600 | if (nnode->nbranch[iip].lnum) | ||
601 | break; | ||
602 | } | ||
603 | if (iip >= UBIFS_LPT_FANOUT) { | ||
604 | /* | ||
605 | * Should not happen, but we need to keep going | ||
606 | * if it does. | ||
607 | */ | ||
608 | iip = 0; | ||
609 | } | ||
610 | nnode = ubifs_get_nnode(c, nnode, iip); | ||
597 | if (IS_ERR(nnode)) | 611 | if (IS_ERR(nnode)) |
598 | return (void *)nnode; | 612 | return (void *)nnode; |
599 | } | 613 | } |
600 | 614 | ||
601 | return ubifs_get_pnode(c, nnode, 0); | 615 | for (iip = 0; iip < UBIFS_LPT_FANOUT; iip++) |
616 | if (nnode->nbranch[iip].lnum) | ||
617 | break; | ||
618 | if (iip >= UBIFS_LPT_FANOUT) | ||
619 | /* Should not happen, but we need to keep going if it does */ | ||
620 | iip = 0; | ||
621 | return ubifs_get_pnode(c, nnode, iip); | ||
602 | } | 622 | } |
603 | 623 | ||
604 | /** | 624 | /** |
@@ -688,7 +708,7 @@ static int make_tree_dirty(struct ubifs_info *c) | |||
688 | pnode = pnode_lookup(c, 0); | 708 | pnode = pnode_lookup(c, 0); |
689 | while (pnode) { | 709 | while (pnode) { |
690 | do_make_pnode_dirty(c, pnode); | 710 | do_make_pnode_dirty(c, pnode); |
691 | pnode = next_pnode(c, pnode); | 711 | pnode = next_pnode_to_dirty(c, pnode); |
692 | if (IS_ERR(pnode)) | 712 | if (IS_ERR(pnode)) |
693 | return PTR_ERR(pnode); | 713 | return PTR_ERR(pnode); |
694 | } | 714 | } |
diff --git a/fs/ubifs/master.c b/fs/ubifs/master.c index 71d5493bf565..a88f33801b98 100644 --- a/fs/ubifs/master.c +++ b/fs/ubifs/master.c | |||
@@ -354,7 +354,7 @@ int ubifs_write_master(struct ubifs_info *c) | |||
354 | int err, lnum, offs, len; | 354 | int err, lnum, offs, len; |
355 | 355 | ||
356 | if (c->ro_media) | 356 | if (c->ro_media) |
357 | return -EINVAL; | 357 | return -EROFS; |
358 | 358 | ||
359 | lnum = UBIFS_MST_LNUM; | 359 | lnum = UBIFS_MST_LNUM; |
360 | offs = c->mst_offs + c->mst_node_alsz; | 360 | offs = c->mst_offs + c->mst_node_alsz; |
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c index 9e6f403f170e..152a7b34a141 100644 --- a/fs/ubifs/orphan.c +++ b/fs/ubifs/orphan.c | |||
@@ -46,7 +46,7 @@ | |||
46 | * Orphans are accumulated in a rb-tree. When an inode's link count drops to | 46 | * Orphans are accumulated in a rb-tree. When an inode's link count drops to |
47 | * zero, the inode number is added to the rb-tree. It is removed from the tree | 47 | * zero, the inode number is added to the rb-tree. It is removed from the tree |
48 | * when the inode is deleted. Any new orphans that are in the orphan tree when | 48 | * when the inode is deleted. Any new orphans that are in the orphan tree when |
49 | * the commit is run, are written to the orphan area in 1 or more orph nodes. | 49 | * the commit is run, are written to the orphan area in 1 or more orphan nodes. |
50 | * If the orphan area is full, it is consolidated to make space. There is | 50 | * If the orphan area is full, it is consolidated to make space. There is |
51 | * always enough space because validation prevents the user from creating more | 51 | * always enough space because validation prevents the user from creating more |
52 | * than the maximum number of orphans allowed. | 52 | * than the maximum number of orphans allowed. |
@@ -231,7 +231,7 @@ static int tot_avail_orphs(struct ubifs_info *c) | |||
231 | } | 231 | } |
232 | 232 | ||
233 | /** | 233 | /** |
234 | * do_write_orph_node - write a node | 234 | * do_write_orph_node - write a node to the orphan head. |
235 | * @c: UBIFS file-system description object | 235 | * @c: UBIFS file-system description object |
236 | * @len: length of node | 236 | * @len: length of node |
237 | * @atomic: write atomically | 237 | * @atomic: write atomically |
@@ -264,11 +264,11 @@ static int do_write_orph_node(struct ubifs_info *c, int len, int atomic) | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /** | 266 | /** |
267 | * write_orph_node - write an orph node | 267 | * write_orph_node - write an orphan node. |
268 | * @c: UBIFS file-system description object | 268 | * @c: UBIFS file-system description object |
269 | * @atomic: write atomically | 269 | * @atomic: write atomically |
270 | * | 270 | * |
271 | * This function builds an orph node from the cnext list and writes it to the | 271 | * This function builds an orphan node from the cnext list and writes it to the |
272 | * orphan head. On success, %0 is returned, otherwise a negative error code | 272 | * orphan head. On success, %0 is returned, otherwise a negative error code |
273 | * is returned. | 273 | * is returned. |
274 | */ | 274 | */ |
@@ -326,11 +326,11 @@ static int write_orph_node(struct ubifs_info *c, int atomic) | |||
326 | } | 326 | } |
327 | 327 | ||
328 | /** | 328 | /** |
329 | * write_orph_nodes - write orph nodes until there are no more to commit | 329 | * write_orph_nodes - write orphan nodes until there are no more to commit. |
330 | * @c: UBIFS file-system description object | 330 | * @c: UBIFS file-system description object |
331 | * @atomic: write atomically | 331 | * @atomic: write atomically |
332 | * | 332 | * |
333 | * This function writes orph nodes for all the orphans to commit. On success, | 333 | * This function writes orphan nodes for all the orphans to commit. On success, |
334 | * %0 is returned, otherwise a negative error code is returned. | 334 | * %0 is returned, otherwise a negative error code is returned. |
335 | */ | 335 | */ |
336 | static int write_orph_nodes(struct ubifs_info *c, int atomic) | 336 | static int write_orph_nodes(struct ubifs_info *c, int atomic) |
@@ -478,14 +478,14 @@ int ubifs_orphan_end_commit(struct ubifs_info *c) | |||
478 | } | 478 | } |
479 | 479 | ||
480 | /** | 480 | /** |
481 | * clear_orphans - erase all LEBs used for orphans. | 481 | * ubifs_clear_orphans - erase all LEBs used for orphans. |
482 | * @c: UBIFS file-system description object | 482 | * @c: UBIFS file-system description object |
483 | * | 483 | * |
484 | * If recovery is not required, then the orphans from the previous session | 484 | * If recovery is not required, then the orphans from the previous session |
485 | * are not needed. This function locates the LEBs used to record | 485 | * are not needed. This function locates the LEBs used to record |
486 | * orphans, and un-maps them. | 486 | * orphans, and un-maps them. |
487 | */ | 487 | */ |
488 | static int clear_orphans(struct ubifs_info *c) | 488 | int ubifs_clear_orphans(struct ubifs_info *c) |
489 | { | 489 | { |
490 | int lnum, err; | 490 | int lnum, err; |
491 | 491 | ||
@@ -547,9 +547,9 @@ static int insert_dead_orphan(struct ubifs_info *c, ino_t inum) | |||
547 | * do_kill_orphans - remove orphan inodes from the index. | 547 | * do_kill_orphans - remove orphan inodes from the index. |
548 | * @c: UBIFS file-system description object | 548 | * @c: UBIFS file-system description object |
549 | * @sleb: scanned LEB | 549 | * @sleb: scanned LEB |
550 | * @last_cmt_no: cmt_no of last orph node read is passed and returned here | 550 | * @last_cmt_no: cmt_no of last orphan node read is passed and returned here |
551 | * @outofdate: whether the LEB is out of date is returned here | 551 | * @outofdate: whether the LEB is out of date is returned here |
552 | * @last_flagged: whether the end orph node is encountered | 552 | * @last_flagged: whether the end orphan node is encountered |
553 | * | 553 | * |
554 | * This function is a helper to the 'kill_orphans()' function. It goes through | 554 | * This function is a helper to the 'kill_orphans()' function. It goes through |
555 | * every orphan node in a LEB and for every inode number recorded, removes | 555 | * every orphan node in a LEB and for every inode number recorded, removes |
@@ -580,8 +580,8 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
580 | /* | 580 | /* |
581 | * The commit number on the master node may be less, because | 581 | * The commit number on the master node may be less, because |
582 | * of a failed commit. If there are several failed commits in a | 582 | * of a failed commit. If there are several failed commits in a |
583 | * row, the commit number written on orph nodes will continue to | 583 | * row, the commit number written on orphan nodes will continue |
584 | * increase (because the commit number is adjusted here) even | 584 | * to increase (because the commit number is adjusted here) even |
585 | * though the commit number on the master node stays the same | 585 | * though the commit number on the master node stays the same |
586 | * because the master node has not been re-written. | 586 | * because the master node has not been re-written. |
587 | */ | 587 | */ |
@@ -589,9 +589,9 @@ static int do_kill_orphans(struct ubifs_info *c, struct ubifs_scan_leb *sleb, | |||
589 | c->cmt_no = cmt_no; | 589 | c->cmt_no = cmt_no; |
590 | if (cmt_no < *last_cmt_no && *last_flagged) { | 590 | if (cmt_no < *last_cmt_no && *last_flagged) { |
591 | /* | 591 | /* |
592 | * The last orph node had a higher commit number and was | 592 | * The last orphan node had a higher commit number and |
593 | * flagged as the last written for that commit number. | 593 | * was flagged as the last written for that commit |
594 | * That makes this orph node, out of date. | 594 | * number. That makes this orphan node, out of date. |
595 | */ | 595 | */ |
596 | if (!first) { | 596 | if (!first) { |
597 | ubifs_err("out of order commit number %llu in " | 597 | ubifs_err("out of order commit number %llu in " |
@@ -658,10 +658,10 @@ static int kill_orphans(struct ubifs_info *c) | |||
658 | /* | 658 | /* |
659 | * Orph nodes always start at c->orph_first and are written to each | 659 | * Orph nodes always start at c->orph_first and are written to each |
660 | * successive LEB in turn. Generally unused LEBs will have been unmapped | 660 | * successive LEB in turn. Generally unused LEBs will have been unmapped |
661 | * but may contain out of date orph nodes if the unmap didn't go | 661 | * but may contain out of date orphan nodes if the unmap didn't go |
662 | * through. In addition, the last orph node written for each commit is | 662 | * through. In addition, the last orphan node written for each commit is |
663 | * marked (top bit of orph->cmt_no is set to 1). It is possible that | 663 | * marked (top bit of orph->cmt_no is set to 1). It is possible that |
664 | * there are orph nodes from the next commit (i.e. the commit did not | 664 | * there are orphan nodes from the next commit (i.e. the commit did not |
665 | * complete successfully). In that case, no orphans will have been lost | 665 | * complete successfully). In that case, no orphans will have been lost |
666 | * due to the way that orphans are written, and any orphans added will | 666 | * due to the way that orphans are written, and any orphans added will |
667 | * be valid orphans anyway and so can be deleted. | 667 | * be valid orphans anyway and so can be deleted. |
@@ -718,7 +718,7 @@ int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only) | |||
718 | if (unclean) | 718 | if (unclean) |
719 | err = kill_orphans(c); | 719 | err = kill_orphans(c); |
720 | else if (!read_only) | 720 | else if (!read_only) |
721 | err = clear_orphans(c); | 721 | err = ubifs_clear_orphans(c); |
722 | 722 | ||
723 | return err; | 723 | return err; |
724 | } | 724 | } |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 89556ee72518..1182b66a5491 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -397,6 +397,7 @@ static int ubifs_statfs(struct dentry *dentry, struct kstatfs *buf) | |||
397 | buf->f_namelen = UBIFS_MAX_NLEN; | 397 | buf->f_namelen = UBIFS_MAX_NLEN; |
398 | buf->f_fsid.val[0] = le32_to_cpu(uuid[0]) ^ le32_to_cpu(uuid[2]); | 398 | buf->f_fsid.val[0] = le32_to_cpu(uuid[0]) ^ le32_to_cpu(uuid[2]); |
399 | buf->f_fsid.val[1] = le32_to_cpu(uuid[1]) ^ le32_to_cpu(uuid[3]); | 399 | buf->f_fsid.val[1] = le32_to_cpu(uuid[1]) ^ le32_to_cpu(uuid[3]); |
400 | ubifs_assert(buf->f_bfree <= c->block_cnt); | ||
400 | return 0; | 401 | return 0; |
401 | } | 402 | } |
402 | 403 | ||
@@ -432,33 +433,24 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) | |||
432 | int i, err; | 433 | int i, err; |
433 | struct ubifs_info *c = sb->s_fs_info; | 434 | struct ubifs_info *c = sb->s_fs_info; |
434 | struct writeback_control wbc = { | 435 | struct writeback_control wbc = { |
435 | .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_NONE, | 436 | .sync_mode = WB_SYNC_ALL, |
436 | .range_start = 0, | 437 | .range_start = 0, |
437 | .range_end = LLONG_MAX, | 438 | .range_end = LLONG_MAX, |
438 | .nr_to_write = LONG_MAX, | 439 | .nr_to_write = LONG_MAX, |
439 | }; | 440 | }; |
440 | 441 | ||
441 | /* | 442 | /* |
442 | * Note by akpm about WB_SYNC_NONE used above: zero @wait is just an | 443 | * Zero @wait is just an advisory thing to help the file system shove |
443 | * advisory thing to help the file system shove lots of data into the | 444 | * lots of data into the queues, and there will be the second |
444 | * queues. If some gets missed then it'll be picked up on the second | ||
445 | * '->sync_fs()' call, with non-zero @wait. | 445 | * '->sync_fs()' call, with non-zero @wait. |
446 | */ | 446 | */ |
447 | if (!wait) | ||
448 | return 0; | ||
447 | 449 | ||
448 | if (sb->s_flags & MS_RDONLY) | 450 | if (sb->s_flags & MS_RDONLY) |
449 | return 0; | 451 | return 0; |
450 | 452 | ||
451 | /* | 453 | /* |
452 | * Synchronize write buffers, because 'ubifs_run_commit()' does not | ||
453 | * do this if it waits for an already running commit. | ||
454 | */ | ||
455 | for (i = 0; i < c->jhead_cnt; i++) { | ||
456 | err = ubifs_wbuf_sync(&c->jheads[i].wbuf); | ||
457 | if (err) | ||
458 | return err; | ||
459 | } | ||
460 | |||
461 | /* | ||
462 | * VFS calls '->sync_fs()' before synchronizing all dirty inodes and | 454 | * VFS calls '->sync_fs()' before synchronizing all dirty inodes and |
463 | * pages, so synchronize them first, then commit the journal. Strictly | 455 | * pages, so synchronize them first, then commit the journal. Strictly |
464 | * speaking, it is not necessary to commit the journal here, | 456 | * speaking, it is not necessary to commit the journal here, |
@@ -469,6 +461,16 @@ static int ubifs_sync_fs(struct super_block *sb, int wait) | |||
469 | */ | 461 | */ |
470 | generic_sync_sb_inodes(sb, &wbc); | 462 | generic_sync_sb_inodes(sb, &wbc); |
471 | 463 | ||
464 | /* | ||
465 | * Synchronize write buffers, because 'ubifs_run_commit()' does not | ||
466 | * do this if it waits for an already running commit. | ||
467 | */ | ||
468 | for (i = 0; i < c->jhead_cnt; i++) { | ||
469 | err = ubifs_wbuf_sync(&c->jheads[i].wbuf); | ||
470 | if (err) | ||
471 | return err; | ||
472 | } | ||
473 | |||
472 | err = ubifs_run_commit(c); | 474 | err = ubifs_run_commit(c); |
473 | if (err) | 475 | if (err) |
474 | return err; | 476 | return err; |
@@ -572,15 +574,8 @@ static int init_constants_early(struct ubifs_info *c) | |||
572 | c->ranges[UBIFS_IDX_NODE].max_len = INT_MAX; | 574 | c->ranges[UBIFS_IDX_NODE].max_len = INT_MAX; |
573 | 575 | ||
574 | /* | 576 | /* |
575 | * Initialize dead and dark LEB space watermarks. | 577 | * Initialize dead and dark LEB space watermarks. See gc.c for comments |
576 | * | 578 | * about these values. |
577 | * Dead space is the space which cannot be used. Its watermark is | ||
578 | * equivalent to min. I/O unit or minimum node size if it is greater | ||
579 | * then min. I/O unit. | ||
580 | * | ||
581 | * Dark space is the space which might be used, or might not, depending | ||
582 | * on which node should be written to the LEB. Its watermark is | ||
583 | * equivalent to maximum UBIFS node size. | ||
584 | */ | 579 | */ |
585 | c->dead_wm = ALIGN(MIN_WRITE_SZ, c->min_io_size); | 580 | c->dead_wm = ALIGN(MIN_WRITE_SZ, c->min_io_size); |
586 | c->dark_wm = ALIGN(UBIFS_MAX_NODE_SZ, c->min_io_size); | 581 | c->dark_wm = ALIGN(UBIFS_MAX_NODE_SZ, c->min_io_size); |
@@ -741,12 +736,12 @@ static void init_constants_master(struct ubifs_info *c) | |||
741 | * take_gc_lnum - reserve GC LEB. | 736 | * take_gc_lnum - reserve GC LEB. |
742 | * @c: UBIFS file-system description object | 737 | * @c: UBIFS file-system description object |
743 | * | 738 | * |
744 | * This function ensures that the LEB reserved for garbage collection is | 739 | * This function ensures that the LEB reserved for garbage collection is marked |
745 | * unmapped and is marked as "taken" in lprops. We also have to set free space | 740 | * as "taken" in lprops. We also have to set free space to LEB size and dirty |
746 | * to LEB size and dirty space to zero, because lprops may contain out-of-date | 741 | * space to zero, because lprops may contain out-of-date information if the |
747 | * information if the file-system was un-mounted before it has been committed. | 742 | * file-system was un-mounted before it has been committed. This function |
748 | * This function returns zero in case of success and a negative error code in | 743 | * returns zero in case of success and a negative error code in case of |
749 | * case of failure. | 744 | * failure. |
750 | */ | 745 | */ |
751 | static int take_gc_lnum(struct ubifs_info *c) | 746 | static int take_gc_lnum(struct ubifs_info *c) |
752 | { | 747 | { |
@@ -757,10 +752,6 @@ static int take_gc_lnum(struct ubifs_info *c) | |||
757 | return -EINVAL; | 752 | return -EINVAL; |
758 | } | 753 | } |
759 | 754 | ||
760 | err = ubifs_leb_unmap(c, c->gc_lnum); | ||
761 | if (err) | ||
762 | return err; | ||
763 | |||
764 | /* And we have to tell lprops that this LEB is taken */ | 755 | /* And we have to tell lprops that this LEB is taken */ |
765 | err = ubifs_change_one_lp(c, c->gc_lnum, c->leb_size, 0, | 756 | err = ubifs_change_one_lp(c, c->gc_lnum, c->leb_size, 0, |
766 | LPROPS_TAKEN, 0, 0); | 757 | LPROPS_TAKEN, 0, 0); |
@@ -966,13 +957,16 @@ static int ubifs_parse_options(struct ubifs_info *c, char *options, | |||
966 | 957 | ||
967 | token = match_token(p, tokens, args); | 958 | token = match_token(p, tokens, args); |
968 | switch (token) { | 959 | switch (token) { |
960 | /* | ||
961 | * %Opt_fast_unmount and %Opt_norm_unmount options are ignored. | ||
962 | * We accepte them in order to be backware-compatible. But this | ||
963 | * should be removed at some point. | ||
964 | */ | ||
969 | case Opt_fast_unmount: | 965 | case Opt_fast_unmount: |
970 | c->mount_opts.unmount_mode = 2; | 966 | c->mount_opts.unmount_mode = 2; |
971 | c->fast_unmount = 1; | ||
972 | break; | 967 | break; |
973 | case Opt_norm_unmount: | 968 | case Opt_norm_unmount: |
974 | c->mount_opts.unmount_mode = 1; | 969 | c->mount_opts.unmount_mode = 1; |
975 | c->fast_unmount = 0; | ||
976 | break; | 970 | break; |
977 | case Opt_bulk_read: | 971 | case Opt_bulk_read: |
978 | c->mount_opts.bulk_read = 2; | 972 | c->mount_opts.bulk_read = 2; |
@@ -1094,12 +1088,7 @@ static int check_free_space(struct ubifs_info *c) | |||
1094 | ubifs_err("insufficient free space to mount in read/write mode"); | 1088 | ubifs_err("insufficient free space to mount in read/write mode"); |
1095 | dbg_dump_budg(c); | 1089 | dbg_dump_budg(c); |
1096 | dbg_dump_lprops(c); | 1090 | dbg_dump_lprops(c); |
1097 | /* | 1091 | return -ENOSPC; |
1098 | * We return %-EINVAL instead of %-ENOSPC because it seems to | ||
1099 | * be the closest error code mentioned in the mount function | ||
1100 | * documentation. | ||
1101 | */ | ||
1102 | return -EINVAL; | ||
1103 | } | 1092 | } |
1104 | return 0; | 1093 | return 0; |
1105 | } | 1094 | } |
@@ -1286,10 +1275,19 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1286 | if (err) | 1275 | if (err) |
1287 | goto out_orphans; | 1276 | goto out_orphans; |
1288 | err = ubifs_rcvry_gc_commit(c); | 1277 | err = ubifs_rcvry_gc_commit(c); |
1289 | } else | 1278 | } else { |
1290 | err = take_gc_lnum(c); | 1279 | err = take_gc_lnum(c); |
1291 | if (err) | 1280 | if (err) |
1292 | goto out_orphans; | 1281 | goto out_orphans; |
1282 | |||
1283 | /* | ||
1284 | * GC LEB may contain garbage if there was an unclean | ||
1285 | * reboot, and it should be un-mapped. | ||
1286 | */ | ||
1287 | err = ubifs_leb_unmap(c, c->gc_lnum); | ||
1288 | if (err) | ||
1289 | return err; | ||
1290 | } | ||
1293 | 1291 | ||
1294 | err = dbg_check_lprops(c); | 1292 | err = dbg_check_lprops(c); |
1295 | if (err) | 1293 | if (err) |
@@ -1298,6 +1296,16 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1298 | err = ubifs_recover_size(c); | 1296 | err = ubifs_recover_size(c); |
1299 | if (err) | 1297 | if (err) |
1300 | goto out_orphans; | 1298 | goto out_orphans; |
1299 | } else { | ||
1300 | /* | ||
1301 | * Even if we mount read-only, we have to set space in GC LEB | ||
1302 | * to proper value because this affects UBIFS free space | ||
1303 | * reporting. We do not want to have a situation when | ||
1304 | * re-mounting from R/O to R/W changes amount of free space. | ||
1305 | */ | ||
1306 | err = take_gc_lnum(c); | ||
1307 | if (err) | ||
1308 | goto out_orphans; | ||
1301 | } | 1309 | } |
1302 | 1310 | ||
1303 | spin_lock(&ubifs_infos_lock); | 1311 | spin_lock(&ubifs_infos_lock); |
@@ -1310,14 +1318,17 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1310 | else { | 1318 | else { |
1311 | c->need_recovery = 0; | 1319 | c->need_recovery = 0; |
1312 | ubifs_msg("recovery completed"); | 1320 | ubifs_msg("recovery completed"); |
1321 | /* GC LEB has to be empty and taken at this point */ | ||
1322 | ubifs_assert(c->lst.taken_empty_lebs == 1); | ||
1313 | } | 1323 | } |
1314 | } | 1324 | } else |
1325 | ubifs_assert(c->lst.taken_empty_lebs == 1); | ||
1315 | 1326 | ||
1316 | err = dbg_debugfs_init_fs(c); | 1327 | err = dbg_check_filesystem(c); |
1317 | if (err) | 1328 | if (err) |
1318 | goto out_infos; | 1329 | goto out_infos; |
1319 | 1330 | ||
1320 | err = dbg_check_filesystem(c); | 1331 | err = dbg_debugfs_init_fs(c); |
1321 | if (err) | 1332 | if (err) |
1322 | goto out_infos; | 1333 | goto out_infos; |
1323 | 1334 | ||
@@ -1351,7 +1362,6 @@ static int mount_ubifs(struct ubifs_info *c) | |||
1351 | c->uuid[4], c->uuid[5], c->uuid[6], c->uuid[7], | 1362 | c->uuid[4], c->uuid[5], c->uuid[6], c->uuid[7], |
1352 | c->uuid[8], c->uuid[9], c->uuid[10], c->uuid[11], | 1363 | c->uuid[8], c->uuid[9], c->uuid[10], c->uuid[11], |
1353 | c->uuid[12], c->uuid[13], c->uuid[14], c->uuid[15]); | 1364 | c->uuid[12], c->uuid[13], c->uuid[14], c->uuid[15]); |
1354 | dbg_msg("fast unmount: %d", c->fast_unmount); | ||
1355 | dbg_msg("big_lpt %d", c->big_lpt); | 1365 | dbg_msg("big_lpt %d", c->big_lpt); |
1356 | dbg_msg("log LEBs: %d (%d - %d)", | 1366 | dbg_msg("log LEBs: %d (%d - %d)", |
1357 | c->log_lebs, UBIFS_LOG_LNUM, c->log_last); | 1367 | c->log_lebs, UBIFS_LOG_LNUM, c->log_last); |
@@ -1475,10 +1485,8 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1475 | { | 1485 | { |
1476 | int err, lnum; | 1486 | int err, lnum; |
1477 | 1487 | ||
1478 | if (c->ro_media) | ||
1479 | return -EINVAL; | ||
1480 | |||
1481 | mutex_lock(&c->umount_mutex); | 1488 | mutex_lock(&c->umount_mutex); |
1489 | dbg_save_space_info(c); | ||
1482 | c->remounting_rw = 1; | 1490 | c->remounting_rw = 1; |
1483 | c->always_chk_crc = 1; | 1491 | c->always_chk_crc = 1; |
1484 | 1492 | ||
@@ -1514,6 +1522,12 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1514 | err = ubifs_recover_inl_heads(c, c->sbuf); | 1522 | err = ubifs_recover_inl_heads(c, c->sbuf); |
1515 | if (err) | 1523 | if (err) |
1516 | goto out; | 1524 | goto out; |
1525 | } else { | ||
1526 | /* A readonly mount is not allowed to have orphans */ | ||
1527 | ubifs_assert(c->tot_orphans == 0); | ||
1528 | err = ubifs_clear_orphans(c); | ||
1529 | if (err) | ||
1530 | goto out; | ||
1517 | } | 1531 | } |
1518 | 1532 | ||
1519 | if (!(c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY))) { | 1533 | if (!(c->mst_node->flags & cpu_to_le32(UBIFS_MST_DIRTY))) { |
@@ -1569,7 +1583,7 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1569 | if (c->need_recovery) | 1583 | if (c->need_recovery) |
1570 | err = ubifs_rcvry_gc_commit(c); | 1584 | err = ubifs_rcvry_gc_commit(c); |
1571 | else | 1585 | else |
1572 | err = take_gc_lnum(c); | 1586 | err = ubifs_leb_unmap(c, c->gc_lnum); |
1573 | if (err) | 1587 | if (err) |
1574 | goto out; | 1588 | goto out; |
1575 | 1589 | ||
@@ -1582,8 +1596,9 @@ static int ubifs_remount_rw(struct ubifs_info *c) | |||
1582 | c->vfs_sb->s_flags &= ~MS_RDONLY; | 1596 | c->vfs_sb->s_flags &= ~MS_RDONLY; |
1583 | c->remounting_rw = 0; | 1597 | c->remounting_rw = 0; |
1584 | c->always_chk_crc = 0; | 1598 | c->always_chk_crc = 0; |
1599 | err = dbg_check_space_info(c); | ||
1585 | mutex_unlock(&c->umount_mutex); | 1600 | mutex_unlock(&c->umount_mutex); |
1586 | return 0; | 1601 | return err; |
1587 | 1602 | ||
1588 | out: | 1603 | out: |
1589 | vfree(c->orph_buf); | 1604 | vfree(c->orph_buf); |
@@ -1603,43 +1618,18 @@ out: | |||
1603 | } | 1618 | } |
1604 | 1619 | ||
1605 | /** | 1620 | /** |
1606 | * commit_on_unmount - commit the journal when un-mounting. | ||
1607 | * @c: UBIFS file-system description object | ||
1608 | * | ||
1609 | * This function is called during un-mounting and re-mounting, and it commits | ||
1610 | * the journal unless the "fast unmount" mode is enabled. | ||
1611 | */ | ||
1612 | static void commit_on_unmount(struct ubifs_info *c) | ||
1613 | { | ||
1614 | struct super_block *sb = c->vfs_sb; | ||
1615 | long long bud_bytes; | ||
1616 | |||
1617 | /* | ||
1618 | * This function is called before the background thread is stopped, so | ||
1619 | * we may race with ongoing commit, which means we have to take | ||
1620 | * @c->bud_lock to access @c->bud_bytes. | ||
1621 | */ | ||
1622 | spin_lock(&c->buds_lock); | ||
1623 | bud_bytes = c->bud_bytes; | ||
1624 | spin_unlock(&c->buds_lock); | ||
1625 | |||
1626 | if (!c->fast_unmount && !(sb->s_flags & MS_RDONLY) && bud_bytes) | ||
1627 | ubifs_run_commit(c); | ||
1628 | } | ||
1629 | |||
1630 | /** | ||
1631 | * ubifs_remount_ro - re-mount in read-only mode. | 1621 | * ubifs_remount_ro - re-mount in read-only mode. |
1632 | * @c: UBIFS file-system description object | 1622 | * @c: UBIFS file-system description object |
1633 | * | 1623 | * |
1634 | * We rely on VFS to have stopped writing. Possibly the background thread could | 1624 | * We assume VFS has stopped writing. Possibly the background thread could be |
1635 | * be running a commit, however kthread_stop will wait in that case. | 1625 | * running a commit, however kthread_stop will wait in that case. |
1636 | */ | 1626 | */ |
1637 | static void ubifs_remount_ro(struct ubifs_info *c) | 1627 | static void ubifs_remount_ro(struct ubifs_info *c) |
1638 | { | 1628 | { |
1639 | int i, err; | 1629 | int i, err; |
1640 | 1630 | ||
1641 | ubifs_assert(!c->need_recovery); | 1631 | ubifs_assert(!c->need_recovery); |
1642 | commit_on_unmount(c); | 1632 | ubifs_assert(!(c->vfs_sb->s_flags & MS_RDONLY)); |
1643 | 1633 | ||
1644 | mutex_lock(&c->umount_mutex); | 1634 | mutex_lock(&c->umount_mutex); |
1645 | if (c->bgt) { | 1635 | if (c->bgt) { |
@@ -1647,27 +1637,29 @@ static void ubifs_remount_ro(struct ubifs_info *c) | |||
1647 | c->bgt = NULL; | 1637 | c->bgt = NULL; |
1648 | } | 1638 | } |
1649 | 1639 | ||
1640 | dbg_save_space_info(c); | ||
1641 | |||
1650 | for (i = 0; i < c->jhead_cnt; i++) { | 1642 | for (i = 0; i < c->jhead_cnt; i++) { |
1651 | ubifs_wbuf_sync(&c->jheads[i].wbuf); | 1643 | ubifs_wbuf_sync(&c->jheads[i].wbuf); |
1652 | del_timer_sync(&c->jheads[i].wbuf.timer); | 1644 | del_timer_sync(&c->jheads[i].wbuf.timer); |
1653 | } | 1645 | } |
1654 | 1646 | ||
1655 | if (!c->ro_media) { | 1647 | c->mst_node->flags &= ~cpu_to_le32(UBIFS_MST_DIRTY); |
1656 | c->mst_node->flags &= ~cpu_to_le32(UBIFS_MST_DIRTY); | 1648 | c->mst_node->flags |= cpu_to_le32(UBIFS_MST_NO_ORPHS); |
1657 | c->mst_node->flags |= cpu_to_le32(UBIFS_MST_NO_ORPHS); | 1649 | c->mst_node->gc_lnum = cpu_to_le32(c->gc_lnum); |
1658 | c->mst_node->gc_lnum = cpu_to_le32(c->gc_lnum); | 1650 | err = ubifs_write_master(c); |
1659 | err = ubifs_write_master(c); | 1651 | if (err) |
1660 | if (err) | 1652 | ubifs_ro_mode(c, err); |
1661 | ubifs_ro_mode(c, err); | ||
1662 | } | ||
1663 | 1653 | ||
1664 | ubifs_destroy_idx_gc(c); | ||
1665 | free_wbufs(c); | 1654 | free_wbufs(c); |
1666 | vfree(c->orph_buf); | 1655 | vfree(c->orph_buf); |
1667 | c->orph_buf = NULL; | 1656 | c->orph_buf = NULL; |
1668 | vfree(c->ileb_buf); | 1657 | vfree(c->ileb_buf); |
1669 | c->ileb_buf = NULL; | 1658 | c->ileb_buf = NULL; |
1670 | ubifs_lpt_free(c, 1); | 1659 | ubifs_lpt_free(c, 1); |
1660 | err = dbg_check_space_info(c); | ||
1661 | if (err) | ||
1662 | ubifs_ro_mode(c, err); | ||
1671 | mutex_unlock(&c->umount_mutex); | 1663 | mutex_unlock(&c->umount_mutex); |
1672 | } | 1664 | } |
1673 | 1665 | ||
@@ -1760,11 +1752,20 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data) | |||
1760 | } | 1752 | } |
1761 | 1753 | ||
1762 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { | 1754 | if ((sb->s_flags & MS_RDONLY) && !(*flags & MS_RDONLY)) { |
1755 | if (c->ro_media) { | ||
1756 | ubifs_msg("cannot re-mount due to prior errors"); | ||
1757 | return -EROFS; | ||
1758 | } | ||
1763 | err = ubifs_remount_rw(c); | 1759 | err = ubifs_remount_rw(c); |
1764 | if (err) | 1760 | if (err) |
1765 | return err; | 1761 | return err; |
1766 | } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) | 1762 | } else if (!(sb->s_flags & MS_RDONLY) && (*flags & MS_RDONLY)) { |
1763 | if (c->ro_media) { | ||
1764 | ubifs_msg("cannot re-mount due to prior errors"); | ||
1765 | return -EROFS; | ||
1766 | } | ||
1767 | ubifs_remount_ro(c); | 1767 | ubifs_remount_ro(c); |
1768 | } | ||
1768 | 1769 | ||
1769 | if (c->bulk_read == 1) | 1770 | if (c->bulk_read == 1) |
1770 | bu_init(c); | 1771 | bu_init(c); |
@@ -1774,10 +1775,11 @@ static int ubifs_remount_fs(struct super_block *sb, int *flags, char *data) | |||
1774 | c->bu.buf = NULL; | 1775 | c->bu.buf = NULL; |
1775 | } | 1776 | } |
1776 | 1777 | ||
1778 | ubifs_assert(c->lst.taken_empty_lebs == 1); | ||
1777 | return 0; | 1779 | return 0; |
1778 | } | 1780 | } |
1779 | 1781 | ||
1780 | struct super_operations ubifs_super_operations = { | 1782 | const struct super_operations ubifs_super_operations = { |
1781 | .alloc_inode = ubifs_alloc_inode, | 1783 | .alloc_inode = ubifs_alloc_inode, |
1782 | .destroy_inode = ubifs_destroy_inode, | 1784 | .destroy_inode = ubifs_destroy_inode, |
1783 | .put_super = ubifs_put_super, | 1785 | .put_super = ubifs_put_super, |
@@ -2044,15 +2046,6 @@ out_close: | |||
2044 | 2046 | ||
2045 | static void ubifs_kill_sb(struct super_block *sb) | 2047 | static void ubifs_kill_sb(struct super_block *sb) |
2046 | { | 2048 | { |
2047 | struct ubifs_info *c = sb->s_fs_info; | ||
2048 | |||
2049 | /* | ||
2050 | * We do 'commit_on_unmount()' here instead of 'ubifs_put_super()' | ||
2051 | * in order to be outside BKL. | ||
2052 | */ | ||
2053 | if (sb->s_root) | ||
2054 | commit_on_unmount(c); | ||
2055 | /* The un-mount routine is actually done in put_super() */ | ||
2056 | generic_shutdown_super(sb); | 2049 | generic_shutdown_super(sb); |
2057 | } | 2050 | } |
2058 | 2051 | ||
diff --git a/fs/ubifs/tnc.c b/fs/ubifs/tnc.c index f7e36f545527..fa28a84c6a1b 100644 --- a/fs/ubifs/tnc.c +++ b/fs/ubifs/tnc.c | |||
@@ -443,6 +443,11 @@ static int tnc_read_node_nm(struct ubifs_info *c, struct ubifs_zbranch *zbr, | |||
443 | * This function performs that same function as ubifs_read_node except that | 443 | * This function performs that same function as ubifs_read_node except that |
444 | * it does not require that there is actually a node present and instead | 444 | * it does not require that there is actually a node present and instead |
445 | * the return code indicates if a node was read. | 445 | * the return code indicates if a node was read. |
446 | * | ||
447 | * Note, this function does not check CRC of data nodes if @c->no_chk_data_crc | ||
448 | * is true (it is controlled by corresponding mount option). However, if | ||
449 | * @c->always_chk_crc is true, @c->no_chk_data_crc is ignored and CRC is always | ||
450 | * checked. | ||
446 | */ | 451 | */ |
447 | static int try_read_node(const struct ubifs_info *c, void *buf, int type, | 452 | static int try_read_node(const struct ubifs_info *c, void *buf, int type, |
448 | int len, int lnum, int offs) | 453 | int len, int lnum, int offs) |
@@ -470,9 +475,8 @@ static int try_read_node(const struct ubifs_info *c, void *buf, int type, | |||
470 | if (node_len != len) | 475 | if (node_len != len) |
471 | return 0; | 476 | return 0; |
472 | 477 | ||
473 | if (type == UBIFS_DATA_NODE && !c->always_chk_crc) | 478 | if (type == UBIFS_DATA_NODE && !c->always_chk_crc && c->no_chk_data_crc) |
474 | if (c->no_chk_data_crc) | 479 | return 1; |
475 | return 0; | ||
476 | 480 | ||
477 | crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); | 481 | crc = crc32(UBIFS_CRC32_INIT, buf + 8, node_len - 8); |
478 | node_crc = le32_to_cpu(ch->crc); | 482 | node_crc = le32_to_cpu(ch->crc); |
@@ -1506,7 +1510,7 @@ out: | |||
1506 | * | 1510 | * |
1507 | * Note, if the bulk-read buffer length (@bu->buf_len) is known, this function | 1511 | * Note, if the bulk-read buffer length (@bu->buf_len) is known, this function |
1508 | * makes sure bulk-read nodes fit the buffer. Otherwise, this function prepares | 1512 | * makes sure bulk-read nodes fit the buffer. Otherwise, this function prepares |
1509 | * maxumum possible amount of nodes for bulk-read. | 1513 | * maximum possible amount of nodes for bulk-read. |
1510 | */ | 1514 | */ |
1511 | int ubifs_tnc_get_bu_keys(struct ubifs_info *c, struct bu_info *bu) | 1515 | int ubifs_tnc_get_bu_keys(struct ubifs_info *c, struct bu_info *bu) |
1512 | { | 1516 | { |
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index fc2a4cc66d03..039a68bee29a 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -426,9 +426,9 @@ struct ubifs_unclean_leb { | |||
426 | * LEB properties flags. | 426 | * LEB properties flags. |
427 | * | 427 | * |
428 | * LPROPS_UNCAT: not categorized | 428 | * LPROPS_UNCAT: not categorized |
429 | * LPROPS_DIRTY: dirty > 0, not index | 429 | * LPROPS_DIRTY: dirty > free, dirty >= @c->dead_wm, not index |
430 | * LPROPS_DIRTY_IDX: dirty + free > @c->min_idx_node_sze and index | 430 | * LPROPS_DIRTY_IDX: dirty + free > @c->min_idx_node_sze and index |
431 | * LPROPS_FREE: free > 0, not empty, not index | 431 | * LPROPS_FREE: free > 0, dirty < @c->dead_wm, not empty, not index |
432 | * LPROPS_HEAP_CNT: number of heaps used for storing categorized LEBs | 432 | * LPROPS_HEAP_CNT: number of heaps used for storing categorized LEBs |
433 | * LPROPS_EMPTY: LEB is empty, not taken | 433 | * LPROPS_EMPTY: LEB is empty, not taken |
434 | * LPROPS_FREEABLE: free + dirty == leb_size, not index, not taken | 434 | * LPROPS_FREEABLE: free + dirty == leb_size, not index, not taken |
@@ -961,7 +961,6 @@ struct ubifs_debug_info; | |||
961 | * @cs_lock: commit state lock | 961 | * @cs_lock: commit state lock |
962 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running | 962 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running |
963 | * | 963 | * |
964 | * @fast_unmount: do not run journal commit before un-mounting | ||
965 | * @big_lpt: flag that LPT is too big to write whole during commit | 964 | * @big_lpt: flag that LPT is too big to write whole during commit |
966 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during | 965 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during |
967 | * recovery) | 966 | * recovery) |
@@ -1202,7 +1201,6 @@ struct ubifs_info { | |||
1202 | spinlock_t cs_lock; | 1201 | spinlock_t cs_lock; |
1203 | wait_queue_head_t cmt_wq; | 1202 | wait_queue_head_t cmt_wq; |
1204 | 1203 | ||
1205 | unsigned int fast_unmount:1; | ||
1206 | unsigned int big_lpt:1; | 1204 | unsigned int big_lpt:1; |
1207 | unsigned int no_chk_data_crc:1; | 1205 | unsigned int no_chk_data_crc:1; |
1208 | unsigned int bulk_read:1; | 1206 | unsigned int bulk_read:1; |
@@ -1405,13 +1403,13 @@ extern struct list_head ubifs_infos; | |||
1405 | extern spinlock_t ubifs_infos_lock; | 1403 | extern spinlock_t ubifs_infos_lock; |
1406 | extern atomic_long_t ubifs_clean_zn_cnt; | 1404 | extern atomic_long_t ubifs_clean_zn_cnt; |
1407 | extern struct kmem_cache *ubifs_inode_slab; | 1405 | extern struct kmem_cache *ubifs_inode_slab; |
1408 | extern struct super_operations ubifs_super_operations; | 1406 | extern const struct super_operations ubifs_super_operations; |
1409 | extern struct address_space_operations ubifs_file_address_operations; | 1407 | extern const struct address_space_operations ubifs_file_address_operations; |
1410 | extern struct file_operations ubifs_file_operations; | 1408 | extern const struct file_operations ubifs_file_operations; |
1411 | extern struct inode_operations ubifs_file_inode_operations; | 1409 | extern const struct inode_operations ubifs_file_inode_operations; |
1412 | extern struct file_operations ubifs_dir_operations; | 1410 | extern const struct file_operations ubifs_dir_operations; |
1413 | extern struct inode_operations ubifs_dir_inode_operations; | 1411 | extern const struct inode_operations ubifs_dir_inode_operations; |
1414 | extern struct inode_operations ubifs_symlink_inode_operations; | 1412 | extern const struct inode_operations ubifs_symlink_inode_operations; |
1415 | extern struct backing_dev_info ubifs_backing_dev_info; | 1413 | extern struct backing_dev_info ubifs_backing_dev_info; |
1416 | extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; | 1414 | extern struct ubifs_compressor *ubifs_compressors[UBIFS_COMPR_TYPES_CNT]; |
1417 | 1415 | ||
@@ -1428,7 +1426,7 @@ int ubifs_read_node_wbuf(struct ubifs_wbuf *wbuf, void *buf, int type, int len, | |||
1428 | int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum, | 1426 | int ubifs_write_node(struct ubifs_info *c, void *node, int len, int lnum, |
1429 | int offs, int dtype); | 1427 | int offs, int dtype); |
1430 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, | 1428 | int ubifs_check_node(const struct ubifs_info *c, const void *buf, int lnum, |
1431 | int offs, int quiet, int chk_crc); | 1429 | int offs, int quiet, int must_chk_crc); |
1432 | void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad); | 1430 | void ubifs_prepare_node(struct ubifs_info *c, void *buf, int len, int pad); |
1433 | void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last); | 1431 | void ubifs_prep_grp_node(struct ubifs_info *c, void *node, int len, int last); |
1434 | int ubifs_io_init(struct ubifs_info *c); | 1432 | int ubifs_io_init(struct ubifs_info *c); |
@@ -1495,6 +1493,7 @@ void ubifs_release_ino_dirty(struct ubifs_info *c, struct inode *inode, | |||
1495 | void ubifs_cancel_ino_op(struct ubifs_info *c, struct inode *inode, | 1493 | void ubifs_cancel_ino_op(struct ubifs_info *c, struct inode *inode, |
1496 | struct ubifs_budget_req *req); | 1494 | struct ubifs_budget_req *req); |
1497 | long long ubifs_get_free_space(struct ubifs_info *c); | 1495 | long long ubifs_get_free_space(struct ubifs_info *c); |
1496 | long long ubifs_get_free_space_nolock(struct ubifs_info *c); | ||
1498 | int ubifs_calc_min_idx_lebs(struct ubifs_info *c); | 1497 | int ubifs_calc_min_idx_lebs(struct ubifs_info *c); |
1499 | void ubifs_convert_page_budget(struct ubifs_info *c); | 1498 | void ubifs_convert_page_budget(struct ubifs_info *c); |
1500 | long long ubifs_reported_space(const struct ubifs_info *c, long long free); | 1499 | long long ubifs_reported_space(const struct ubifs_info *c, long long free); |
@@ -1603,6 +1602,7 @@ void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum); | |||
1603 | int ubifs_orphan_start_commit(struct ubifs_info *c); | 1602 | int ubifs_orphan_start_commit(struct ubifs_info *c); |
1604 | int ubifs_orphan_end_commit(struct ubifs_info *c); | 1603 | int ubifs_orphan_end_commit(struct ubifs_info *c); |
1605 | int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only); | 1604 | int ubifs_mount_orphans(struct ubifs_info *c, int unclean, int read_only); |
1605 | int ubifs_clear_orphans(struct ubifs_info *c); | ||
1606 | 1606 | ||
1607 | /* lpt.c */ | 1607 | /* lpt.c */ |
1608 | int ubifs_calc_lpt_geom(struct ubifs_info *c); | 1608 | int ubifs_calc_lpt_geom(struct ubifs_info *c); |
@@ -1646,7 +1646,7 @@ const struct ubifs_lprops *ubifs_change_lp(struct ubifs_info *c, | |||
1646 | const struct ubifs_lprops *lp, | 1646 | const struct ubifs_lprops *lp, |
1647 | int free, int dirty, int flags, | 1647 | int free, int dirty, int flags, |
1648 | int idx_gc_cnt); | 1648 | int idx_gc_cnt); |
1649 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *stats); | 1649 | void ubifs_get_lp_stats(struct ubifs_info *c, struct ubifs_lp_stats *lst); |
1650 | void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops, | 1650 | void ubifs_add_to_cat(struct ubifs_info *c, struct ubifs_lprops *lprops, |
1651 | int cat); | 1651 | int cat); |
1652 | void ubifs_replace_cat(struct ubifs_info *c, struct ubifs_lprops *old_lprops, | 1652 | void ubifs_replace_cat(struct ubifs_info *c, struct ubifs_lprops *old_lprops, |
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c index 2ed035354c26..a608e72fa405 100644 --- a/fs/xfs/linux-2.6/xfs_sync.c +++ b/fs/xfs/linux-2.6/xfs_sync.c | |||
@@ -371,7 +371,11 @@ xfs_quiesce_attr( | |||
371 | /* flush inodes and push all remaining buffers out to disk */ | 371 | /* flush inodes and push all remaining buffers out to disk */ |
372 | xfs_quiesce_fs(mp); | 372 | xfs_quiesce_fs(mp); |
373 | 373 | ||
374 | ASSERT_ALWAYS(atomic_read(&mp->m_active_trans) == 0); | 374 | /* |
375 | * Just warn here till VFS can correctly support | ||
376 | * read-only remount without racing. | ||
377 | */ | ||
378 | WARN_ON(atomic_read(&mp->m_active_trans) != 0); | ||
375 | 379 | ||
376 | /* Push the superblock and write an unmount record */ | 380 | /* Push the superblock and write an unmount record */ |
377 | error = xfs_log_sbcount(mp, 1); | 381 | error = xfs_log_sbcount(mp, 1); |
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c index b4c1ee713492..f8278cfcc1d3 100644 --- a/fs/xfs/xfs_dfrag.c +++ b/fs/xfs/xfs_dfrag.c | |||
@@ -55,17 +55,11 @@ xfs_swapext( | |||
55 | struct file *file, *target_file; | 55 | struct file *file, *target_file; |
56 | int error = 0; | 56 | int error = 0; |
57 | 57 | ||
58 | sxp = kmem_alloc(sizeof(xfs_swapext_t), KM_MAYFAIL); | ||
59 | if (!sxp) { | ||
60 | error = XFS_ERROR(ENOMEM); | ||
61 | goto out; | ||
62 | } | ||
63 | |||
64 | /* Pull information for the target fd */ | 58 | /* Pull information for the target fd */ |
65 | file = fget((int)sxp->sx_fdtarget); | 59 | file = fget((int)sxp->sx_fdtarget); |
66 | if (!file) { | 60 | if (!file) { |
67 | error = XFS_ERROR(EINVAL); | 61 | error = XFS_ERROR(EINVAL); |
68 | goto out_free_sxp; | 62 | goto out; |
69 | } | 63 | } |
70 | 64 | ||
71 | if (!(file->f_mode & FMODE_WRITE) || (file->f_flags & O_APPEND)) { | 65 | if (!(file->f_mode & FMODE_WRITE) || (file->f_flags & O_APPEND)) { |
@@ -109,8 +103,6 @@ xfs_swapext( | |||
109 | fput(target_file); | 103 | fput(target_file); |
110 | out_put_file: | 104 | out_put_file: |
111 | fput(file); | 105 | fput(file); |
112 | out_free_sxp: | ||
113 | kmem_free(sxp); | ||
114 | out: | 106 | out: |
115 | return error; | 107 | return error; |
116 | } | 108 | } |
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 35cca98bd94c..b1047de2fffd 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c | |||
@@ -70,16 +70,21 @@ STATIC void xlog_recover_check_summary(xlog_t *); | |||
70 | xfs_buf_t * | 70 | xfs_buf_t * |
71 | xlog_get_bp( | 71 | xlog_get_bp( |
72 | xlog_t *log, | 72 | xlog_t *log, |
73 | int num_bblks) | 73 | int nbblks) |
74 | { | 74 | { |
75 | ASSERT(num_bblks > 0); | 75 | if (nbblks <= 0 || nbblks > log->l_logBBsize) { |
76 | xlog_warn("XFS: Invalid block length (0x%x) given for buffer", nbblks); | ||
77 | XFS_ERROR_REPORT("xlog_get_bp(1)", | ||
78 | XFS_ERRLEVEL_HIGH, log->l_mp); | ||
79 | return NULL; | ||
80 | } | ||
76 | 81 | ||
77 | if (log->l_sectbb_log) { | 82 | if (log->l_sectbb_log) { |
78 | if (num_bblks > 1) | 83 | if (nbblks > 1) |
79 | num_bblks += XLOG_SECTOR_ROUNDUP_BBCOUNT(log, 1); | 84 | nbblks += XLOG_SECTOR_ROUNDUP_BBCOUNT(log, 1); |
80 | num_bblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, num_bblks); | 85 | nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks); |
81 | } | 86 | } |
82 | return xfs_buf_get_noaddr(BBTOB(num_bblks), log->l_mp->m_logdev_targp); | 87 | return xfs_buf_get_noaddr(BBTOB(nbblks), log->l_mp->m_logdev_targp); |
83 | } | 88 | } |
84 | 89 | ||
85 | void | 90 | void |
@@ -102,6 +107,13 @@ xlog_bread( | |||
102 | { | 107 | { |
103 | int error; | 108 | int error; |
104 | 109 | ||
110 | if (nbblks <= 0 || nbblks > log->l_logBBsize) { | ||
111 | xlog_warn("XFS: Invalid block length (0x%x) given for buffer", nbblks); | ||
112 | XFS_ERROR_REPORT("xlog_bread(1)", | ||
113 | XFS_ERRLEVEL_HIGH, log->l_mp); | ||
114 | return EFSCORRUPTED; | ||
115 | } | ||
116 | |||
105 | if (log->l_sectbb_log) { | 117 | if (log->l_sectbb_log) { |
106 | blk_no = XLOG_SECTOR_ROUNDDOWN_BLKNO(log, blk_no); | 118 | blk_no = XLOG_SECTOR_ROUNDDOWN_BLKNO(log, blk_no); |
107 | nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks); | 119 | nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks); |
@@ -139,6 +151,13 @@ xlog_bwrite( | |||
139 | { | 151 | { |
140 | int error; | 152 | int error; |
141 | 153 | ||
154 | if (nbblks <= 0 || nbblks > log->l_logBBsize) { | ||
155 | xlog_warn("XFS: Invalid block length (0x%x) given for buffer", nbblks); | ||
156 | XFS_ERROR_REPORT("xlog_bwrite(1)", | ||
157 | XFS_ERRLEVEL_HIGH, log->l_mp); | ||
158 | return EFSCORRUPTED; | ||
159 | } | ||
160 | |||
142 | if (log->l_sectbb_log) { | 161 | if (log->l_sectbb_log) { |
143 | blk_no = XLOG_SECTOR_ROUNDDOWN_BLKNO(log, blk_no); | 162 | blk_no = XLOG_SECTOR_ROUNDDOWN_BLKNO(log, blk_no); |
144 | nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks); | 163 | nbblks = XLOG_SECTOR_ROUNDUP_BBCOUNT(log, nbblks); |
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 12e9a2957caf..b97cdc516a8f 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -41,6 +41,7 @@ header-y += baycom.h | |||
41 | header-y += bfs_fs.h | 41 | header-y += bfs_fs.h |
42 | header-y += blkpg.h | 42 | header-y += blkpg.h |
43 | header-y += bpqether.h | 43 | header-y += bpqether.h |
44 | header-y += bsg.h | ||
44 | header-y += can.h | 45 | header-y += can.h |
45 | header-y += cdk.h | 46 | header-y += cdk.h |
46 | header-y += chio.h | 47 | header-y += chio.h |
@@ -89,7 +90,6 @@ header-y += if_ppp.h | |||
89 | header-y += if_slip.h | 90 | header-y += if_slip.h |
90 | header-y += if_strip.h | 91 | header-y += if_strip.h |
91 | header-y += if_tun.h | 92 | header-y += if_tun.h |
92 | header-y += if_tunnel.h | ||
93 | header-y += in_route.h | 93 | header-y += in_route.h |
94 | header-y += ioctl.h | 94 | header-y += ioctl.h |
95 | header-y += ip6_tunnel.h | 95 | header-y += ip6_tunnel.h |
@@ -235,6 +235,7 @@ unifdef-y += if_phonet.h | |||
235 | unifdef-y += if_pppol2tp.h | 235 | unifdef-y += if_pppol2tp.h |
236 | unifdef-y += if_pppox.h | 236 | unifdef-y += if_pppox.h |
237 | unifdef-y += if_tr.h | 237 | unifdef-y += if_tr.h |
238 | unifdef-y += if_tunnel.h | ||
238 | unifdef-y += if_vlan.h | 239 | unifdef-y += if_vlan.h |
239 | unifdef-y += igmp.h | 240 | unifdef-y += igmp.h |
240 | unifdef-y += inet_diag.h | 241 | unifdef-y += inet_diag.h |
diff --git a/include/linux/aio_abi.h b/include/linux/aio_abi.h index 9e0172931315..2c8731664180 100644 --- a/include/linux/aio_abi.h +++ b/include/linux/aio_abi.h | |||
@@ -27,6 +27,7 @@ | |||
27 | #ifndef __LINUX__AIO_ABI_H | 27 | #ifndef __LINUX__AIO_ABI_H |
28 | #define __LINUX__AIO_ABI_H | 28 | #define __LINUX__AIO_ABI_H |
29 | 29 | ||
30 | #include <linux/types.h> | ||
30 | #include <asm/byteorder.h> | 31 | #include <asm/byteorder.h> |
31 | 32 | ||
32 | typedef unsigned long aio_context_t; | 33 | typedef unsigned long aio_context_t; |
diff --git a/include/linux/ata.h b/include/linux/ata.h index a53318b8cbd0..08a86d5cdf1b 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -731,12 +731,17 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
731 | 731 | ||
732 | static inline int ata_id_is_cfa(const u16 *id) | 732 | static inline int ata_id_is_cfa(const u16 *id) |
733 | { | 733 | { |
734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ | 734 | if (id[ATA_ID_CONFIG] == 0x848A) /* Traditional CF */ |
735 | return 1; | 735 | return 1; |
736 | /* Could be CF hiding as standard ATA */ | 736 | /* |
737 | if (ata_id_major_version(id) >= 3 && | 737 | * CF specs don't require specific value in the word 0 anymore and yet |
738 | id[ATA_ID_COMMAND_SET_1] != 0xFFFF && | 738 | * they forbid to report the ATA version in the word 80 and require the |
739 | (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) | 739 | * CFA feature set support to be indicated in the word 83 in this case. |
740 | * Unfortunately, some cards only follow either of this requirements, | ||
741 | * and while those that don't indicate CFA feature support need some | ||
742 | * sort of quirk list, it seems impractical for the ones that do... | ||
743 | */ | ||
744 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC004) == 0x4004) | ||
740 | return 1; | 745 | return 1; |
741 | return 0; | 746 | return 0; |
742 | } | 747 | } |
diff --git a/include/linux/atalk.h b/include/linux/atalk.h index e9ebac2e2ecc..d34c187432ed 100644 --- a/include/linux/atalk.h +++ b/include/linux/atalk.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_ATALK_H__ | 1 | #ifndef __LINUX_ATALK_H__ |
2 | #define __LINUX_ATALK_H__ | 2 | #define __LINUX_ATALK_H__ |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
5 | 6 | ||
6 | /* | 7 | /* |
diff --git a/include/linux/atmbr2684.h b/include/linux/atmbr2684.h index 52bf72affbba..fdb2629b6189 100644 --- a/include/linux/atmbr2684.h +++ b/include/linux/atmbr2684.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_ATMBR2684_H | 1 | #ifndef _LINUX_ATMBR2684_H |
2 | #define _LINUX_ATMBR2684_H | 2 | #define _LINUX_ATMBR2684_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/atm.h> | 5 | #include <linux/atm.h> |
5 | #include <linux/if.h> /* For IFNAMSIZ */ | 6 | #include <linux/if.h> /* For IFNAMSIZ */ |
6 | 7 | ||
diff --git a/include/linux/auto_fs4.h b/include/linux/auto_fs4.h index 55fa478bd639..8b49ac48a5b7 100644 --- a/include/linux/auto_fs4.h +++ b/include/linux/auto_fs4.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #define _LINUX_AUTO_FS4_H | 12 | #define _LINUX_AUTO_FS4_H |
13 | 13 | ||
14 | /* Include common v3 definitions */ | 14 | /* Include common v3 definitions */ |
15 | #include <linux/types.h> | ||
15 | #include <linux/auto_fs.h> | 16 | #include <linux/auto_fs.h> |
16 | 17 | ||
17 | /* autofs v4 definitions */ | 18 | /* autofs v4 definitions */ |
diff --git a/include/linux/bfs_fs.h b/include/linux/bfs_fs.h index 8ed6dfdcd783..1c0b355aa515 100644 --- a/include/linux/bfs_fs.h +++ b/include/linux/bfs_fs.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef _LINUX_BFS_FS_H | 6 | #ifndef _LINUX_BFS_FS_H |
7 | #define _LINUX_BFS_FS_H | 7 | #define _LINUX_BFS_FS_H |
8 | 8 | ||
9 | #include <linux/types.h> | ||
10 | |||
9 | #define BFS_BSIZE_BITS 9 | 11 | #define BFS_BSIZE_BITS 9 |
10 | #define BFS_BSIZE (1<<BFS_BSIZE_BITS) | 12 | #define BFS_BSIZE (1<<BFS_BSIZE_BITS) |
11 | 13 | ||
@@ -17,7 +19,6 @@ | |||
17 | #define BFS_VDIR 2L | 19 | #define BFS_VDIR 2L |
18 | #define BFS_VREG 1L | 20 | #define BFS_VREG 1L |
19 | 21 | ||
20 | |||
21 | /* BFS inode layout on disk */ | 22 | /* BFS inode layout on disk */ |
22 | struct bfs_inode { | 23 | struct bfs_inode { |
23 | __le16 i_ino; | 24 | __le16 i_ino; |
diff --git a/include/linux/bio.h b/include/linux/bio.h index 18462c5b8fff..2aa283ab062b 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h | |||
@@ -144,7 +144,7 @@ struct bio { | |||
144 | * bit 1 -- rw-ahead when set | 144 | * bit 1 -- rw-ahead when set |
145 | * bit 2 -- barrier | 145 | * bit 2 -- barrier |
146 | * Insert a serialization point in the IO queue, forcing previously | 146 | * Insert a serialization point in the IO queue, forcing previously |
147 | * submitted IO to be completed before this oen is issued. | 147 | * submitted IO to be completed before this one is issued. |
148 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately | 148 | * bit 3 -- synchronous I/O hint: the block layer will unplug immediately |
149 | * Note that this does NOT indicate that the IO itself is sync, just | 149 | * Note that this does NOT indicate that the IO itself is sync, just |
150 | * that the block layer will not postpone issue of this IO by plugging. | 150 | * that the block layer will not postpone issue of this IO by plugging. |
@@ -163,12 +163,33 @@ struct bio { | |||
163 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ | 163 | #define BIO_RW 0 /* Must match RW in req flags (blkdev.h) */ |
164 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ | 164 | #define BIO_RW_AHEAD 1 /* Must match FAILFAST in req flags */ |
165 | #define BIO_RW_BARRIER 2 | 165 | #define BIO_RW_BARRIER 2 |
166 | #define BIO_RW_SYNC 3 | 166 | #define BIO_RW_SYNCIO 3 |
167 | #define BIO_RW_META 4 | 167 | #define BIO_RW_UNPLUG 4 |
168 | #define BIO_RW_DISCARD 5 | 168 | #define BIO_RW_META 5 |
169 | #define BIO_RW_FAILFAST_DEV 6 | 169 | #define BIO_RW_DISCARD 6 |
170 | #define BIO_RW_FAILFAST_TRANSPORT 7 | 170 | #define BIO_RW_FAILFAST_DEV 7 |
171 | #define BIO_RW_FAILFAST_DRIVER 8 | 171 | #define BIO_RW_FAILFAST_TRANSPORT 8 |
172 | #define BIO_RW_FAILFAST_DRIVER 9 | ||
173 | |||
174 | #define BIO_RW_SYNC (BIO_RW_SYNCIO | BIO_RW_UNPLUG) | ||
175 | |||
176 | #define bio_rw_flagged(bio, flag) ((bio)->bi_rw & (1 << (flag))) | ||
177 | |||
178 | /* | ||
179 | * Old defines, these should eventually be replaced by direct usage of | ||
180 | * bio_rw_flagged() | ||
181 | */ | ||
182 | #define bio_barrier(bio) bio_rw_flagged(bio, BIO_RW_BARRIER) | ||
183 | #define bio_sync(bio) bio_rw_flagged(bio, BIO_RW_SYNCIO) | ||
184 | #define bio_unplug(bio) bio_rw_flagged(bio, BIO_RW_UNPLUG) | ||
185 | #define bio_failfast_dev(bio) bio_rw_flagged(bio, BIO_RW_FAILFAST_DEV) | ||
186 | #define bio_failfast_transport(bio) \ | ||
187 | bio_rw_flagged(bio, BIO_RW_FAILFAST_TRANSPORT) | ||
188 | #define bio_failfast_driver(bio) \ | ||
189 | bio_rw_flagged(bio, BIO_RW_FAILFAST_DRIVER) | ||
190 | #define bio_rw_ahead(bio) bio_rw_flagged(bio, BIO_RW_AHEAD) | ||
191 | #define bio_rw_meta(bio) bio_rw_flagged(bio, BIO_RW_META) | ||
192 | #define bio_discard(bio) bio_rw_flagged(bio, BIO_RW_DISCARD) | ||
172 | 193 | ||
173 | /* | 194 | /* |
174 | * upper 16 bits of bi_rw define the io priority of this bio | 195 | * upper 16 bits of bi_rw define the io priority of this bio |
@@ -193,15 +214,6 @@ struct bio { | |||
193 | #define bio_offset(bio) bio_iovec((bio))->bv_offset | 214 | #define bio_offset(bio) bio_iovec((bio))->bv_offset |
194 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) | 215 | #define bio_segments(bio) ((bio)->bi_vcnt - (bio)->bi_idx) |
195 | #define bio_sectors(bio) ((bio)->bi_size >> 9) | 216 | #define bio_sectors(bio) ((bio)->bi_size >> 9) |
196 | #define bio_barrier(bio) ((bio)->bi_rw & (1 << BIO_RW_BARRIER)) | ||
197 | #define bio_sync(bio) ((bio)->bi_rw & (1 << BIO_RW_SYNC)) | ||
198 | #define bio_failfast_dev(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DEV)) | ||
199 | #define bio_failfast_transport(bio) \ | ||
200 | ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_TRANSPORT)) | ||
201 | #define bio_failfast_driver(bio) ((bio)->bi_rw & (1 << BIO_RW_FAILFAST_DRIVER)) | ||
202 | #define bio_rw_ahead(bio) ((bio)->bi_rw & (1 << BIO_RW_AHEAD)) | ||
203 | #define bio_rw_meta(bio) ((bio)->bi_rw & (1 << BIO_RW_META)) | ||
204 | #define bio_discard(bio) ((bio)->bi_rw & (1 << BIO_RW_DISCARD)) | ||
205 | #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) | 217 | #define bio_empty_barrier(bio) (bio_barrier(bio) && !bio_has_data(bio) && !bio_discard(bio)) |
206 | 218 | ||
207 | static inline unsigned int bio_cur_sectors(struct bio *bio) | 219 | static inline unsigned int bio_cur_sectors(struct bio *bio) |
@@ -312,7 +324,6 @@ struct bio_integrity_payload { | |||
312 | void *bip_buf; /* generated integrity data */ | 324 | void *bip_buf; /* generated integrity data */ |
313 | bio_end_io_t *bip_end_io; /* saved I/O completion fn */ | 325 | bio_end_io_t *bip_end_io; /* saved I/O completion fn */ |
314 | 326 | ||
315 | int bip_error; /* saved I/O error */ | ||
316 | unsigned int bip_size; | 327 | unsigned int bip_size; |
317 | 328 | ||
318 | unsigned short bip_pool; /* pool the ivec came from */ | 329 | unsigned short bip_pool; /* pool the ivec came from */ |
@@ -440,12 +451,13 @@ extern struct biovec_slab bvec_slabs[BIOVEC_NR_POOLS] __read_mostly; | |||
440 | 451 | ||
441 | #ifdef CONFIG_HIGHMEM | 452 | #ifdef CONFIG_HIGHMEM |
442 | /* | 453 | /* |
443 | * remember to add offset! and never ever reenable interrupts between a | 454 | * remember never ever reenable interrupts between a bvec_kmap_irq and |
444 | * bvec_kmap_irq and bvec_kunmap_irq!! | 455 | * bvec_kunmap_irq! |
445 | * | 456 | * |
446 | * This function MUST be inlined - it plays with the CPU interrupt flags. | 457 | * This function MUST be inlined - it plays with the CPU interrupt flags. |
447 | */ | 458 | */ |
448 | static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) | 459 | static __always_inline char *bvec_kmap_irq(struct bio_vec *bvec, |
460 | unsigned long *flags) | ||
449 | { | 461 | { |
450 | unsigned long addr; | 462 | unsigned long addr; |
451 | 463 | ||
@@ -461,7 +473,8 @@ static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) | |||
461 | return (char *) addr + bvec->bv_offset; | 473 | return (char *) addr + bvec->bv_offset; |
462 | } | 474 | } |
463 | 475 | ||
464 | static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags) | 476 | static __always_inline void bvec_kunmap_irq(char *buffer, |
477 | unsigned long *flags) | ||
465 | { | 478 | { |
466 | unsigned long ptr = (unsigned long) buffer & PAGE_MASK; | 479 | unsigned long ptr = (unsigned long) buffer & PAGE_MASK; |
467 | 480 | ||
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 044467ef7b11..dcaa0fd84b02 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -108,6 +108,7 @@ enum rq_flag_bits { | |||
108 | __REQ_RW_META, /* metadata io request */ | 108 | __REQ_RW_META, /* metadata io request */ |
109 | __REQ_COPY_USER, /* contains copies of user pages */ | 109 | __REQ_COPY_USER, /* contains copies of user pages */ |
110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ | 110 | __REQ_INTEGRITY, /* integrity metadata has been remapped */ |
111 | __REQ_UNPLUG, /* unplug queue on submission */ | ||
111 | __REQ_NR_BITS, /* stops here */ | 112 | __REQ_NR_BITS, /* stops here */ |
112 | }; | 113 | }; |
113 | 114 | ||
@@ -134,6 +135,7 @@ enum rq_flag_bits { | |||
134 | #define REQ_RW_META (1 << __REQ_RW_META) | 135 | #define REQ_RW_META (1 << __REQ_RW_META) |
135 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) | 136 | #define REQ_COPY_USER (1 << __REQ_COPY_USER) |
136 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) | 137 | #define REQ_INTEGRITY (1 << __REQ_INTEGRITY) |
138 | #define REQ_UNPLUG (1 << __REQ_UNPLUG) | ||
137 | 139 | ||
138 | #define BLK_MAX_CDB 16 | 140 | #define BLK_MAX_CDB 16 |
139 | 141 | ||
@@ -449,6 +451,11 @@ struct request_queue | |||
449 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ | 451 | #define QUEUE_FLAG_STACKABLE 13 /* supports request stacking */ |
450 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ | 452 | #define QUEUE_FLAG_NONROT 14 /* non-rotational device (SSD) */ |
451 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ | 453 | #define QUEUE_FLAG_VIRT QUEUE_FLAG_NONROT /* paravirt device */ |
454 | #define QUEUE_FLAG_IO_STAT 15 /* do IO stats */ | ||
455 | |||
456 | #define QUEUE_FLAG_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ | ||
457 | (1 << QUEUE_FLAG_CLUSTER) | \ | ||
458 | (1 << QUEUE_FLAG_STACKABLE)) | ||
452 | 459 | ||
453 | static inline int queue_is_locked(struct request_queue *q) | 460 | static inline int queue_is_locked(struct request_queue *q) |
454 | { | 461 | { |
@@ -565,6 +572,7 @@ enum { | |||
565 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) | 572 | #define blk_queue_stopped(q) test_bit(QUEUE_FLAG_STOPPED, &(q)->queue_flags) |
566 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) | 573 | #define blk_queue_nomerges(q) test_bit(QUEUE_FLAG_NOMERGES, &(q)->queue_flags) |
567 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) | 574 | #define blk_queue_nonrot(q) test_bit(QUEUE_FLAG_NONROT, &(q)->queue_flags) |
575 | #define blk_queue_io_stat(q) test_bit(QUEUE_FLAG_IO_STAT, &(q)->queue_flags) | ||
568 | #define blk_queue_flushing(q) ((q)->ordseq) | 576 | #define blk_queue_flushing(q) ((q)->ordseq) |
569 | #define blk_queue_stackable(q) \ | 577 | #define blk_queue_stackable(q) \ |
570 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) | 578 | test_bit(QUEUE_FLAG_STACKABLE, &(q)->queue_flags) |
diff --git a/include/linux/blktrace_api.h b/include/linux/blktrace_api.h index 1dba3493d520..25379cba2370 100644 --- a/include/linux/blktrace_api.h +++ b/include/linux/blktrace_api.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef BLKTRACE_H | 1 | #ifndef BLKTRACE_H |
2 | #define BLKTRACE_H | 2 | #define BLKTRACE_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #ifdef __KERNEL__ | 5 | #ifdef __KERNEL__ |
5 | #include <linux/blkdev.h> | 6 | #include <linux/blkdev.h> |
6 | #include <linux/relay.h> | 7 | #include <linux/relay.h> |
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h index 7f293273c444..1432b278c52d 100644 --- a/include/linux/can/bcm.h +++ b/include/linux/can/bcm.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #ifndef CAN_BCM_H | 14 | #ifndef CAN_BCM_H |
15 | #define CAN_BCM_H | 15 | #define CAN_BCM_H |
16 | 16 | ||
17 | #include <linux/types.h> | ||
18 | |||
17 | /** | 19 | /** |
18 | * struct bcm_msg_head - head of messages to/from the broadcast manager | 20 | * struct bcm_msg_head - head of messages to/from the broadcast manager |
19 | * @opcode: opcode, see enum below. | 21 | * @opcode: opcode, see enum below. |
diff --git a/include/linux/capability.h b/include/linux/capability.h index 02bdb768d43b..1b9872556131 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -69,10 +69,6 @@ typedef struct __user_cap_data_struct { | |||
69 | #define VFS_CAP_U32 VFS_CAP_U32_2 | 69 | #define VFS_CAP_U32 VFS_CAP_U32_2 |
70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 | 70 | #define VFS_CAP_REVISION VFS_CAP_REVISION_2 |
71 | 71 | ||
72 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
73 | extern int file_caps_enabled; | ||
74 | #endif | ||
75 | |||
76 | struct vfs_cap_data { | 72 | struct vfs_cap_data { |
77 | __le32 magic_etc; /* Little endian */ | 73 | __le32 magic_etc; /* Little endian */ |
78 | struct { | 74 | struct { |
@@ -96,6 +92,10 @@ struct vfs_cap_data { | |||
96 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 | 92 | #define _KERNEL_CAPABILITY_VERSION _LINUX_CAPABILITY_VERSION_3 |
97 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 | 93 | #define _KERNEL_CAPABILITY_U32S _LINUX_CAPABILITY_U32S_3 |
98 | 94 | ||
95 | #ifdef CONFIG_SECURITY_FILE_CAPABILITIES | ||
96 | extern int file_caps_enabled; | ||
97 | #endif | ||
98 | |||
99 | typedef struct kernel_cap_struct { | 99 | typedef struct kernel_cap_struct { |
100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; | 100 | __u32 cap[_KERNEL_CAPABILITY_U32S]; |
101 | } kernel_cap_t; | 101 | } kernel_cap_t; |
diff --git a/include/linux/cdrom.h b/include/linux/cdrom.h index 0b49e08d3cb0..78e904796622 100644 --- a/include/linux/cdrom.h +++ b/include/linux/cdrom.h | |||
@@ -11,6 +11,7 @@ | |||
11 | #ifndef _LINUX_CDROM_H | 11 | #ifndef _LINUX_CDROM_H |
12 | #define _LINUX_CDROM_H | 12 | #define _LINUX_CDROM_H |
13 | 13 | ||
14 | #include <linux/types.h> | ||
14 | #include <asm/byteorder.h> | 15 | #include <asm/byteorder.h> |
15 | 16 | ||
16 | /******************************************************* | 17 | /******************************************************* |
diff --git a/include/linux/cgroupstats.h b/include/linux/cgroupstats.h index 4f53abf6855d..3753c33160d1 100644 --- a/include/linux/cgroupstats.h +++ b/include/linux/cgroupstats.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #ifndef _LINUX_CGROUPSTATS_H | 15 | #ifndef _LINUX_CGROUPSTATS_H |
16 | #define _LINUX_CGROUPSTATS_H | 16 | #define _LINUX_CGROUPSTATS_H |
17 | 17 | ||
18 | #include <linux/types.h> | ||
18 | #include <linux/taskstats.h> | 19 | #include <linux/taskstats.h> |
19 | 20 | ||
20 | /* | 21 | /* |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index cea153697ec7..3a1dbba4d3ae 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -36,6 +36,7 @@ enum clock_event_nofitiers { | |||
36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | 36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, |
37 | CLOCK_EVT_NOTIFY_SUSPEND, | 37 | CLOCK_EVT_NOTIFY_SUSPEND, |
38 | CLOCK_EVT_NOTIFY_RESUME, | 38 | CLOCK_EVT_NOTIFY_RESUME, |
39 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
39 | CLOCK_EVT_NOTIFY_CPU_DEAD, | 40 | CLOCK_EVT_NOTIFY_CPU_DEAD, |
40 | }; | 41 | }; |
41 | 42 | ||
diff --git a/include/linux/dlm_plock.h b/include/linux/dlm_plock.h index 18d5fdbceb74..2dd21243104f 100644 --- a/include/linux/dlm_plock.h +++ b/include/linux/dlm_plock.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __DLM_PLOCK_DOT_H__ | 9 | #ifndef __DLM_PLOCK_DOT_H__ |
10 | #define __DLM_PLOCK_DOT_H__ | 10 | #define __DLM_PLOCK_DOT_H__ |
11 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
12 | #define DLM_PLOCK_MISC_NAME "dlm_plock" | 14 | #define DLM_PLOCK_MISC_NAME "dlm_plock" |
13 | 15 | ||
14 | #define DLM_PLOCK_VERSION_MAJOR 1 | 16 | #define DLM_PLOCK_VERSION_MAJOR 1 |
diff --git a/include/linux/dn.h b/include/linux/dn.h index 02bba040fcfb..fe9990823193 100644 --- a/include/linux/dn.h +++ b/include/linux/dn.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_DN_H | 1 | #ifndef _LINUX_DN_H |
2 | #define _LINUX_DN_H | 2 | #define _LINUX_DN_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* | 6 | /* |
5 | 7 | ||
6 | DECnet Data Structures and Constants | 8 | DECnet Data Structures and Constants |
diff --git a/include/linux/dvb/audio.h b/include/linux/dvb/audio.h index 89412e18f571..bb0df2aaebfa 100644 --- a/include/linux/dvb/audio.h +++ b/include/linux/dvb/audio.h | |||
@@ -24,12 +24,7 @@ | |||
24 | #ifndef _DVBAUDIO_H_ | 24 | #ifndef _DVBAUDIO_H_ |
25 | #define _DVBAUDIO_H_ | 25 | #define _DVBAUDIO_H_ |
26 | 26 | ||
27 | #ifdef __KERNEL__ | ||
28 | #include <linux/types.h> | 27 | #include <linux/types.h> |
29 | #else | ||
30 | #include <stdint.h> | ||
31 | #endif | ||
32 | |||
33 | 28 | ||
34 | typedef enum { | 29 | typedef enum { |
35 | AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ | 30 | AUDIO_SOURCE_DEMUX, /* Select the demux as the main source */ |
diff --git a/include/linux/dvb/dmx.h b/include/linux/dvb/dmx.h index 402fb7a8d922..fef943738a24 100644 --- a/include/linux/dvb/dmx.h +++ b/include/linux/dvb/dmx.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #ifndef _DVBDMX_H_ | 24 | #ifndef _DVBDMX_H_ |
25 | #define _DVBDMX_H_ | 25 | #define _DVBDMX_H_ |
26 | 26 | ||
27 | #include <asm/types.h> | 27 | #include <linux/types.h> |
28 | #ifdef __KERNEL__ | 28 | #ifdef __KERNEL__ |
29 | #include <linux/time.h> | 29 | #include <linux/time.h> |
30 | #else | 30 | #else |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 55026b1a40bd..51c8d2d49e42 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -26,8 +26,7 @@ | |||
26 | #ifndef _DVBFRONTEND_H_ | 26 | #ifndef _DVBFRONTEND_H_ |
27 | #define _DVBFRONTEND_H_ | 27 | #define _DVBFRONTEND_H_ |
28 | 28 | ||
29 | #include <asm/types.h> | 29 | #include <linux/types.h> |
30 | |||
31 | 30 | ||
32 | typedef enum fe_type { | 31 | typedef enum fe_type { |
33 | FE_QPSK, | 32 | FE_QPSK, |
diff --git a/include/linux/dvb/net.h b/include/linux/dvb/net.h index 5be474bf0d2b..f451e7eb0b0b 100644 --- a/include/linux/dvb/net.h +++ b/include/linux/dvb/net.h | |||
@@ -24,8 +24,7 @@ | |||
24 | #ifndef _DVBNET_H_ | 24 | #ifndef _DVBNET_H_ |
25 | #define _DVBNET_H_ | 25 | #define _DVBNET_H_ |
26 | 26 | ||
27 | #include <asm/types.h> | 27 | #include <linux/types.h> |
28 | |||
29 | 28 | ||
30 | struct dvb_net_if { | 29 | struct dvb_net_if { |
31 | __u16 pid; | 30 | __u16 pid; |
diff --git a/include/linux/dvb/video.h b/include/linux/dvb/video.h index 50839fe9e39e..bd49c3ebf916 100644 --- a/include/linux/dvb/video.h +++ b/include/linux/dvb/video.h | |||
@@ -24,17 +24,14 @@ | |||
24 | #ifndef _DVBVIDEO_H_ | 24 | #ifndef _DVBVIDEO_H_ |
25 | #define _DVBVIDEO_H_ | 25 | #define _DVBVIDEO_H_ |
26 | 26 | ||
27 | #include <linux/compiler.h> | ||
28 | |||
29 | #ifdef __KERNEL__ | ||
30 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #ifdef __KERNEL__ | ||
29 | #include <linux/compiler.h> | ||
31 | #else | 30 | #else |
32 | #include <asm/types.h> | ||
33 | #include <stdint.h> | 31 | #include <stdint.h> |
34 | #include <time.h> | 32 | #include <time.h> |
35 | #endif | 33 | #endif |
36 | 34 | ||
37 | |||
38 | typedef enum { | 35 | typedef enum { |
39 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ | 36 | VIDEO_FORMAT_4_3, /* Select 4:3 format */ |
40 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ | 37 | VIDEO_FORMAT_16_9, /* Select 16:9 format. */ |
diff --git a/include/linux/edd.h b/include/linux/edd.h index 5d747c5cd0fe..4cbd0fe9df08 100644 --- a/include/linux/edd.h +++ b/include/linux/edd.h | |||
@@ -30,6 +30,8 @@ | |||
30 | #ifndef _LINUX_EDD_H | 30 | #ifndef _LINUX_EDD_H |
31 | #define _LINUX_EDD_H | 31 | #define _LINUX_EDD_H |
32 | 32 | ||
33 | #include <linux/types.h> | ||
34 | |||
33 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF | 35 | #define EDDNR 0x1e9 /* addr of number of edd_info structs at EDDBUF |
34 | in boot_params - treat this as 1 byte */ | 36 | in boot_params - treat this as 1 byte */ |
35 | #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ | 37 | #define EDDBUF 0xd00 /* addr of edd_info structs in boot_params */ |
diff --git a/include/linux/efs_fs_sb.h b/include/linux/efs_fs_sb.h index ff1945e37790..a01be90c58cc 100644 --- a/include/linux/efs_fs_sb.h +++ b/include/linux/efs_fs_sb.h | |||
@@ -9,6 +9,7 @@ | |||
9 | #ifndef __EFS_FS_SB_H__ | 9 | #ifndef __EFS_FS_SB_H__ |
10 | #define __EFS_FS_SB_H__ | 10 | #define __EFS_FS_SB_H__ |
11 | 11 | ||
12 | #include <linux/types.h> | ||
12 | #include <linux/magic.h> | 13 | #include <linux/magic.h> |
13 | 14 | ||
14 | /* EFS superblock magic numbers */ | 15 | /* EFS superblock magic numbers */ |
diff --git a/include/linux/elf-fdpic.h b/include/linux/elf-fdpic.h index 9f5b7456bff3..7cd2e80cebc8 100644 --- a/include/linux/elf-fdpic.h +++ b/include/linux/elf-fdpic.h | |||
@@ -58,11 +58,13 @@ struct elf_fdpic_params { | |||
58 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ | 58 | #define ELF_FDPIC_FLAG_PRESENT 0x80000000 /* T if this object is present */ |
59 | }; | 59 | }; |
60 | 60 | ||
61 | #ifdef __KERNEL__ | ||
61 | #ifdef CONFIG_MMU | 62 | #ifdef CONFIG_MMU |
62 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, | 63 | extern void elf_fdpic_arch_lay_out_mm(struct elf_fdpic_params *exec_params, |
63 | struct elf_fdpic_params *interp_params, | 64 | struct elf_fdpic_params *interp_params, |
64 | unsigned long *start_stack, | 65 | unsigned long *start_stack, |
65 | unsigned long *start_brk); | 66 | unsigned long *start_brk); |
66 | #endif | 67 | #endif |
68 | #endif /* __KERNEL__ */ | ||
67 | 69 | ||
68 | #endif /* _LINUX_ELF_FDPIC_H */ | 70 | #endif /* _LINUX_ELF_FDPIC_H */ |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 0b61ca41a044..45a937be6d38 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -377,6 +377,7 @@ typedef struct elf64_note { | |||
377 | Elf64_Word n_type; /* Content type */ | 377 | Elf64_Word n_type; /* Content type */ |
378 | } Elf64_Nhdr; | 378 | } Elf64_Nhdr; |
379 | 379 | ||
380 | #ifdef __KERNEL__ | ||
380 | #if ELF_CLASS == ELFCLASS32 | 381 | #if ELF_CLASS == ELFCLASS32 |
381 | 382 | ||
382 | extern Elf32_Dyn _DYNAMIC []; | 383 | extern Elf32_Dyn _DYNAMIC []; |
@@ -404,5 +405,5 @@ static inline int elf_coredump_extra_notes_write(struct file *file, | |||
404 | extern int elf_coredump_extra_notes_size(void); | 405 | extern int elf_coredump_extra_notes_size(void); |
405 | extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); | 406 | extern int elf_coredump_extra_notes_write(struct file *file, loff_t *foffset); |
406 | #endif | 407 | #endif |
407 | 408 | #endif /* __KERNEL__ */ | |
408 | #endif /* _LINUX_ELF_H */ | 409 | #endif /* _LINUX_ELF_H */ |
diff --git a/include/linux/errqueue.h b/include/linux/errqueue.h index 92f8d4fab32b..ceb1454b6977 100644 --- a/include/linux/errqueue.h +++ b/include/linux/errqueue.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_ERRQUEUE_H | 1 | #ifndef _LINUX_ERRQUEUE_H |
2 | #define _LINUX_ERRQUEUE_H 1 | 2 | #define _LINUX_ERRQUEUE_H 1 |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | struct sock_extended_err | 6 | struct sock_extended_err |
5 | { | 7 | { |
6 | __u32 ee_errno; | 8 | __u32 ee_errno; |
diff --git a/include/linux/genetlink.h b/include/linux/genetlink.h index 7da02c93002b..b834ef6d59fa 100644 --- a/include/linux/genetlink.h +++ b/include/linux/genetlink.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_GENERIC_NETLINK_H | 1 | #ifndef __LINUX_GENERIC_NETLINK_H |
2 | #define __LINUX_GENERIC_NETLINK_H | 2 | #define __LINUX_GENERIC_NETLINK_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
5 | 6 | ||
6 | #define GENL_NAMSIZ 16 /* length of family name */ | 7 | #define GENL_NAMSIZ 16 /* length of family name */ |
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index 14d0df0b5749..c56b4bce56d0 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __GFS2_ONDISK_DOT_H__ | 10 | #ifndef __GFS2_ONDISK_DOT_H__ |
11 | #define __GFS2_ONDISK_DOT_H__ | 11 | #define __GFS2_ONDISK_DOT_H__ |
12 | 12 | ||
13 | #include <linux/types.h> | ||
14 | |||
13 | #define GFS2_MAGIC 0x01161970 | 15 | #define GFS2_MAGIC 0x01161970 |
14 | #define GFS2_BASIC_BLOCK 512 | 16 | #define GFS2_BASIC_BLOCK 512 |
15 | #define GFS2_BASIC_BLOCK_SHIFT 9 | 17 | #define GFS2_BASIC_BLOCK_SHIFT 9 |
diff --git a/include/linux/hid.h b/include/linux/hid.h index 81aa84d60c6b..fa8ee9cef7be 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -791,6 +791,7 @@ dbg_hid(const char *fmt, ...) | |||
791 | __FILE__ , ## arg) | 791 | __FILE__ , ## arg) |
792 | #endif /* HID_FF */ | 792 | #endif /* HID_FF */ |
793 | 793 | ||
794 | #ifdef __KERNEL__ | ||
794 | #ifdef CONFIG_HID_COMPAT | 795 | #ifdef CONFIG_HID_COMPAT |
795 | #define HID_COMPAT_LOAD_DRIVER(name) \ | 796 | #define HID_COMPAT_LOAD_DRIVER(name) \ |
796 | /* prototype to avoid sparse warning */ \ | 797 | /* prototype to avoid sparse warning */ \ |
@@ -804,6 +805,7 @@ EXPORT_SYMBOL(hid_compat_##name) | |||
804 | extern void hid_compat_##name(void); \ | 805 | extern void hid_compat_##name(void); \ |
805 | hid_compat_##name(); \ | 806 | hid_compat_##name(); \ |
806 | } while (0) | 807 | } while (0) |
808 | #endif /* __KERNEL__ */ | ||
807 | 809 | ||
808 | #endif | 810 | #endif |
809 | 811 | ||
diff --git a/include/linux/hiddev.h b/include/linux/hiddev.h index c760ae0eb6a1..bb6f58baf319 100644 --- a/include/linux/hiddev.h +++ b/include/linux/hiddev.h | |||
@@ -27,6 +27,8 @@ | |||
27 | * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic | 27 | * Vojtech Pavlik, Ucitelska 1576, Prague 8, 182 00 Czech Republic |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/types.h> | ||
31 | |||
30 | /* | 32 | /* |
31 | * The event structure itself | 33 | * The event structure itself |
32 | */ | 34 | */ |
diff --git a/include/linux/icmpv6.h b/include/linux/icmpv6.h index a93a8dd33118..10d701eec484 100644 --- a/include/linux/icmpv6.h +++ b/include/linux/icmpv6.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_ICMPV6_H | 1 | #ifndef _LINUX_ICMPV6_H |
2 | #define _LINUX_ICMPV6_H | 2 | #define _LINUX_ICMPV6_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <asm/byteorder.h> | 5 | #include <asm/byteorder.h> |
5 | 6 | ||
6 | struct icmp6hdr { | 7 | struct icmp6hdr { |
diff --git a/include/linux/if_addr.h b/include/linux/if_addr.h index 43f3bedaafd3..a60c821be44c 100644 --- a/include/linux/if_addr.h +++ b/include/linux/if_addr.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_IF_ADDR_H | 1 | #ifndef __LINUX_IF_ADDR_H |
2 | #define __LINUX_IF_ADDR_H | 2 | #define __LINUX_IF_ADDR_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
5 | 6 | ||
6 | struct ifaddrmsg | 7 | struct ifaddrmsg |
diff --git a/include/linux/if_addrlabel.h b/include/linux/if_addrlabel.h index 9fe79c95dd28..89571f65d6de 100644 --- a/include/linux/if_addrlabel.h +++ b/include/linux/if_addrlabel.h | |||
@@ -10,6 +10,8 @@ | |||
10 | #ifndef __LINUX_IF_ADDRLABEL_H | 10 | #ifndef __LINUX_IF_ADDRLABEL_H |
11 | #define __LINUX_IF_ADDRLABEL_H | 11 | #define __LINUX_IF_ADDRLABEL_H |
12 | 12 | ||
13 | #include <linux/types.h> | ||
14 | |||
13 | struct ifaddrlblmsg | 15 | struct ifaddrlblmsg |
14 | { | 16 | { |
15 | __u8 ifal_family; /* Address family */ | 17 | __u8 ifal_family; /* Address family */ |
diff --git a/include/linux/if_fc.h b/include/linux/if_fc.h index 376a34ea4723..6ed7f1bf35c8 100644 --- a/include/linux/if_fc.h +++ b/include/linux/if_fc.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #ifndef _LINUX_IF_FC_H | 20 | #ifndef _LINUX_IF_FC_H |
21 | #define _LINUX_IF_FC_H | 21 | #define _LINUX_IF_FC_H |
22 | 22 | ||
23 | #include <linux/types.h> | ||
23 | 24 | ||
24 | #define FC_ALEN 6 /* Octets in one ethernet addr */ | 25 | #define FC_ALEN 6 /* Octets in one ethernet addr */ |
25 | #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) | 26 | #define FC_HLEN (sizeof(struct fch_hdr)+sizeof(struct fcllc)) |
diff --git a/include/linux/if_hippi.h b/include/linux/if_hippi.h index f0f23516bb59..4a7c9940b080 100644 --- a/include/linux/if_hippi.h +++ b/include/linux/if_hippi.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef _LINUX_IF_HIPPI_H | 22 | #ifndef _LINUX_IF_HIPPI_H |
23 | #define _LINUX_IF_HIPPI_H | 23 | #define _LINUX_IF_HIPPI_H |
24 | 24 | ||
25 | #include <linux/types.h> | ||
25 | #include <asm/byteorder.h> | 26 | #include <asm/byteorder.h> |
26 | 27 | ||
27 | /* | 28 | /* |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index f9032c88716a..176c5182c515 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_IF_LINK_H | 1 | #ifndef _LINUX_IF_LINK_H |
2 | #define _LINUX_IF_LINK_H | 2 | #define _LINUX_IF_LINK_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
5 | 6 | ||
6 | /* The struct should be in sync with struct net_device_stats */ | 7 | /* The struct should be in sync with struct net_device_stats */ |
diff --git a/include/linux/if_ppp.h b/include/linux/if_ppp.h index c3b1f8562709..fcef103aa3f6 100644 --- a/include/linux/if_ppp.h +++ b/include/linux/if_ppp.h | |||
@@ -33,6 +33,7 @@ | |||
33 | #ifndef _IF_PPP_H_ | 33 | #ifndef _IF_PPP_H_ |
34 | #define _IF_PPP_H_ | 34 | #define _IF_PPP_H_ |
35 | 35 | ||
36 | #include <linux/types.h> | ||
36 | #include <linux/compiler.h> | 37 | #include <linux/compiler.h> |
37 | 38 | ||
38 | /* | 39 | /* |
diff --git a/include/linux/if_strip.h b/include/linux/if_strip.h index fb5c5c98442f..6526a6235832 100644 --- a/include/linux/if_strip.h +++ b/include/linux/if_strip.h | |||
@@ -18,6 +18,8 @@ | |||
18 | #ifndef __LINUX_STRIP_H | 18 | #ifndef __LINUX_STRIP_H |
19 | #define __LINUX_STRIP_H | 19 | #define __LINUX_STRIP_H |
20 | 20 | ||
21 | #include <linux/types.h> | ||
22 | |||
21 | typedef struct { | 23 | typedef struct { |
22 | __u8 c[6]; | 24 | __u8 c[6]; |
23 | } MetricomAddress; | 25 | } MetricomAddress; |
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 5bcec8b2c5e2..fc23aeb0f201 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
@@ -19,6 +19,7 @@ | |||
19 | #ifndef _LINUX_IF_TR_H | 19 | #ifndef _LINUX_IF_TR_H |
20 | #define _LINUX_IF_TR_H | 20 | #define _LINUX_IF_TR_H |
21 | 21 | ||
22 | #include <linux/types.h> | ||
22 | #include <asm/byteorder.h> /* For __be16 */ | 23 | #include <asm/byteorder.h> /* For __be16 */ |
23 | 24 | ||
24 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble | 25 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble |
diff --git a/include/linux/if_tunnel.h b/include/linux/if_tunnel.h index aeab2cb32a9c..82c43624c067 100644 --- a/include/linux/if_tunnel.h +++ b/include/linux/if_tunnel.h | |||
@@ -2,7 +2,10 @@ | |||
2 | #define _IF_TUNNEL_H_ | 2 | #define _IF_TUNNEL_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | 4 | #include <linux/types.h> |
5 | |||
6 | #ifdef __KERNEL__ | ||
5 | #include <linux/ip.h> | 7 | #include <linux/ip.h> |
8 | #endif | ||
6 | 9 | ||
7 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) | 10 | #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0) |
8 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) | 11 | #define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1) |
diff --git a/include/linux/igmp.h b/include/linux/igmp.h index f734a0ba0698..92fbd8cbd68f 100644 --- a/include/linux/igmp.h +++ b/include/linux/igmp.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #ifndef _LINUX_IGMP_H | 16 | #ifndef _LINUX_IGMP_H |
17 | #define _LINUX_IGMP_H | 17 | #define _LINUX_IGMP_H |
18 | 18 | ||
19 | #include <linux/types.h> | ||
19 | #include <asm/byteorder.h> | 20 | #include <asm/byteorder.h> |
20 | 21 | ||
21 | /* | 22 | /* |
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index 6e8bc548635a..bc8c49022084 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _INET_DIAG_H_ | 1 | #ifndef _INET_DIAG_H_ |
2 | #define _INET_DIAG_H_ 1 | 2 | #define _INET_DIAG_H_ 1 |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* Just some random number */ | 6 | /* Just some random number */ |
5 | #define TCPDIAG_GETSOCK 18 | 7 | #define TCPDIAG_GETSOCK 18 |
6 | #define DCCPDIAG_GETSOCK 19 | 8 | #define DCCPDIAG_GETSOCK 19 |
diff --git a/include/linux/ip6_tunnel.h b/include/linux/ip6_tunnel.h index 1e7cc4af40de..acb9ad684d63 100644 --- a/include/linux/ip6_tunnel.h +++ b/include/linux/ip6_tunnel.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _IP6_TUNNEL_H | 1 | #ifndef _IP6_TUNNEL_H |
2 | #define _IP6_TUNNEL_H | 2 | #define _IP6_TUNNEL_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #define IPV6_TLV_TNL_ENCAP_LIMIT 4 | 6 | #define IPV6_TLV_TNL_ENCAP_LIMIT 4 |
5 | #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 | 7 | #define IPV6_DEFAULT_TNL_ENCAP_LIMIT 4 |
6 | 8 | ||
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 0b816cae533e..476d9464ac82 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _IPV6_H | 1 | #ifndef _IPV6_H |
2 | #define _IPV6_H | 2 | #define _IPV6_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/in6.h> | 5 | #include <linux/in6.h> |
5 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
6 | 7 | ||
diff --git a/include/linux/ipv6_route.h b/include/linux/ipv6_route.h index b323ff577967..1e7d8af2defe 100644 --- a/include/linux/ipv6_route.h +++ b/include/linux/ipv6_route.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #ifndef _LINUX_IPV6_ROUTE_H | 13 | #ifndef _LINUX_IPV6_ROUTE_H |
14 | #define _LINUX_IPV6_ROUTE_H | 14 | #define _LINUX_IPV6_ROUTE_H |
15 | 15 | ||
16 | #include <linux/types.h> | ||
17 | |||
16 | #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ | 18 | #define RTF_DEFAULT 0x00010000 /* default - learned via ND */ |
17 | #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) | 19 | #define RTF_ALLONLINK 0x00020000 /* (deprecated and will be removed) |
18 | fallback, no routers on link */ | 20 | fallback, no routers on link */ |
diff --git a/include/linux/ipx.h b/include/linux/ipx.h index eb19b4ea84f4..aabb1d294025 100644 --- a/include/linux/ipx.h +++ b/include/linux/ipx.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _IPX_H_ | 1 | #ifndef _IPX_H_ |
2 | #define _IPX_H_ | 2 | #define _IPX_H_ |
3 | #include <linux/types.h> | ||
3 | #include <linux/sockios.h> | 4 | #include <linux/sockios.h> |
4 | #include <linux/socket.h> | 5 | #include <linux/socket.h> |
5 | #define IPX_NODE_LEN 6 | 6 | #define IPX_NODE_LEN 6 |
diff --git a/include/linux/irda.h b/include/linux/irda.h index 28f88ecba344..00bdad0e8515 100644 --- a/include/linux/irda.h +++ b/include/linux/irda.h | |||
@@ -25,6 +25,8 @@ | |||
25 | #ifndef KERNEL_IRDA_H | 25 | #ifndef KERNEL_IRDA_H |
26 | #define KERNEL_IRDA_H | 26 | #define KERNEL_IRDA_H |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | /* Please do *not* add any #include in this file, this file is | 30 | /* Please do *not* add any #include in this file, this file is |
29 | * included as-is in user space. | 31 | * included as-is in user space. |
30 | * Please fix the calling file to properly included needed files before | 32 | * Please fix the calling file to properly included needed files before |
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index b45109c61fba..b28b37eb11c6 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -308,7 +308,8 @@ void buffer_assertion_failure(struct buffer_head *bh); | |||
308 | int val = (expr); \ | 308 | int val = (expr); \ |
309 | if (!val) { \ | 309 | if (!val) { \ |
310 | printk(KERN_ERR \ | 310 | printk(KERN_ERR \ |
311 | "EXT3-fs unexpected failure: %s;\n",# expr); \ | 311 | "JBD2 unexpected failure: %s: %s;\n", \ |
312 | __func__, #expr); \ | ||
312 | printk(KERN_ERR why "\n"); \ | 313 | printk(KERN_ERR why "\n"); \ |
313 | } \ | 314 | } \ |
314 | val; \ | 315 | val; \ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index bca3ba25f52a..5d87bc09a1f5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -380,6 +380,7 @@ enum { | |||
380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands | 380 | ATA_HORKAGE_ATAPI_MOD16_DMA = (1 << 11), /* use ATAPI DMA for commands |
381 | not multiple of 16 bytes */ | 381 | not multiple of 16 bytes */ |
382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ | 382 | ATA_HORKAGE_FIRMWARE_WARN = (1 << 12), /* firwmare update warning */ |
383 | ATA_HORKAGE_1_5_GBPS = (1 << 13), /* force 1.5 Gbps */ | ||
383 | 384 | ||
384 | /* DMA mask for user DMA control: User visible values; DO NOT | 385 | /* DMA mask for user DMA control: User visible values; DO NOT |
385 | renumber */ | 386 | renumber */ |
@@ -580,7 +581,7 @@ struct ata_device { | |||
580 | acpi_handle acpi_handle; | 581 | acpi_handle acpi_handle; |
581 | union acpi_object *gtf_cache; | 582 | union acpi_object *gtf_cache; |
582 | #endif | 583 | #endif |
583 | /* n_sector is used as CLEAR_OFFSET, read comment above CLEAR_OFFSET */ | 584 | /* n_sector is CLEAR_BEGIN, read comment above CLEAR_BEGIN */ |
584 | u64 n_sectors; /* size of device, if ATA */ | 585 | u64 n_sectors; /* size of device, if ATA */ |
585 | unsigned int class; /* ATA_DEV_xxx */ | 586 | unsigned int class; /* ATA_DEV_xxx */ |
586 | unsigned long unpark_deadline; | 587 | unsigned long unpark_deadline; |
@@ -605,20 +606,22 @@ struct ata_device { | |||
605 | u16 heads; /* Number of heads */ | 606 | u16 heads; /* Number of heads */ |
606 | u16 sectors; /* Number of sectors per track */ | 607 | u16 sectors; /* Number of sectors per track */ |
607 | 608 | ||
608 | /* error history */ | ||
609 | int spdn_cnt; | ||
610 | struct ata_ering ering; | ||
611 | |||
612 | union { | 609 | union { |
613 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ | 610 | u16 id[ATA_ID_WORDS]; /* IDENTIFY xxx DEVICE data */ |
614 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ | 611 | u32 gscr[SATA_PMP_GSCR_DWORDS]; /* PMP GSCR block */ |
615 | }; | 612 | }; |
613 | |||
614 | /* error history */ | ||
615 | int spdn_cnt; | ||
616 | /* ering is CLEAR_END, read comment above CLEAR_END */ | ||
617 | struct ata_ering ering; | ||
616 | }; | 618 | }; |
617 | 619 | ||
618 | /* Offset into struct ata_device. Fields above it are maintained | 620 | /* Fields between ATA_DEVICE_CLEAR_BEGIN and ATA_DEVICE_CLEAR_END are |
619 | * acress device init. Fields below are zeroed. | 621 | * cleared to zero on ata_dev_init(). |
620 | */ | 622 | */ |
621 | #define ATA_DEVICE_CLEAR_OFFSET offsetof(struct ata_device, n_sectors) | 623 | #define ATA_DEVICE_CLEAR_BEGIN offsetof(struct ata_device, n_sectors) |
624 | #define ATA_DEVICE_CLEAR_END offsetof(struct ata_device, ering) | ||
622 | 625 | ||
623 | struct ata_eh_info { | 626 | struct ata_eh_info { |
624 | struct ata_device *dev; /* offending device */ | 627 | struct ata_device *dev; /* offending device */ |
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h index 0e39745f5111..13fe09e0576a 100644 --- a/include/linux/minix_fs.h +++ b/include/linux/minix_fs.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_MINIX_FS_H | 1 | #ifndef _LINUX_MINIX_FS_H |
2 | #define _LINUX_MINIX_FS_H | 2 | #define _LINUX_MINIX_FS_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/magic.h> | 5 | #include <linux/magic.h> |
5 | 6 | ||
6 | /* | 7 | /* |
diff --git a/include/linux/module.h b/include/linux/module.h index 4f7ea12463d3..f3b8329eb5b8 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -219,11 +219,6 @@ void *__symbol_get_gpl(const char *symbol); | |||
219 | 219 | ||
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | struct module_ref | ||
223 | { | ||
224 | local_t count; | ||
225 | } ____cacheline_aligned; | ||
226 | |||
227 | enum module_state | 222 | enum module_state |
228 | { | 223 | { |
229 | MODULE_STATE_LIVE, | 224 | MODULE_STATE_LIVE, |
@@ -344,8 +339,11 @@ struct module | |||
344 | /* Destruction function. */ | 339 | /* Destruction function. */ |
345 | void (*exit)(void); | 340 | void (*exit)(void); |
346 | 341 | ||
347 | /* Reference counts */ | 342 | #ifdef CONFIG_SMP |
348 | struct module_ref ref[NR_CPUS]; | 343 | char *refptr; |
344 | #else | ||
345 | local_t ref; | ||
346 | #endif | ||
349 | #endif | 347 | #endif |
350 | }; | 348 | }; |
351 | #ifndef MODULE_ARCH_INIT | 349 | #ifndef MODULE_ARCH_INIT |
@@ -395,13 +393,22 @@ void __symbol_put(const char *symbol); | |||
395 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) | 393 | #define symbol_put(x) __symbol_put(MODULE_SYMBOL_PREFIX #x) |
396 | void symbol_put_addr(void *addr); | 394 | void symbol_put_addr(void *addr); |
397 | 395 | ||
396 | static inline local_t *__module_ref_addr(struct module *mod, int cpu) | ||
397 | { | ||
398 | #ifdef CONFIG_SMP | ||
399 | return (local_t *) (mod->refptr + per_cpu_offset(cpu)); | ||
400 | #else | ||
401 | return &mod->ref; | ||
402 | #endif | ||
403 | } | ||
404 | |||
398 | /* Sometimes we know we already have a refcount, and it's easier not | 405 | /* Sometimes we know we already have a refcount, and it's easier not |
399 | to handle the error case (which only happens with rmmod --wait). */ | 406 | to handle the error case (which only happens with rmmod --wait). */ |
400 | static inline void __module_get(struct module *module) | 407 | static inline void __module_get(struct module *module) |
401 | { | 408 | { |
402 | if (module) { | 409 | if (module) { |
403 | BUG_ON(module_refcount(module) == 0); | 410 | BUG_ON(module_refcount(module) == 0); |
404 | local_inc(&module->ref[get_cpu()].count); | 411 | local_inc(__module_ref_addr(module, get_cpu())); |
405 | put_cpu(); | 412 | put_cpu(); |
406 | } | 413 | } |
407 | } | 414 | } |
@@ -413,7 +420,7 @@ static inline int try_module_get(struct module *module) | |||
413 | if (module) { | 420 | if (module) { |
414 | unsigned int cpu = get_cpu(); | 421 | unsigned int cpu = get_cpu(); |
415 | if (likely(module_is_live(module))) | 422 | if (likely(module_is_live(module))) |
416 | local_inc(&module->ref[cpu].count); | 423 | local_inc(__module_ref_addr(module, cpu)); |
417 | else | 424 | else |
418 | ret = 0; | 425 | ret = 0; |
419 | put_cpu(); | 426 | put_cpu(); |
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h index e0a9b207920d..ce38f1caa5e1 100644 --- a/include/linux/msdos_fs.h +++ b/include/linux/msdos_fs.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _LINUX_MSDOS_FS_H | 1 | #ifndef _LINUX_MSDOS_FS_H |
2 | #define _LINUX_MSDOS_FS_H | 2 | #define _LINUX_MSDOS_FS_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/magic.h> | 5 | #include <linux/magic.h> |
5 | #include <asm/byteorder.h> | 6 | #include <asm/byteorder.h> |
6 | 7 | ||
diff --git a/include/linux/neighbour.h b/include/linux/neighbour.h index bd3bbf668cdb..8730d5dae1bc 100644 --- a/include/linux/neighbour.h +++ b/include/linux/neighbour.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_NEIGHBOUR_H | 1 | #ifndef __LINUX_NEIGHBOUR_H |
2 | #define __LINUX_NEIGHBOUR_H | 2 | #define __LINUX_NEIGHBOUR_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
5 | 6 | ||
6 | struct ndmsg | 7 | struct ndmsg |
diff --git a/include/linux/netfilter/xt_conntrack.h b/include/linux/netfilter/xt_conntrack.h index f3fd83e46bab..8f5345275393 100644 --- a/include/linux/netfilter/xt_conntrack.h +++ b/include/linux/netfilter/xt_conntrack.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #ifndef _XT_CONNTRACK_H | 5 | #ifndef _XT_CONNTRACK_H |
6 | #define _XT_CONNTRACK_H | 6 | #define _XT_CONNTRACK_H |
7 | 7 | ||
8 | #include <linux/types.h> | ||
8 | #include <linux/netfilter/nf_conntrack_tuple_common.h> | 9 | #include <linux/netfilter/nf_conntrack_tuple_common.h> |
9 | 10 | ||
10 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) | 11 | #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1)) |
diff --git a/include/linux/nfs_idmap.h b/include/linux/nfs_idmap.h index 15a9f3b7289a..91a1c24e0cbf 100644 --- a/include/linux/nfs_idmap.h +++ b/include/linux/nfs_idmap.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #ifndef NFS_IDMAP_H | 37 | #ifndef NFS_IDMAP_H |
38 | #define NFS_IDMAP_H | 38 | #define NFS_IDMAP_H |
39 | 39 | ||
40 | #include <linux/types.h> | ||
41 | |||
40 | /* XXX from bits/utmp.h */ | 42 | /* XXX from bits/utmp.h */ |
41 | #define IDMAP_NAMESZ 128 | 43 | #define IDMAP_NAMESZ 128 |
42 | 44 | ||
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index 5431512b2757..bcd0201589f8 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -10,9 +10,8 @@ | |||
10 | #ifndef NFSD_EXPORT_H | 10 | #ifndef NFSD_EXPORT_H |
11 | #define NFSD_EXPORT_H | 11 | #define NFSD_EXPORT_H |
12 | 12 | ||
13 | #include <asm/types.h> | ||
14 | #ifdef __KERNEL__ | ||
15 | # include <linux/types.h> | 13 | # include <linux/types.h> |
14 | #ifdef __KERNEL__ | ||
16 | # include <linux/in.h> | 15 | # include <linux/in.h> |
17 | #endif | 16 | #endif |
18 | 17 | ||
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index b2e093870bc6..fa317f6c154b 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -14,9 +14,8 @@ | |||
14 | #ifndef _LINUX_NFSD_FH_H | 14 | #ifndef _LINUX_NFSD_FH_H |
15 | #define _LINUX_NFSD_FH_H | 15 | #define _LINUX_NFSD_FH_H |
16 | 16 | ||
17 | #include <asm/types.h> | ||
18 | #ifdef __KERNEL__ | ||
19 | # include <linux/types.h> | 17 | # include <linux/types.h> |
18 | #ifdef __KERNEL__ | ||
20 | # include <linux/string.h> | 19 | # include <linux/string.h> |
21 | # include <linux/fs.h> | 20 | # include <linux/fs.h> |
22 | #endif | 21 | #endif |
diff --git a/include/linux/nfsd/syscall.h b/include/linux/nfsd/syscall.h index 4e439765b705..7a3b565b898f 100644 --- a/include/linux/nfsd/syscall.h +++ b/include/linux/nfsd/syscall.h | |||
@@ -9,9 +9,8 @@ | |||
9 | #ifndef NFSD_SYSCALL_H | 9 | #ifndef NFSD_SYSCALL_H |
10 | #define NFSD_SYSCALL_H | 10 | #define NFSD_SYSCALL_H |
11 | 11 | ||
12 | #include <asm/types.h> | ||
13 | #ifdef __KERNEL__ | ||
14 | # include <linux/types.h> | 12 | # include <linux/types.h> |
13 | #ifdef __KERNEL__ | ||
15 | # include <linux/in.h> | 14 | # include <linux/in.h> |
16 | #endif | 15 | #endif |
17 | #include <linux/posix_types.h> | 16 | #include <linux/posix_types.h> |
diff --git a/include/linux/nubus.h b/include/linux/nubus.h index c4355076d1a5..7382af374731 100644 --- a/include/linux/nubus.h +++ b/include/linux/nubus.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef LINUX_NUBUS_H | 12 | #ifndef LINUX_NUBUS_H |
13 | #define LINUX_NUBUS_H | 13 | #define LINUX_NUBUS_H |
14 | 14 | ||
15 | #include <linux/types.h> | ||
15 | #ifdef __KERNEL__ | 16 | #ifdef __KERNEL__ |
16 | #include <asm/nubus.h> | 17 | #include <asm/nubus.h> |
17 | #endif | 18 | #endif |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index febc10ed3858..52a9fe08451c 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2425,6 +2425,7 @@ | |||
2425 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 | 2425 | #define PCI_DEVICE_ID_INTEL_ICH7_0 0x27b8 |
2426 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 | 2426 | #define PCI_DEVICE_ID_INTEL_ICH7_1 0x27b9 |
2427 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 | 2427 | #define PCI_DEVICE_ID_INTEL_ICH7_30 0x27b0 |
2428 | #define PCI_DEVICE_ID_INTEL_TGP_LPC 0x27bc | ||
2428 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd | 2429 | #define PCI_DEVICE_ID_INTEL_ICH7_31 0x27bd |
2429 | #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da | 2430 | #define PCI_DEVICE_ID_INTEL_ICH7_17 0x27da |
2430 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd | 2431 | #define PCI_DEVICE_ID_INTEL_ICH7_19 0x27dd |
diff --git a/include/linux/phonet.h b/include/linux/phonet.h index 4157faa857b6..ee5e3c9e2bca 100644 --- a/include/linux/phonet.h +++ b/include/linux/phonet.h | |||
@@ -23,6 +23,8 @@ | |||
23 | #ifndef LINUX_PHONET_H | 23 | #ifndef LINUX_PHONET_H |
24 | #define LINUX_PHONET_H | 24 | #define LINUX_PHONET_H |
25 | 25 | ||
26 | #include <linux/types.h> | ||
27 | |||
26 | /* Automatic protocol selection */ | 28 | /* Automatic protocol selection */ |
27 | #define PN_PROTO_TRANSPORT 0 | 29 | #define PN_PROTO_TRANSPORT 0 |
28 | /* Phonet datagram socket */ | 30 | /* Phonet datagram socket */ |
diff --git a/include/linux/pkt_cls.h b/include/linux/pkt_cls.h index e6aa8482ad7a..3c842edff388 100644 --- a/include/linux/pkt_cls.h +++ b/include/linux/pkt_cls.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_PKT_CLS_H | 1 | #ifndef __LINUX_PKT_CLS_H |
2 | #define __LINUX_PKT_CLS_H | 2 | #define __LINUX_PKT_CLS_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_sched.h> | 5 | #include <linux/pkt_sched.h> |
5 | 6 | ||
6 | /* I think i could have done better macros ; for now this is stolen from | 7 | /* I think i could have done better macros ; for now this is stolen from |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index e3f133adba78..b2648e8e4987 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __LINUX_PKT_SCHED_H | 1 | #ifndef __LINUX_PKT_SCHED_H |
2 | #define __LINUX_PKT_SCHED_H | 2 | #define __LINUX_PKT_SCHED_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | /* Logical priority bands not depending on specific packet scheduler. | 6 | /* Logical priority bands not depending on specific packet scheduler. |
5 | Every scheduler will map them to real traffic classes, if it has | 7 | Every scheduler will map them to real traffic classes, if it has |
6 | no more precise mechanism to classify packets. | 8 | no more precise mechanism to classify packets. |
diff --git a/include/linux/ppp_defs.h b/include/linux/ppp_defs.h index 6e8adc77522c..1c866bda2018 100644 --- a/include/linux/ppp_defs.h +++ b/include/linux/ppp_defs.h | |||
@@ -25,6 +25,8 @@ | |||
25 | * OR MODIFICATIONS. | 25 | * OR MODIFICATIONS. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include <linux/types.h> | ||
29 | |||
28 | /* | 30 | /* |
29 | * ==FILEVERSION 20000114== | 31 | * ==FILEVERSION 20000114== |
30 | * | 32 | * |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index 9491026afe66..6ba830fa8538 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -15,6 +15,8 @@ | |||
15 | #ifndef _MD_P_H | 15 | #ifndef _MD_P_H |
16 | #define _MD_P_H | 16 | #define _MD_P_H |
17 | 17 | ||
18 | #include <linux/types.h> | ||
19 | |||
18 | /* | 20 | /* |
19 | * RAID superblock. | 21 | * RAID superblock. |
20 | * | 22 | * |
diff --git a/include/linux/random.h b/include/linux/random.h index 407ea3646f8f..25d02fe5c9b5 100644 --- a/include/linux/random.h +++ b/include/linux/random.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #ifndef _LINUX_RANDOM_H | 7 | #ifndef _LINUX_RANDOM_H |
8 | #define _LINUX_RANDOM_H | 8 | #define _LINUX_RANDOM_H |
9 | 9 | ||
10 | #include <linux/types.h> | ||
10 | #include <linux/ioctl.h> | 11 | #include <linux/ioctl.h> |
11 | #include <linux/irqnr.h> | 12 | #include <linux/irqnr.h> |
12 | 13 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index e88f7058b3a1..1e5f6730ff31 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_RTNETLINK_H | 1 | #ifndef __LINUX_RTNETLINK_H |
2 | #define __LINUX_RTNETLINK_H | 2 | #define __LINUX_RTNETLINK_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/netlink.h> | 5 | #include <linux/netlink.h> |
5 | #include <linux/if_link.h> | 6 | #include <linux/if_link.h> |
6 | #include <linux/if_addr.h> | 7 | #include <linux/if_addr.h> |
diff --git a/include/linux/signalfd.h b/include/linux/signalfd.h index bef0c46d4713..b363b916c909 100644 --- a/include/linux/signalfd.h +++ b/include/linux/signalfd.h | |||
@@ -8,6 +8,7 @@ | |||
8 | #ifndef _LINUX_SIGNALFD_H | 8 | #ifndef _LINUX_SIGNALFD_H |
9 | #define _LINUX_SIGNALFD_H | 9 | #define _LINUX_SIGNALFD_H |
10 | 10 | ||
11 | #include <linux/types.h> | ||
11 | /* For O_CLOEXEC and O_NONBLOCK */ | 12 | /* For O_CLOEXEC and O_NONBLOCK */ |
12 | #include <linux/fcntl.h> | 13 | #include <linux/fcntl.h> |
13 | 14 | ||
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h index 39c3a5eb8ebe..6ca6a7b66d75 100644 --- a/include/linux/slab_def.h +++ b/include/linux/slab_def.h | |||
@@ -43,10 +43,7 @@ static inline void *kmalloc(size_t size, gfp_t flags) | |||
43 | i++; | 43 | i++; |
44 | #include <linux/kmalloc_sizes.h> | 44 | #include <linux/kmalloc_sizes.h> |
45 | #undef CACHE | 45 | #undef CACHE |
46 | { | 46 | return NULL; |
47 | extern void __you_cannot_kmalloc_that_much(void); | ||
48 | __you_cannot_kmalloc_that_much(); | ||
49 | } | ||
50 | found: | 47 | found: |
51 | #ifdef CONFIG_ZONE_DMA | 48 | #ifdef CONFIG_ZONE_DMA |
52 | if (flags & GFP_DMA) | 49 | if (flags & GFP_DMA) |
@@ -77,10 +74,7 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node) | |||
77 | i++; | 74 | i++; |
78 | #include <linux/kmalloc_sizes.h> | 75 | #include <linux/kmalloc_sizes.h> |
79 | #undef CACHE | 76 | #undef CACHE |
80 | { | 77 | return NULL; |
81 | extern void __you_cannot_kmalloc_that_much(void); | ||
82 | __you_cannot_kmalloc_that_much(); | ||
83 | } | ||
84 | found: | 78 | found: |
85 | #ifdef CONFIG_ZONE_DMA | 79 | #ifdef CONFIG_ZONE_DMA |
86 | if (flags & GFP_DMA) | 80 | if (flags & GFP_DMA) |
diff --git a/include/linux/sound.h b/include/linux/sound.h index 9e2a94feed6b..44dcf0570432 100644 --- a/include/linux/sound.h +++ b/include/linux/sound.h | |||
@@ -25,6 +25,7 @@ | |||
25 | #define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ | 25 | #define SND_DEV_AMIDI 13 /* Like /dev/midi (obsolete) */ |
26 | #define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ | 26 | #define SND_DEV_ADMMIDI 14 /* Like /dev/dmmidi (onsolete) */ |
27 | 27 | ||
28 | #ifdef __KERNEL__ | ||
28 | /* | 29 | /* |
29 | * Sound core interface functions | 30 | * Sound core interface functions |
30 | */ | 31 | */ |
@@ -40,3 +41,4 @@ extern void unregister_sound_special(int unit); | |||
40 | extern void unregister_sound_mixer(int unit); | 41 | extern void unregister_sound_mixer(int unit); |
41 | extern void unregister_sound_midi(int unit); | 42 | extern void unregister_sound_midi(int unit); |
42 | extern void unregister_sound_dsp(int unit); | 43 | extern void unregister_sound_dsp(int unit); |
44 | #endif /* __KERNEL__ */ | ||
diff --git a/include/linux/spi/spidev.h b/include/linux/spi/spidev.h index c93ef9d42a01..95251ccd5a07 100644 --- a/include/linux/spi/spidev.h +++ b/include/linux/spi/spidev.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #ifndef SPIDEV_H | 22 | #ifndef SPIDEV_H |
23 | #define SPIDEV_H | 23 | #define SPIDEV_H |
24 | 24 | ||
25 | #include <linux/types.h> | ||
25 | 26 | ||
26 | /* User space versions of kernel symbols for SPI clocking modes, | 27 | /* User space versions of kernel symbols for SPI clocking modes, |
27 | * matching <linux/spi/spi.h> | 28 | * matching <linux/spi/spi.h> |
diff --git a/include/linux/synclink.h b/include/linux/synclink.h index c844a229acc9..99b8bdb17b2b 100644 --- a/include/linux/synclink.h +++ b/include/linux/synclink.h | |||
@@ -13,6 +13,8 @@ | |||
13 | #define _SYNCLINK_H_ | 13 | #define _SYNCLINK_H_ |
14 | #define SYNCLINK_H_VERSION 3.6 | 14 | #define SYNCLINK_H_VERSION 3.6 |
15 | 15 | ||
16 | #include <linux/types.h> | ||
17 | |||
16 | #define BIT0 0x0001 | 18 | #define BIT0 0x0001 |
17 | #define BIT1 0x0002 | 19 | #define BIT1 0x0002 |
18 | #define BIT2 0x0004 | 20 | #define BIT2 0x0004 |
diff --git a/include/linux/taskstats.h b/include/linux/taskstats.h index 18269e956a71..341dddb55090 100644 --- a/include/linux/taskstats.h +++ b/include/linux/taskstats.h | |||
@@ -16,6 +16,8 @@ | |||
16 | #ifndef _LINUX_TASKSTATS_H | 16 | #ifndef _LINUX_TASKSTATS_H |
17 | #define _LINUX_TASKSTATS_H | 17 | #define _LINUX_TASKSTATS_H |
18 | 18 | ||
19 | #include <linux/types.h> | ||
20 | |||
19 | /* Format for per-task data returned to userland when | 21 | /* Format for per-task data returned to userland when |
20 | * - a task exits | 22 | * - a task exits |
21 | * - listener requests stats for a task | 23 | * - listener requests stats for a task |
diff --git a/include/linux/tc_act/tc_gact.h b/include/linux/tc_act/tc_gact.h index 23a03eb630db..e895c0a39629 100644 --- a/include/linux/tc_act/tc_gact.h +++ b/include/linux/tc_act/tc_gact.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_GACT_H | 1 | #ifndef __LINUX_TC_GACT_H |
2 | #define __LINUX_TC_GACT_H | 2 | #define __LINUX_TC_GACT_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | #define TCA_ACT_GACT 5 | 7 | #define TCA_ACT_GACT 5 |
diff --git a/include/linux/tc_act/tc_mirred.h b/include/linux/tc_act/tc_mirred.h index 71d63409d568..0a99ab60d610 100644 --- a/include/linux/tc_act/tc_mirred.h +++ b/include/linux/tc_act/tc_mirred.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_MIR_H | 1 | #ifndef __LINUX_TC_MIR_H |
2 | #define __LINUX_TC_MIR_H | 2 | #define __LINUX_TC_MIR_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | #define TCA_ACT_MIRRED 8 | 7 | #define TCA_ACT_MIRRED 8 |
diff --git a/include/linux/tc_act/tc_pedit.h b/include/linux/tc_act/tc_pedit.h index 83e56e32e8e0..54ce9064115a 100644 --- a/include/linux/tc_act/tc_pedit.h +++ b/include/linux/tc_act/tc_pedit.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_PED_H | 1 | #ifndef __LINUX_TC_PED_H |
2 | #define __LINUX_TC_PED_H | 2 | #define __LINUX_TC_PED_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | #define TCA_ACT_PEDIT 7 | 7 | #define TCA_ACT_PEDIT 7 |
diff --git a/include/linux/tc_ematch/tc_em_cmp.h b/include/linux/tc_ematch/tc_em_cmp.h index c7f4d43618fd..38e7f7b25ec2 100644 --- a/include/linux/tc_ematch/tc_em_cmp.h +++ b/include/linux/tc_ematch/tc_em_cmp.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_EM_CMP_H | 1 | #ifndef __LINUX_TC_EM_CMP_H |
2 | #define __LINUX_TC_EM_CMP_H | 2 | #define __LINUX_TC_EM_CMP_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | struct tcf_em_cmp | 7 | struct tcf_em_cmp |
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index c50d2ba5caf0..dcfb733fa1f6 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_EM_META_H | 1 | #ifndef __LINUX_TC_EM_META_H |
2 | #define __LINUX_TC_EM_META_H | 2 | #define __LINUX_TC_EM_META_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | enum | 7 | enum |
diff --git a/include/linux/tc_ematch/tc_em_nbyte.h b/include/linux/tc_ematch/tc_em_nbyte.h index f19d1f58ec9d..9ed8c2e58488 100644 --- a/include/linux/tc_ematch/tc_em_nbyte.h +++ b/include/linux/tc_ematch/tc_em_nbyte.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_EM_NBYTE_H | 1 | #ifndef __LINUX_TC_EM_NBYTE_H |
2 | #define __LINUX_TC_EM_NBYTE_H | 2 | #define __LINUX_TC_EM_NBYTE_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | struct tcf_em_nbyte | 7 | struct tcf_em_nbyte |
diff --git a/include/linux/tc_ematch/tc_em_text.h b/include/linux/tc_ematch/tc_em_text.h index 7cd43e99c7f5..d12a73a225fc 100644 --- a/include/linux/tc_ematch/tc_em_text.h +++ b/include/linux/tc_ematch/tc_em_text.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __LINUX_TC_EM_TEXT_H | 1 | #ifndef __LINUX_TC_EM_TEXT_H |
2 | #define __LINUX_TC_EM_TEXT_H | 2 | #define __LINUX_TC_EM_TEXT_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
4 | #include <linux/pkt_cls.h> | 5 | #include <linux/pkt_cls.h> |
5 | 6 | ||
6 | #define TC_EM_TEXT_ALGOSIZ 16 | 7 | #define TC_EM_TEXT_ALGOSIZ 16 |
diff --git a/include/linux/usb/cdc.h b/include/linux/usb/cdc.h index 18a729343ffa..3c86ed25a04c 100644 --- a/include/linux/usb/cdc.h +++ b/include/linux/usb/cdc.h | |||
@@ -9,6 +9,8 @@ | |||
9 | #ifndef __LINUX_USB_CDC_H | 9 | #ifndef __LINUX_USB_CDC_H |
10 | #define __LINUX_USB_CDC_H | 10 | #define __LINUX_USB_CDC_H |
11 | 11 | ||
12 | #include <linux/types.h> | ||
13 | |||
12 | #define USB_CDC_SUBCLASS_ACM 0x02 | 14 | #define USB_CDC_SUBCLASS_ACM 0x02 |
13 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 | 15 | #define USB_CDC_SUBCLASS_ETHERNET 0x06 |
14 | #define USB_CDC_SUBCLASS_WHCM 0x08 | 16 | #define USB_CDC_SUBCLASS_WHCM 0x08 |
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h index ea45f265ec05..612102e4d75e 100644 --- a/include/linux/usb/gadgetfs.h +++ b/include/linux/usb/gadgetfs.h | |||
@@ -18,7 +18,7 @@ | |||
18 | #ifndef __LINUX_USB_GADGETFS_H | 18 | #ifndef __LINUX_USB_GADGETFS_H |
19 | #define __LINUX_USB_GADGETFS_H | 19 | #define __LINUX_USB_GADGETFS_H |
20 | 20 | ||
21 | #include <asm/types.h> | 21 | #include <linux/types.h> |
22 | #include <asm/ioctl.h> | 22 | #include <asm/ioctl.h> |
23 | 23 | ||
24 | #include <linux/usb/ch9.h> | 24 | #include <linux/usb/ch9.h> |
diff --git a/include/linux/video_decoder.h b/include/linux/video_decoder.h index 121e26da2c18..e26c0c86a6ea 100644 --- a/include/linux/video_decoder.h +++ b/include/linux/video_decoder.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_VIDEO_DECODER_H | 1 | #ifndef _LINUX_VIDEO_DECODER_H |
2 | #define _LINUX_VIDEO_DECODER_H | 2 | #define _LINUX_VIDEO_DECODER_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #define HAVE_VIDEO_DECODER 1 | 6 | #define HAVE_VIDEO_DECODER 1 |
5 | 7 | ||
6 | struct video_decoder_capability { /* this name is too long */ | 8 | struct video_decoder_capability { /* this name is too long */ |
diff --git a/include/linux/video_encoder.h b/include/linux/video_encoder.h index 4b0e6907a7b4..b7b6423bbb8a 100644 --- a/include/linux/video_encoder.h +++ b/include/linux/video_encoder.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _LINUX_VIDEO_ENCODER_H | 1 | #ifndef _LINUX_VIDEO_ENCODER_H |
2 | #define _LINUX_VIDEO_ENCODER_H | 2 | #define _LINUX_VIDEO_ENCODER_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | struct video_encoder_capability { /* this name is too long */ | 6 | struct video_encoder_capability { /* this name is too long */ |
5 | __u32 flags; | 7 | __u32 flags; |
6 | #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ | 8 | #define VIDEO_ENCODER_PAL 1 /* can encode PAL signal */ |
diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 15a653d41132..837f392fbe97 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef __LINUX_VIDEODEV_H | 12 | #ifndef __LINUX_VIDEODEV_H |
13 | #define __LINUX_VIDEODEV_H | 13 | #define __LINUX_VIDEODEV_H |
14 | 14 | ||
15 | #include <linux/types.h> | ||
15 | #include <linux/ioctl.h> | 16 | #include <linux/ioctl.h> |
16 | #include <linux/videodev2.h> | 17 | #include <linux/videodev2.h> |
17 | 18 | ||
diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index c1aef85243bf..94c56d29869d 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_VIRTIO_BLK_H | 2 | #define _LINUX_VIRTIO_BLK_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | ||
5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
6 | 7 | ||
7 | /* The ID for virtio_block */ | 8 | /* The ID for virtio_block */ |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index 7615ffcdd555..dc161115ae35 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -1,5 +1,6 @@ | |||
1 | #ifndef _LINUX_VIRTIO_CONSOLE_H | 1 | #ifndef _LINUX_VIRTIO_CONSOLE_H |
2 | #define _LINUX_VIRTIO_CONSOLE_H | 2 | #define _LINUX_VIRTIO_CONSOLE_H |
3 | #include <linux/types.h> | ||
3 | #include <linux/virtio_config.h> | 4 | #include <linux/virtio_config.h> |
4 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 5 | /* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
5 | * anyone can use the definitions to implement compatible drivers/servers. */ | 6 | * anyone can use the definitions to implement compatible drivers/servers. */ |
diff --git a/include/linux/virtio_net.h b/include/linux/virtio_net.h index 5cdd0aa8bde9..3efa86c3ecb3 100644 --- a/include/linux/virtio_net.h +++ b/include/linux/virtio_net.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define _LINUX_VIRTIO_NET_H | 2 | #define _LINUX_VIRTIO_NET_H |
3 | /* This header is BSD licensed so anyone can use the definitions to implement | 3 | /* This header is BSD licensed so anyone can use the definitions to implement |
4 | * compatible drivers/servers. */ | 4 | * compatible drivers/servers. */ |
5 | #include <linux/types.h> | ||
5 | #include <linux/virtio_config.h> | 6 | #include <linux/virtio_config.h> |
6 | 7 | ||
7 | /* The ID for virtio_net */ | 8 | /* The ID for virtio_net */ |
diff --git a/include/media/v4l2-device.h b/include/media/v4l2-device.h index 9bf4ccc93dbf..55e41afd95ef 100644 --- a/include/media/v4l2-device.h +++ b/include/media/v4l2-device.h | |||
@@ -94,16 +94,16 @@ void v4l2_device_unregister_subdev(struct v4l2_subdev *sd); | |||
94 | /* Call the specified callback for all subdevs matching grp_id (if 0, then | 94 | /* Call the specified callback for all subdevs matching grp_id (if 0, then |
95 | match them all). Ignore any errors. Note that you cannot add or delete | 95 | match them all). Ignore any errors. Note that you cannot add or delete |
96 | a subdev while walking the subdevs list. */ | 96 | a subdev while walking the subdevs list. */ |
97 | #define v4l2_device_call_all(dev, grp_id, o, f, args...) \ | 97 | #define v4l2_device_call_all(dev, grpid, o, f, args...) \ |
98 | __v4l2_device_call_subdevs(dev, \ | 98 | __v4l2_device_call_subdevs(dev, \ |
99 | !(grp_id) || sd->grp_id == (grp_id), o, f , ##args) | 99 | !(grpid) || sd->grp_id == (grpid), o, f , ##args) |
100 | 100 | ||
101 | /* Call the specified callback for all subdevs matching grp_id (if 0, then | 101 | /* Call the specified callback for all subdevs matching grp_id (if 0, then |
102 | match them all). If the callback returns an error other than 0 or | 102 | match them all). If the callback returns an error other than 0 or |
103 | -ENOIOCTLCMD, then return with that error code. Note that you cannot | 103 | -ENOIOCTLCMD, then return with that error code. Note that you cannot |
104 | add or delete a subdev while walking the subdevs list. */ | 104 | add or delete a subdev while walking the subdevs list. */ |
105 | #define v4l2_device_call_until_err(dev, grp_id, o, f, args...) \ | 105 | #define v4l2_device_call_until_err(dev, grpid, o, f, args...) \ |
106 | __v4l2_device_call_subdevs_until_err(dev, \ | 106 | __v4l2_device_call_subdevs_until_err(dev, \ |
107 | !(grp_id) || sd->grp_id == (grp_id), o, f , ##args) | 107 | !(grpid) || sd->grp_id == (grpid), o, f , ##args) |
108 | 108 | ||
109 | #endif | 109 | #endif |
diff --git a/include/mtd/inftl-user.h b/include/mtd/inftl-user.h index e17eda302b2d..d409d489d900 100644 --- a/include/mtd/inftl-user.h +++ b/include/mtd/inftl-user.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __MTD_INFTL_USER_H__ | 6 | #ifndef __MTD_INFTL_USER_H__ |
7 | #define __MTD_INFTL_USER_H__ | 7 | #define __MTD_INFTL_USER_H__ |
8 | 8 | ||
9 | #include <linux/types.h> | ||
10 | |||
9 | #define OSAK_VERSION 0x5120 | 11 | #define OSAK_VERSION 0x5120 |
10 | #define PERCENTUSED 98 | 12 | #define PERCENTUSED 98 |
11 | 13 | ||
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index f44bb5c77a70..d0a043153cc6 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h | |||
@@ -182,7 +182,7 @@ static inline int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo) | |||
182 | size = 2048; | 182 | size = 2048; |
183 | if (nr_pcpus >= 32) | 183 | if (nr_pcpus >= 32) |
184 | size = 4096; | 184 | size = 4096; |
185 | if (sizeof(rwlock_t) != 0) { | 185 | if (sizeof(spinlock_t) != 0) { |
186 | #ifdef CONFIG_NUMA | 186 | #ifdef CONFIG_NUMA |
187 | if (size * sizeof(spinlock_t) > PAGE_SIZE) | 187 | if (size * sizeof(spinlock_t) > PAGE_SIZE) |
188 | hashinfo->ehash_locks = vmalloc(size * sizeof(spinlock_t)); | 188 | hashinfo->ehash_locks = vmalloc(size * sizeof(spinlock_t)); |
diff --git a/include/sound/hdsp.h b/include/sound/hdsp.h index dec6b1dc37ea..d98a78dff2db 100644 --- a/include/sound/hdsp.h +++ b/include/sound/hdsp.h | |||
@@ -19,6 +19,8 @@ | |||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/types.h> | ||
23 | |||
22 | #define HDSP_MATRIX_MIXER_SIZE 2048 | 24 | #define HDSP_MATRIX_MIXER_SIZE 2048 |
23 | 25 | ||
24 | enum HDSP_IO_Type { | 26 | enum HDSP_IO_Type { |
diff --git a/include/video/sisfb.h b/include/video/sisfb.h index e402eb5b3c7a..fdd74f1a6791 100644 --- a/include/video/sisfb.h +++ b/include/video/sisfb.h | |||
@@ -21,8 +21,8 @@ | |||
21 | #ifndef _LINUX_SISFB_H_ | 21 | #ifndef _LINUX_SISFB_H_ |
22 | #define _LINUX_SISFB_H_ | 22 | #define _LINUX_SISFB_H_ |
23 | 23 | ||
24 | #include <linux/types.h> | ||
24 | #include <asm/ioctl.h> | 25 | #include <asm/ioctl.h> |
25 | #include <asm/types.h> | ||
26 | 26 | ||
27 | /**********************************************/ | 27 | /**********************************************/ |
28 | /* PUBLIC */ | 28 | /* PUBLIC */ |
diff --git a/include/video/uvesafb.h b/include/video/uvesafb.h index 95bcef193954..0993a220a3e6 100644 --- a/include/video/uvesafb.h +++ b/include/video/uvesafb.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _UVESAFB_H | 1 | #ifndef _UVESAFB_H |
2 | #define _UVESAFB_H | 2 | #define _UVESAFB_H |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | struct v86_regs { | 6 | struct v86_regs { |
5 | __u32 ebx; | 7 | __u32 ebx; |
6 | __u32 ecx; | 8 | __u32 ecx; |
@@ -368,14 +368,14 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) | |||
368 | file = hugetlb_file_setup(name, size); | 368 | file = hugetlb_file_setup(name, size); |
369 | shp->mlock_user = current_user(); | 369 | shp->mlock_user = current_user(); |
370 | } else { | 370 | } else { |
371 | int acctflag = VM_ACCOUNT; | 371 | int acctflag = 0; |
372 | /* | 372 | /* |
373 | * Do not allow no accounting for OVERCOMMIT_NEVER, even | 373 | * Do not allow no accounting for OVERCOMMIT_NEVER, even |
374 | * if it's asked for. | 374 | * if it's asked for. |
375 | */ | 375 | */ |
376 | if ((shmflg & SHM_NORESERVE) && | 376 | if ((shmflg & SHM_NORESERVE) && |
377 | sysctl_overcommit_memory != OVERCOMMIT_NEVER) | 377 | sysctl_overcommit_memory != OVERCOMMIT_NEVER) |
378 | acctflag = 0; | 378 | acctflag = VM_NORESERVE; |
379 | file = shmem_file_setup(name, size, acctflag); | 379 | file = shmem_file_setup(name, size, acctflag); |
380 | } | 380 | } |
381 | error = PTR_ERR(file); | 381 | error = PTR_ERR(file); |
diff --git a/kernel/cpuset.c b/kernel/cpuset.c index a85678865c5e..f76db9dcaa05 100644 --- a/kernel/cpuset.c +++ b/kernel/cpuset.c | |||
@@ -61,6 +61,14 @@ | |||
61 | #include <linux/cgroup.h> | 61 | #include <linux/cgroup.h> |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * Workqueue for cpuset related tasks. | ||
65 | * | ||
66 | * Using kevent workqueue may cause deadlock when memory_migrate | ||
67 | * is set. So we create a separate workqueue thread for cpuset. | ||
68 | */ | ||
69 | static struct workqueue_struct *cpuset_wq; | ||
70 | |||
71 | /* | ||
64 | * Tracks how many cpusets are currently defined in system. | 72 | * Tracks how many cpusets are currently defined in system. |
65 | * When there is only one cpuset (the root cpuset) we can | 73 | * When there is only one cpuset (the root cpuset) we can |
66 | * short circuit some hooks. | 74 | * short circuit some hooks. |
@@ -831,7 +839,7 @@ static DECLARE_WORK(rebuild_sched_domains_work, do_rebuild_sched_domains); | |||
831 | */ | 839 | */ |
832 | static void async_rebuild_sched_domains(void) | 840 | static void async_rebuild_sched_domains(void) |
833 | { | 841 | { |
834 | schedule_work(&rebuild_sched_domains_work); | 842 | queue_work(cpuset_wq, &rebuild_sched_domains_work); |
835 | } | 843 | } |
836 | 844 | ||
837 | /* | 845 | /* |
@@ -2111,6 +2119,9 @@ void __init cpuset_init_smp(void) | |||
2111 | 2119 | ||
2112 | hotcpu_notifier(cpuset_track_online_cpus, 0); | 2120 | hotcpu_notifier(cpuset_track_online_cpus, 0); |
2113 | hotplug_memory_notifier(cpuset_track_online_nodes, 10); | 2121 | hotplug_memory_notifier(cpuset_track_online_nodes, 10); |
2122 | |||
2123 | cpuset_wq = create_singlethread_workqueue("cpuset"); | ||
2124 | BUG_ON(!cpuset_wq); | ||
2114 | } | 2125 | } |
2115 | 2126 | ||
2116 | /** | 2127 | /** |
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index f33afb0407bc..f394d2a42ca3 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
@@ -501,6 +501,13 @@ static void hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base) | |||
501 | continue; | 501 | continue; |
502 | timer = rb_entry(base->first, struct hrtimer, node); | 502 | timer = rb_entry(base->first, struct hrtimer, node); |
503 | expires = ktime_sub(hrtimer_get_expires(timer), base->offset); | 503 | expires = ktime_sub(hrtimer_get_expires(timer), base->offset); |
504 | /* | ||
505 | * clock_was_set() has changed base->offset so the | ||
506 | * result might be negative. Fix it up to prevent a | ||
507 | * false positive in clockevents_program_event() | ||
508 | */ | ||
509 | if (expires.tv64 < 0) | ||
510 | expires.tv64 = 0; | ||
504 | if (expires.tv64 < cpu_base->expires_next.tv64) | 511 | if (expires.tv64 < cpu_base->expires_next.tv64) |
505 | cpu_base->expires_next = expires; | 512 | cpu_base->expires_next = expires; |
506 | } | 513 | } |
@@ -1158,6 +1165,29 @@ static void __run_hrtimer(struct hrtimer *timer) | |||
1158 | 1165 | ||
1159 | #ifdef CONFIG_HIGH_RES_TIMERS | 1166 | #ifdef CONFIG_HIGH_RES_TIMERS |
1160 | 1167 | ||
1168 | static int force_clock_reprogram; | ||
1169 | |||
1170 | /* | ||
1171 | * After 5 iteration's attempts, we consider that hrtimer_interrupt() | ||
1172 | * is hanging, which could happen with something that slows the interrupt | ||
1173 | * such as the tracing. Then we force the clock reprogramming for each future | ||
1174 | * hrtimer interrupts to avoid infinite loops and use the min_delta_ns | ||
1175 | * threshold that we will overwrite. | ||
1176 | * The next tick event will be scheduled to 3 times we currently spend on | ||
1177 | * hrtimer_interrupt(). This gives a good compromise, the cpus will spend | ||
1178 | * 1/4 of their time to process the hrtimer interrupts. This is enough to | ||
1179 | * let it running without serious starvation. | ||
1180 | */ | ||
1181 | |||
1182 | static inline void | ||
1183 | hrtimer_interrupt_hanging(struct clock_event_device *dev, | ||
1184 | ktime_t try_time) | ||
1185 | { | ||
1186 | force_clock_reprogram = 1; | ||
1187 | dev->min_delta_ns = (unsigned long)try_time.tv64 * 3; | ||
1188 | printk(KERN_WARNING "hrtimer: interrupt too slow, " | ||
1189 | "forcing clock min delta to %lu ns\n", dev->min_delta_ns); | ||
1190 | } | ||
1161 | /* | 1191 | /* |
1162 | * High resolution timer interrupt | 1192 | * High resolution timer interrupt |
1163 | * Called with interrupts disabled | 1193 | * Called with interrupts disabled |
@@ -1167,6 +1197,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) | |||
1167 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); | 1197 | struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases); |
1168 | struct hrtimer_clock_base *base; | 1198 | struct hrtimer_clock_base *base; |
1169 | ktime_t expires_next, now; | 1199 | ktime_t expires_next, now; |
1200 | int nr_retries = 0; | ||
1170 | int i; | 1201 | int i; |
1171 | 1202 | ||
1172 | BUG_ON(!cpu_base->hres_active); | 1203 | BUG_ON(!cpu_base->hres_active); |
@@ -1174,6 +1205,10 @@ void hrtimer_interrupt(struct clock_event_device *dev) | |||
1174 | dev->next_event.tv64 = KTIME_MAX; | 1205 | dev->next_event.tv64 = KTIME_MAX; |
1175 | 1206 | ||
1176 | retry: | 1207 | retry: |
1208 | /* 5 retries is enough to notice a hang */ | ||
1209 | if (!(++nr_retries % 5)) | ||
1210 | hrtimer_interrupt_hanging(dev, ktime_sub(ktime_get(), now)); | ||
1211 | |||
1177 | now = ktime_get(); | 1212 | now = ktime_get(); |
1178 | 1213 | ||
1179 | expires_next.tv64 = KTIME_MAX; | 1214 | expires_next.tv64 = KTIME_MAX; |
@@ -1226,7 +1261,7 @@ void hrtimer_interrupt(struct clock_event_device *dev) | |||
1226 | 1261 | ||
1227 | /* Reprogramming necessary ? */ | 1262 | /* Reprogramming necessary ? */ |
1228 | if (expires_next.tv64 != KTIME_MAX) { | 1263 | if (expires_next.tv64 != KTIME_MAX) { |
1229 | if (tick_program_event(expires_next, 0)) | 1264 | if (tick_program_event(expires_next, force_clock_reprogram)) |
1230 | goto retry; | 1265 | goto retry; |
1231 | } | 1266 | } |
1232 | } | 1267 | } |
@@ -1580,6 +1615,10 @@ static int __cpuinit hrtimer_cpu_notify(struct notifier_block *self, | |||
1580 | break; | 1615 | break; |
1581 | 1616 | ||
1582 | #ifdef CONFIG_HOTPLUG_CPU | 1617 | #ifdef CONFIG_HOTPLUG_CPU |
1618 | case CPU_DYING: | ||
1619 | case CPU_DYING_FROZEN: | ||
1620 | clockevents_notify(CLOCK_EVT_NOTIFY_CPU_DYING, &scpu); | ||
1621 | break; | ||
1583 | case CPU_DEAD: | 1622 | case CPU_DEAD: |
1584 | case CPU_DEAD_FROZEN: | 1623 | case CPU_DEAD_FROZEN: |
1585 | { | 1624 | { |
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index f63c706d25e1..7de11bd64dfe 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -383,6 +383,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc) | |||
383 | out_unlock: | 383 | out_unlock: |
384 | spin_unlock(&desc->lock); | 384 | spin_unlock(&desc->lock); |
385 | } | 385 | } |
386 | EXPORT_SYMBOL_GPL(handle_level_irq); | ||
386 | 387 | ||
387 | /** | 388 | /** |
388 | * handle_fasteoi_irq - irq handler for transparent controllers | 389 | * handle_fasteoi_irq - irq handler for transparent controllers |
@@ -593,6 +594,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
593 | } | 594 | } |
594 | spin_unlock_irqrestore(&desc->lock, flags); | 595 | spin_unlock_irqrestore(&desc->lock, flags); |
595 | } | 596 | } |
597 | EXPORT_SYMBOL_GPL(__set_irq_handler); | ||
596 | 598 | ||
597 | void | 599 | void |
598 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | 600 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, |
diff --git a/kernel/module.c b/kernel/module.c index e8b51d41dd72..ba22484a987e 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -573,13 +573,13 @@ static char last_unloaded_module[MODULE_NAME_LEN+1]; | |||
573 | /* Init the unload section of the module. */ | 573 | /* Init the unload section of the module. */ |
574 | static void module_unload_init(struct module *mod) | 574 | static void module_unload_init(struct module *mod) |
575 | { | 575 | { |
576 | unsigned int i; | 576 | int cpu; |
577 | 577 | ||
578 | INIT_LIST_HEAD(&mod->modules_which_use_me); | 578 | INIT_LIST_HEAD(&mod->modules_which_use_me); |
579 | for (i = 0; i < NR_CPUS; i++) | 579 | for_each_possible_cpu(cpu) |
580 | local_set(&mod->ref[i].count, 0); | 580 | local_set(__module_ref_addr(mod, cpu), 0); |
581 | /* Hold reference count during initialization. */ | 581 | /* Hold reference count during initialization. */ |
582 | local_set(&mod->ref[raw_smp_processor_id()].count, 1); | 582 | local_set(__module_ref_addr(mod, raw_smp_processor_id()), 1); |
583 | /* Backwards compatibility macros put refcount during init. */ | 583 | /* Backwards compatibility macros put refcount during init. */ |
584 | mod->waiter = current; | 584 | mod->waiter = current; |
585 | } | 585 | } |
@@ -717,10 +717,11 @@ static int try_stop_module(struct module *mod, int flags, int *forced) | |||
717 | 717 | ||
718 | unsigned int module_refcount(struct module *mod) | 718 | unsigned int module_refcount(struct module *mod) |
719 | { | 719 | { |
720 | unsigned int i, total = 0; | 720 | unsigned int total = 0; |
721 | int cpu; | ||
721 | 722 | ||
722 | for (i = 0; i < NR_CPUS; i++) | 723 | for_each_possible_cpu(cpu) |
723 | total += local_read(&mod->ref[i].count); | 724 | total += local_read(__module_ref_addr(mod, cpu)); |
724 | return total; | 725 | return total; |
725 | } | 726 | } |
726 | EXPORT_SYMBOL(module_refcount); | 727 | EXPORT_SYMBOL(module_refcount); |
@@ -894,7 +895,7 @@ void module_put(struct module *module) | |||
894 | { | 895 | { |
895 | if (module) { | 896 | if (module) { |
896 | unsigned int cpu = get_cpu(); | 897 | unsigned int cpu = get_cpu(); |
897 | local_dec(&module->ref[cpu].count); | 898 | local_dec(__module_ref_addr(module, cpu)); |
898 | /* Maybe they're waiting for us to drop reference? */ | 899 | /* Maybe they're waiting for us to drop reference? */ |
899 | if (unlikely(!module_is_live(module))) | 900 | if (unlikely(!module_is_live(module))) |
900 | wake_up_process(module->waiter); | 901 | wake_up_process(module->waiter); |
@@ -1464,7 +1465,10 @@ static void free_module(struct module *mod) | |||
1464 | kfree(mod->args); | 1465 | kfree(mod->args); |
1465 | if (mod->percpu) | 1466 | if (mod->percpu) |
1466 | percpu_modfree(mod->percpu); | 1467 | percpu_modfree(mod->percpu); |
1467 | 1468 | #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) | |
1469 | if (mod->refptr) | ||
1470 | percpu_modfree(mod->refptr); | ||
1471 | #endif | ||
1468 | /* Free lock-classes: */ | 1472 | /* Free lock-classes: */ |
1469 | lockdep_free_key_range(mod->module_core, mod->core_size); | 1473 | lockdep_free_key_range(mod->module_core, mod->core_size); |
1470 | 1474 | ||
@@ -2011,6 +2015,14 @@ static noinline struct module *load_module(void __user *umod, | |||
2011 | if (err < 0) | 2015 | if (err < 0) |
2012 | goto free_mod; | 2016 | goto free_mod; |
2013 | 2017 | ||
2018 | #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) | ||
2019 | mod->refptr = percpu_modalloc(sizeof(local_t), __alignof__(local_t), | ||
2020 | mod->name); | ||
2021 | if (!mod->refptr) { | ||
2022 | err = -ENOMEM; | ||
2023 | goto free_mod; | ||
2024 | } | ||
2025 | #endif | ||
2014 | if (pcpuindex) { | 2026 | if (pcpuindex) { |
2015 | /* We have a special allocation for this section. */ | 2027 | /* We have a special allocation for this section. */ |
2016 | percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, | 2028 | percpu = percpu_modalloc(sechdrs[pcpuindex].sh_size, |
@@ -2018,7 +2030,7 @@ static noinline struct module *load_module(void __user *umod, | |||
2018 | mod->name); | 2030 | mod->name); |
2019 | if (!percpu) { | 2031 | if (!percpu) { |
2020 | err = -ENOMEM; | 2032 | err = -ENOMEM; |
2021 | goto free_mod; | 2033 | goto free_percpu; |
2022 | } | 2034 | } |
2023 | sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; | 2035 | sechdrs[pcpuindex].sh_flags &= ~(unsigned long)SHF_ALLOC; |
2024 | mod->percpu = percpu; | 2036 | mod->percpu = percpu; |
@@ -2282,6 +2294,9 @@ static noinline struct module *load_module(void __user *umod, | |||
2282 | free_percpu: | 2294 | free_percpu: |
2283 | if (percpu) | 2295 | if (percpu) |
2284 | percpu_modfree(percpu); | 2296 | percpu_modfree(percpu); |
2297 | #if defined(CONFIG_MODULE_UNLOAD) && defined(CONFIG_SMP) | ||
2298 | percpu_modfree(mod->refptr); | ||
2299 | #endif | ||
2285 | free_mod: | 2300 | free_mod: |
2286 | kfree(args); | 2301 | kfree(args); |
2287 | free_hdr: | 2302 | free_hdr: |
diff --git a/kernel/sched.c b/kernel/sched.c index 52bbf1c842a8..242d0d47a70d 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -2266,6 +2266,16 @@ static int try_to_wake_up(struct task_struct *p, unsigned int state, int sync) | |||
2266 | if (!sched_feat(SYNC_WAKEUPS)) | 2266 | if (!sched_feat(SYNC_WAKEUPS)) |
2267 | sync = 0; | 2267 | sync = 0; |
2268 | 2268 | ||
2269 | if (!sync) { | ||
2270 | if (current->se.avg_overlap < sysctl_sched_migration_cost && | ||
2271 | p->se.avg_overlap < sysctl_sched_migration_cost) | ||
2272 | sync = 1; | ||
2273 | } else { | ||
2274 | if (current->se.avg_overlap >= sysctl_sched_migration_cost || | ||
2275 | p->se.avg_overlap >= sysctl_sched_migration_cost) | ||
2276 | sync = 0; | ||
2277 | } | ||
2278 | |||
2269 | #ifdef CONFIG_SMP | 2279 | #ifdef CONFIG_SMP |
2270 | if (sched_feat(LB_WAKEUP_UPDATE)) { | 2280 | if (sched_feat(LB_WAKEUP_UPDATE)) { |
2271 | struct sched_domain *sd; | 2281 | struct sched_domain *sd; |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 5cc1c162044f..a7e50ba185ac 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -719,7 +719,7 @@ enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int wakeup) | |||
719 | __enqueue_entity(cfs_rq, se); | 719 | __enqueue_entity(cfs_rq, se); |
720 | } | 720 | } |
721 | 721 | ||
722 | static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) | 722 | static void __clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) |
723 | { | 723 | { |
724 | if (cfs_rq->last == se) | 724 | if (cfs_rq->last == se) |
725 | cfs_rq->last = NULL; | 725 | cfs_rq->last = NULL; |
@@ -728,6 +728,12 @@ static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
728 | cfs_rq->next = NULL; | 728 | cfs_rq->next = NULL; |
729 | } | 729 | } |
730 | 730 | ||
731 | static void clear_buddies(struct cfs_rq *cfs_rq, struct sched_entity *se) | ||
732 | { | ||
733 | for_each_sched_entity(se) | ||
734 | __clear_buddies(cfs_rq_of(se), se); | ||
735 | } | ||
736 | |||
731 | static void | 737 | static void |
732 | dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) | 738 | dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int sleep) |
733 | { | 739 | { |
@@ -768,8 +774,14 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) | |||
768 | 774 | ||
769 | ideal_runtime = sched_slice(cfs_rq, curr); | 775 | ideal_runtime = sched_slice(cfs_rq, curr); |
770 | delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; | 776 | delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; |
771 | if (delta_exec > ideal_runtime) | 777 | if (delta_exec > ideal_runtime) { |
772 | resched_task(rq_of(cfs_rq)->curr); | 778 | resched_task(rq_of(cfs_rq)->curr); |
779 | /* | ||
780 | * The current task ran long enough, ensure it doesn't get | ||
781 | * re-elected due to buddy favours. | ||
782 | */ | ||
783 | clear_buddies(cfs_rq, curr); | ||
784 | } | ||
773 | } | 785 | } |
774 | 786 | ||
775 | static void | 787 | static void |
@@ -1179,20 +1191,15 @@ wake_affine(struct sched_domain *this_sd, struct rq *this_rq, | |||
1179 | int idx, unsigned long load, unsigned long this_load, | 1191 | int idx, unsigned long load, unsigned long this_load, |
1180 | unsigned int imbalance) | 1192 | unsigned int imbalance) |
1181 | { | 1193 | { |
1182 | struct task_struct *curr = this_rq->curr; | ||
1183 | struct task_group *tg; | ||
1184 | unsigned long tl = this_load; | 1194 | unsigned long tl = this_load; |
1185 | unsigned long tl_per_task; | 1195 | unsigned long tl_per_task; |
1196 | struct task_group *tg; | ||
1186 | unsigned long weight; | 1197 | unsigned long weight; |
1187 | int balanced; | 1198 | int balanced; |
1188 | 1199 | ||
1189 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) | 1200 | if (!(this_sd->flags & SD_WAKE_AFFINE) || !sched_feat(AFFINE_WAKEUPS)) |
1190 | return 0; | 1201 | return 0; |
1191 | 1202 | ||
1192 | if (sync && (curr->se.avg_overlap > sysctl_sched_migration_cost || | ||
1193 | p->se.avg_overlap > sysctl_sched_migration_cost)) | ||
1194 | sync = 0; | ||
1195 | |||
1196 | /* | 1203 | /* |
1197 | * If sync wakeup then subtract the (maximum possible) | 1204 | * If sync wakeup then subtract the (maximum possible) |
1198 | * effect of the currently running task from the load | 1205 | * effect of the currently running task from the load |
@@ -1419,9 +1426,7 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync) | |||
1419 | if (!sched_feat(WAKEUP_PREEMPT)) | 1426 | if (!sched_feat(WAKEUP_PREEMPT)) |
1420 | return; | 1427 | return; |
1421 | 1428 | ||
1422 | if (sched_feat(WAKEUP_OVERLAP) && (sync || | 1429 | if (sched_feat(WAKEUP_OVERLAP) && sync) { |
1423 | (se->avg_overlap < sysctl_sched_migration_cost && | ||
1424 | pse->avg_overlap < sysctl_sched_migration_cost))) { | ||
1425 | resched_task(curr); | 1430 | resched_task(curr); |
1426 | return; | 1431 | return; |
1427 | } | 1432 | } |
@@ -1452,6 +1457,11 @@ static struct task_struct *pick_next_task_fair(struct rq *rq) | |||
1452 | 1457 | ||
1453 | do { | 1458 | do { |
1454 | se = pick_next_entity(cfs_rq); | 1459 | se = pick_next_entity(cfs_rq); |
1460 | /* | ||
1461 | * If se was a buddy, clear it so that it will have to earn | ||
1462 | * the favour again. | ||
1463 | */ | ||
1464 | __clear_buddies(cfs_rq, se); | ||
1455 | set_next_entity(cfs_rq, se); | 1465 | set_next_entity(cfs_rq, se); |
1456 | cfs_rq = group_cfs_rq(se); | 1466 | cfs_rq = group_cfs_rq(se); |
1457 | } while (cfs_rq); | 1467 | } while (cfs_rq); |
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index 954e1a81b796..bac1061cea2f 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -968,8 +968,8 @@ static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask) | |||
968 | if ((this_cpu != -1) && cpu_isset(this_cpu, *mask)) | 968 | if ((this_cpu != -1) && cpu_isset(this_cpu, *mask)) |
969 | return this_cpu; | 969 | return this_cpu; |
970 | 970 | ||
971 | first = first_cpu(*mask); | 971 | first = cpumask_first(mask); |
972 | if (first != NR_CPUS) | 972 | if (first < nr_cpu_ids) |
973 | return first; | 973 | return first; |
974 | 974 | ||
975 | return -1; | 975 | return -1; |
diff --git a/kernel/signal.c b/kernel/signal.c index e73759783dc8..b6b36768b758 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -909,7 +909,9 @@ static void print_fatal_signal(struct pt_regs *regs, int signr) | |||
909 | } | 909 | } |
910 | #endif | 910 | #endif |
911 | printk("\n"); | 911 | printk("\n"); |
912 | preempt_disable(); | ||
912 | show_regs(regs); | 913 | show_regs(regs); |
914 | preempt_enable(); | ||
913 | } | 915 | } |
914 | 916 | ||
915 | static int __init setup_print_fatal_signals(char *str) | 917 | static int __init setup_print_fatal_signals(char *str) |
diff --git a/kernel/smp.c b/kernel/smp.c index 5cfa0e5e3e88..bbedbb7efe32 100644 --- a/kernel/smp.c +++ b/kernel/smp.c | |||
@@ -18,6 +18,7 @@ __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_function_lock); | |||
18 | enum { | 18 | enum { |
19 | CSD_FLAG_WAIT = 0x01, | 19 | CSD_FLAG_WAIT = 0x01, |
20 | CSD_FLAG_ALLOC = 0x02, | 20 | CSD_FLAG_ALLOC = 0x02, |
21 | CSD_FLAG_LOCK = 0x04, | ||
21 | }; | 22 | }; |
22 | 23 | ||
23 | struct call_function_data { | 24 | struct call_function_data { |
@@ -186,6 +187,9 @@ void generic_smp_call_function_single_interrupt(void) | |||
186 | if (data_flags & CSD_FLAG_WAIT) { | 187 | if (data_flags & CSD_FLAG_WAIT) { |
187 | smp_wmb(); | 188 | smp_wmb(); |
188 | data->flags &= ~CSD_FLAG_WAIT; | 189 | data->flags &= ~CSD_FLAG_WAIT; |
190 | } else if (data_flags & CSD_FLAG_LOCK) { | ||
191 | smp_wmb(); | ||
192 | data->flags &= ~CSD_FLAG_LOCK; | ||
189 | } else if (data_flags & CSD_FLAG_ALLOC) | 193 | } else if (data_flags & CSD_FLAG_ALLOC) |
190 | kfree(data); | 194 | kfree(data); |
191 | } | 195 | } |
@@ -196,6 +200,8 @@ void generic_smp_call_function_single_interrupt(void) | |||
196 | } | 200 | } |
197 | } | 201 | } |
198 | 202 | ||
203 | static DEFINE_PER_CPU(struct call_single_data, csd_data); | ||
204 | |||
199 | /* | 205 | /* |
200 | * smp_call_function_single - Run a function on a specific CPU | 206 | * smp_call_function_single - Run a function on a specific CPU |
201 | * @func: The function to run. This must be fast and non-blocking. | 207 | * @func: The function to run. This must be fast and non-blocking. |
@@ -224,14 +230,38 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
224 | func(info); | 230 | func(info); |
225 | local_irq_restore(flags); | 231 | local_irq_restore(flags); |
226 | } else if ((unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) { | 232 | } else if ((unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) { |
227 | struct call_single_data *data = NULL; | 233 | struct call_single_data *data; |
228 | 234 | ||
229 | if (!wait) { | 235 | if (!wait) { |
236 | /* | ||
237 | * We are calling a function on a single CPU | ||
238 | * and we are not going to wait for it to finish. | ||
239 | * We first try to allocate the data, but if we | ||
240 | * fail, we fall back to use a per cpu data to pass | ||
241 | * the information to that CPU. Since all callers | ||
242 | * of this code will use the same data, we must | ||
243 | * synchronize the callers to prevent a new caller | ||
244 | * from corrupting the data before the callee | ||
245 | * can access it. | ||
246 | * | ||
247 | * The CSD_FLAG_LOCK is used to let us know when | ||
248 | * the IPI handler is done with the data. | ||
249 | * The first caller will set it, and the callee | ||
250 | * will clear it. The next caller must wait for | ||
251 | * it to clear before we set it again. This | ||
252 | * will make sure the callee is done with the | ||
253 | * data before a new caller will use it. | ||
254 | */ | ||
230 | data = kmalloc(sizeof(*data), GFP_ATOMIC); | 255 | data = kmalloc(sizeof(*data), GFP_ATOMIC); |
231 | if (data) | 256 | if (data) |
232 | data->flags = CSD_FLAG_ALLOC; | 257 | data->flags = CSD_FLAG_ALLOC; |
233 | } | 258 | else { |
234 | if (!data) { | 259 | data = &per_cpu(csd_data, me); |
260 | while (data->flags & CSD_FLAG_LOCK) | ||
261 | cpu_relax(); | ||
262 | data->flags = CSD_FLAG_LOCK; | ||
263 | } | ||
264 | } else { | ||
235 | data = &d; | 265 | data = &d; |
236 | data->flags = CSD_FLAG_WAIT; | 266 | data->flags = CSD_FLAG_WAIT; |
237 | } | 267 | } |
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 63e05d423a09..21a5ca849514 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -274,6 +274,21 @@ out_bc: | |||
274 | } | 274 | } |
275 | 275 | ||
276 | /* | 276 | /* |
277 | * Transfer the do_timer job away from a dying cpu. | ||
278 | * | ||
279 | * Called with interrupts disabled. | ||
280 | */ | ||
281 | static void tick_handover_do_timer(int *cpup) | ||
282 | { | ||
283 | if (*cpup == tick_do_timer_cpu) { | ||
284 | int cpu = cpumask_first(cpu_online_mask); | ||
285 | |||
286 | tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : | ||
287 | TICK_DO_TIMER_NONE; | ||
288 | } | ||
289 | } | ||
290 | |||
291 | /* | ||
277 | * Shutdown an event device on a given cpu: | 292 | * Shutdown an event device on a given cpu: |
278 | * | 293 | * |
279 | * This is called on a life CPU, when a CPU is dead. So we cannot | 294 | * This is called on a life CPU, when a CPU is dead. So we cannot |
@@ -297,13 +312,6 @@ static void tick_shutdown(unsigned int *cpup) | |||
297 | clockevents_exchange_device(dev, NULL); | 312 | clockevents_exchange_device(dev, NULL); |
298 | td->evtdev = NULL; | 313 | td->evtdev = NULL; |
299 | } | 314 | } |
300 | /* Transfer the do_timer job away from this cpu */ | ||
301 | if (*cpup == tick_do_timer_cpu) { | ||
302 | int cpu = cpumask_first(cpu_online_mask); | ||
303 | |||
304 | tick_do_timer_cpu = (cpu < nr_cpu_ids) ? cpu : | ||
305 | TICK_DO_TIMER_NONE; | ||
306 | } | ||
307 | spin_unlock_irqrestore(&tick_device_lock, flags); | 315 | spin_unlock_irqrestore(&tick_device_lock, flags); |
308 | } | 316 | } |
309 | 317 | ||
@@ -357,6 +365,10 @@ static int tick_notify(struct notifier_block *nb, unsigned long reason, | |||
357 | tick_broadcast_oneshot_control(reason); | 365 | tick_broadcast_oneshot_control(reason); |
358 | break; | 366 | break; |
359 | 367 | ||
368 | case CLOCK_EVT_NOTIFY_CPU_DYING: | ||
369 | tick_handover_do_timer(dev); | ||
370 | break; | ||
371 | |||
360 | case CLOCK_EVT_NOTIFY_CPU_DEAD: | 372 | case CLOCK_EVT_NOTIFY_CPU_DEAD: |
361 | tick_shutdown_broadcast_oneshot(dev); | 373 | tick_shutdown_broadcast_oneshot(dev); |
362 | tick_shutdown_broadcast(dev); | 374 | tick_shutdown_broadcast(dev); |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 2f32969c09df..7dcf6e9f2b04 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/clocksource.h> | 17 | #include <linux/clocksource.h> |
18 | #include <linux/kallsyms.h> | 18 | #include <linux/kallsyms.h> |
19 | #include <linux/seq_file.h> | 19 | #include <linux/seq_file.h> |
20 | #include <linux/suspend.h> | ||
20 | #include <linux/debugfs.h> | 21 | #include <linux/debugfs.h> |
21 | #include <linux/hardirq.h> | 22 | #include <linux/hardirq.h> |
22 | #include <linux/kthread.h> | 23 | #include <linux/kthread.h> |
@@ -1965,6 +1966,7 @@ ftrace_enable_sysctl(struct ctl_table *table, int write, | |||
1965 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | 1966 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER |
1966 | 1967 | ||
1967 | static atomic_t ftrace_graph_active; | 1968 | static atomic_t ftrace_graph_active; |
1969 | static struct notifier_block ftrace_suspend_notifier; | ||
1968 | 1970 | ||
1969 | int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace) | 1971 | int ftrace_graph_entry_stub(struct ftrace_graph_ent *trace) |
1970 | { | 1972 | { |
@@ -2043,6 +2045,27 @@ static int start_graph_tracing(void) | |||
2043 | return ret; | 2045 | return ret; |
2044 | } | 2046 | } |
2045 | 2047 | ||
2048 | /* | ||
2049 | * Hibernation protection. | ||
2050 | * The state of the current task is too much unstable during | ||
2051 | * suspend/restore to disk. We want to protect against that. | ||
2052 | */ | ||
2053 | static int | ||
2054 | ftrace_suspend_notifier_call(struct notifier_block *bl, unsigned long state, | ||
2055 | void *unused) | ||
2056 | { | ||
2057 | switch (state) { | ||
2058 | case PM_HIBERNATION_PREPARE: | ||
2059 | pause_graph_tracing(); | ||
2060 | break; | ||
2061 | |||
2062 | case PM_POST_HIBERNATION: | ||
2063 | unpause_graph_tracing(); | ||
2064 | break; | ||
2065 | } | ||
2066 | return NOTIFY_DONE; | ||
2067 | } | ||
2068 | |||
2046 | int register_ftrace_graph(trace_func_graph_ret_t retfunc, | 2069 | int register_ftrace_graph(trace_func_graph_ret_t retfunc, |
2047 | trace_func_graph_ent_t entryfunc) | 2070 | trace_func_graph_ent_t entryfunc) |
2048 | { | 2071 | { |
@@ -2050,6 +2073,9 @@ int register_ftrace_graph(trace_func_graph_ret_t retfunc, | |||
2050 | 2073 | ||
2051 | mutex_lock(&ftrace_sysctl_lock); | 2074 | mutex_lock(&ftrace_sysctl_lock); |
2052 | 2075 | ||
2076 | ftrace_suspend_notifier.notifier_call = ftrace_suspend_notifier_call; | ||
2077 | register_pm_notifier(&ftrace_suspend_notifier); | ||
2078 | |||
2053 | atomic_inc(&ftrace_graph_active); | 2079 | atomic_inc(&ftrace_graph_active); |
2054 | ret = start_graph_tracing(); | 2080 | ret = start_graph_tracing(); |
2055 | if (ret) { | 2081 | if (ret) { |
@@ -2075,6 +2101,7 @@ void unregister_ftrace_graph(void) | |||
2075 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; | 2101 | ftrace_graph_return = (trace_func_graph_ret_t)ftrace_stub; |
2076 | ftrace_graph_entry = ftrace_graph_entry_stub; | 2102 | ftrace_graph_entry = ftrace_graph_entry_stub; |
2077 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); | 2103 | ftrace_shutdown(FTRACE_STOP_FUNC_RET); |
2104 | unregister_pm_notifier(&ftrace_suspend_notifier); | ||
2078 | 2105 | ||
2079 | mutex_unlock(&ftrace_sysctl_lock); | 2106 | mutex_unlock(&ftrace_sysctl_lock); |
2080 | } | 2107 | } |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 8b0daf0662ef..bd38c5cfd8ad 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -246,7 +246,7 @@ static inline int test_time_stamp(u64 delta) | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | #define BUF_PAGE_SIZE (PAGE_SIZE - sizeof(struct buffer_data_page)) | 249 | #define BUF_PAGE_SIZE (PAGE_SIZE - offsetof(struct buffer_data_page, data)) |
250 | 250 | ||
251 | /* | 251 | /* |
252 | * head_page == tail_page && head == tail then buffer is empty. | 252 | * head_page == tail_page && head == tail then buffer is empty. |
@@ -1025,12 +1025,8 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | if (next_page == head_page) { | 1027 | if (next_page == head_page) { |
1028 | if (!(buffer->flags & RB_FL_OVERWRITE)) { | 1028 | if (!(buffer->flags & RB_FL_OVERWRITE)) |
1029 | /* reset write */ | ||
1030 | if (tail <= BUF_PAGE_SIZE) | ||
1031 | local_set(&tail_page->write, tail); | ||
1032 | goto out_unlock; | 1029 | goto out_unlock; |
1033 | } | ||
1034 | 1030 | ||
1035 | /* tail_page has not moved yet? */ | 1031 | /* tail_page has not moved yet? */ |
1036 | if (tail_page == cpu_buffer->tail_page) { | 1032 | if (tail_page == cpu_buffer->tail_page) { |
@@ -1105,6 +1101,10 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1105 | return event; | 1101 | return event; |
1106 | 1102 | ||
1107 | out_unlock: | 1103 | out_unlock: |
1104 | /* reset write */ | ||
1105 | if (tail <= BUF_PAGE_SIZE) | ||
1106 | local_set(&tail_page->write, tail); | ||
1107 | |||
1108 | __raw_spin_unlock(&cpu_buffer->lock); | 1108 | __raw_spin_unlock(&cpu_buffer->lock); |
1109 | local_irq_restore(flags); | 1109 | local_irq_restore(flags); |
1110 | return NULL; | 1110 | return NULL; |
@@ -2174,6 +2174,9 @@ rb_reset_cpu(struct ring_buffer_per_cpu *cpu_buffer) | |||
2174 | 2174 | ||
2175 | cpu_buffer->overrun = 0; | 2175 | cpu_buffer->overrun = 0; |
2176 | cpu_buffer->entries = 0; | 2176 | cpu_buffer->entries = 0; |
2177 | |||
2178 | cpu_buffer->write_stamp = 0; | ||
2179 | cpu_buffer->read_stamp = 0; | ||
2177 | } | 2180 | } |
2178 | 2181 | ||
2179 | /** | 2182 | /** |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index c580233add95..17bb88d86ac2 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -40,7 +40,7 @@ | |||
40 | 40 | ||
41 | #define TRACE_BUFFER_FLAGS (RB_FL_OVERWRITE) | 41 | #define TRACE_BUFFER_FLAGS (RB_FL_OVERWRITE) |
42 | 42 | ||
43 | unsigned long __read_mostly tracing_max_latency = (cycle_t)ULONG_MAX; | 43 | unsigned long __read_mostly tracing_max_latency; |
44 | unsigned long __read_mostly tracing_thresh; | 44 | unsigned long __read_mostly tracing_thresh; |
45 | 45 | ||
46 | /* | 46 | /* |
@@ -3736,7 +3736,7 @@ static struct notifier_block trace_die_notifier = { | |||
3736 | * it if we decide to change what log level the ftrace dump | 3736 | * it if we decide to change what log level the ftrace dump |
3737 | * should be at. | 3737 | * should be at. |
3738 | */ | 3738 | */ |
3739 | #define KERN_TRACE KERN_INFO | 3739 | #define KERN_TRACE KERN_EMERG |
3740 | 3740 | ||
3741 | static void | 3741 | static void |
3742 | trace_printk_seq(struct trace_seq *s) | 3742 | trace_printk_seq(struct trace_seq *s) |
@@ -3770,6 +3770,7 @@ void ftrace_dump(void) | |||
3770 | dump_ran = 1; | 3770 | dump_ran = 1; |
3771 | 3771 | ||
3772 | /* No turning back! */ | 3772 | /* No turning back! */ |
3773 | tracing_off(); | ||
3773 | ftrace_kill(); | 3774 | ftrace_kill(); |
3774 | 3775 | ||
3775 | for_each_tracing_cpu(cpu) { | 3776 | for_each_tracing_cpu(cpu) { |
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 7c2e326bbc8b..62a78d943534 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
@@ -380,6 +380,7 @@ static void stop_irqsoff_tracer(struct trace_array *tr) | |||
380 | 380 | ||
381 | static void __irqsoff_tracer_init(struct trace_array *tr) | 381 | static void __irqsoff_tracer_init(struct trace_array *tr) |
382 | { | 382 | { |
383 | tracing_max_latency = 0; | ||
383 | irqsoff_trace = tr; | 384 | irqsoff_trace = tr; |
384 | /* make sure that the tracer is visible */ | 385 | /* make sure that the tracer is visible */ |
385 | smp_wmb(); | 386 | smp_wmb(); |
diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c index 43586b689e31..42ae1e77b6b3 100644 --- a/kernel/trace/trace_sched_wakeup.c +++ b/kernel/trace/trace_sched_wakeup.c | |||
@@ -333,6 +333,7 @@ static void stop_wakeup_tracer(struct trace_array *tr) | |||
333 | 333 | ||
334 | static int wakeup_tracer_init(struct trace_array *tr) | 334 | static int wakeup_tracer_init(struct trace_array *tr) |
335 | { | 335 | { |
336 | tracing_max_latency = 0; | ||
336 | wakeup_trace = tr; | 337 | wakeup_trace = tr; |
337 | start_wakeup_tracer(tr); | 338 | start_wakeup_tracer(tr); |
338 | return 0; | 339 | return 0; |
diff --git a/lib/smp_processor_id.c b/lib/smp_processor_id.c index 0f8fc22ed103..4689cb073da4 100644 --- a/lib/smp_processor_id.c +++ b/lib/smp_processor_id.c | |||
@@ -22,7 +22,7 @@ notrace unsigned int debug_smp_processor_id(void) | |||
22 | * Kernel threads bound to a single CPU can safely use | 22 | * Kernel threads bound to a single CPU can safely use |
23 | * smp_processor_id(): | 23 | * smp_processor_id(): |
24 | */ | 24 | */ |
25 | if (cpus_equal(current->cpus_allowed, cpumask_of_cpu(this_cpu))) | 25 | if (cpumask_equal(¤t->cpus_allowed, cpumask_of(this_cpu))) |
26 | goto out; | 26 | goto out; |
27 | 27 | ||
28 | /* | 28 | /* |
diff --git a/mm/mlock.c b/mm/mlock.c index 2904a347e476..028ec482fdd4 100644 --- a/mm/mlock.c +++ b/mm/mlock.c | |||
@@ -294,14 +294,10 @@ static inline int __mlock_posix_error_return(long retval) | |||
294 | * | 294 | * |
295 | * return number of pages [> 0] to be removed from locked_vm on success | 295 | * return number of pages [> 0] to be removed from locked_vm on success |
296 | * of "special" vmas. | 296 | * of "special" vmas. |
297 | * | ||
298 | * return negative error if vma spanning @start-@range disappears while | ||
299 | * mmap semaphore is dropped. Unlikely? | ||
300 | */ | 297 | */ |
301 | long mlock_vma_pages_range(struct vm_area_struct *vma, | 298 | long mlock_vma_pages_range(struct vm_area_struct *vma, |
302 | unsigned long start, unsigned long end) | 299 | unsigned long start, unsigned long end) |
303 | { | 300 | { |
304 | struct mm_struct *mm = vma->vm_mm; | ||
305 | int nr_pages = (end - start) / PAGE_SIZE; | 301 | int nr_pages = (end - start) / PAGE_SIZE; |
306 | BUG_ON(!(vma->vm_flags & VM_LOCKED)); | 302 | BUG_ON(!(vma->vm_flags & VM_LOCKED)); |
307 | 303 | ||
@@ -314,20 +310,8 @@ long mlock_vma_pages_range(struct vm_area_struct *vma, | |||
314 | if (!((vma->vm_flags & (VM_DONTEXPAND | VM_RESERVED)) || | 310 | if (!((vma->vm_flags & (VM_DONTEXPAND | VM_RESERVED)) || |
315 | is_vm_hugetlb_page(vma) || | 311 | is_vm_hugetlb_page(vma) || |
316 | vma == get_gate_vma(current))) { | 312 | vma == get_gate_vma(current))) { |
317 | long error; | ||
318 | downgrade_write(&mm->mmap_sem); | ||
319 | |||
320 | error = __mlock_vma_pages_range(vma, start, end, 1); | ||
321 | 313 | ||
322 | up_read(&mm->mmap_sem); | 314 | return __mlock_vma_pages_range(vma, start, end, 1); |
323 | /* vma can change or disappear */ | ||
324 | down_write(&mm->mmap_sem); | ||
325 | vma = find_vma(mm, start); | ||
326 | /* non-NULL vma must contain @start, but need to check @end */ | ||
327 | if (!vma || end > vma->vm_end) | ||
328 | return -ENOMEM; | ||
329 | |||
330 | return 0; /* hide other errors from mmap(), et al */ | ||
331 | } | 315 | } |
332 | 316 | ||
333 | /* | 317 | /* |
@@ -438,41 +422,14 @@ success: | |||
438 | vma->vm_flags = newflags; | 422 | vma->vm_flags = newflags; |
439 | 423 | ||
440 | if (lock) { | 424 | if (lock) { |
441 | /* | ||
442 | * mmap_sem is currently held for write. Downgrade the write | ||
443 | * lock to a read lock so that other faults, mmap scans, ... | ||
444 | * while we fault in all pages. | ||
445 | */ | ||
446 | downgrade_write(&mm->mmap_sem); | ||
447 | |||
448 | ret = __mlock_vma_pages_range(vma, start, end, 1); | 425 | ret = __mlock_vma_pages_range(vma, start, end, 1); |
449 | 426 | ||
450 | /* | 427 | if (ret > 0) { |
451 | * Need to reacquire mmap sem in write mode, as our callers | ||
452 | * expect this. We have no support for atomically upgrading | ||
453 | * a sem to write, so we need to check for ranges while sem | ||
454 | * is unlocked. | ||
455 | */ | ||
456 | up_read(&mm->mmap_sem); | ||
457 | /* vma can change or disappear */ | ||
458 | down_write(&mm->mmap_sem); | ||
459 | *prev = find_vma(mm, start); | ||
460 | /* non-NULL *prev must contain @start, but need to check @end */ | ||
461 | if (!(*prev) || end > (*prev)->vm_end) | ||
462 | ret = -ENOMEM; | ||
463 | else if (ret > 0) { | ||
464 | mm->locked_vm -= ret; | 428 | mm->locked_vm -= ret; |
465 | ret = 0; | 429 | ret = 0; |
466 | } else | 430 | } else |
467 | ret = __mlock_posix_error_return(ret); /* translate if needed */ | 431 | ret = __mlock_posix_error_return(ret); /* translate if needed */ |
468 | } else { | 432 | } else { |
469 | /* | ||
470 | * TODO: for unlocking, pages will already be resident, so | ||
471 | * we don't need to wait for allocations/reclaim/pagein, ... | ||
472 | * However, unlocking a very large region can still take a | ||
473 | * while. Should we downgrade the semaphore for both lock | ||
474 | * AND unlock ? | ||
475 | */ | ||
476 | __mlock_vma_pages_range(vma, start, end, 0); | 433 | __mlock_vma_pages_range(vma, start, end, 0); |
477 | } | 434 | } |
478 | 435 | ||
@@ -658,6 +658,9 @@ again: remove_next = 1 + (end > next->vm_end); | |||
658 | validate_mm(mm); | 658 | validate_mm(mm); |
659 | } | 659 | } |
660 | 660 | ||
661 | /* Flags that can be inherited from an existing mapping when merging */ | ||
662 | #define VM_MERGEABLE_FLAGS (VM_CAN_NONLINEAR) | ||
663 | |||
661 | /* | 664 | /* |
662 | * If the vma has a ->close operation then the driver probably needs to release | 665 | * If the vma has a ->close operation then the driver probably needs to release |
663 | * per-vma resources, so we don't attempt to merge those. | 666 | * per-vma resources, so we don't attempt to merge those. |
@@ -665,7 +668,7 @@ again: remove_next = 1 + (end > next->vm_end); | |||
665 | static inline int is_mergeable_vma(struct vm_area_struct *vma, | 668 | static inline int is_mergeable_vma(struct vm_area_struct *vma, |
666 | struct file *file, unsigned long vm_flags) | 669 | struct file *file, unsigned long vm_flags) |
667 | { | 670 | { |
668 | if (vma->vm_flags != vm_flags) | 671 | if ((vma->vm_flags ^ vm_flags) & ~VM_MERGEABLE_FLAGS) |
669 | return 0; | 672 | return 0; |
670 | if (vma->vm_file != file) | 673 | if (vma->vm_file != file) |
671 | return 0; | 674 | return 0; |
@@ -1087,6 +1090,15 @@ int vma_wants_writenotify(struct vm_area_struct *vma) | |||
1087 | mapping_cap_account_dirty(vma->vm_file->f_mapping); | 1090 | mapping_cap_account_dirty(vma->vm_file->f_mapping); |
1088 | } | 1091 | } |
1089 | 1092 | ||
1093 | /* | ||
1094 | * We account for memory if it's a private writeable mapping, | ||
1095 | * and VM_NORESERVE wasn't set. | ||
1096 | */ | ||
1097 | static inline int accountable_mapping(unsigned int vm_flags) | ||
1098 | { | ||
1099 | return (vm_flags & (VM_NORESERVE | VM_SHARED | VM_WRITE)) == VM_WRITE; | ||
1100 | } | ||
1101 | |||
1090 | unsigned long mmap_region(struct file *file, unsigned long addr, | 1102 | unsigned long mmap_region(struct file *file, unsigned long addr, |
1091 | unsigned long len, unsigned long flags, | 1103 | unsigned long len, unsigned long flags, |
1092 | unsigned int vm_flags, unsigned long pgoff, | 1104 | unsigned int vm_flags, unsigned long pgoff, |
@@ -1114,23 +1126,24 @@ munmap_back: | |||
1114 | if (!may_expand_vm(mm, len >> PAGE_SHIFT)) | 1126 | if (!may_expand_vm(mm, len >> PAGE_SHIFT)) |
1115 | return -ENOMEM; | 1127 | return -ENOMEM; |
1116 | 1128 | ||
1117 | if (flags & MAP_NORESERVE) | 1129 | /* |
1130 | * Set 'VM_NORESERVE' if we should not account for the | ||
1131 | * memory use of this mapping. We only honor MAP_NORESERVE | ||
1132 | * if we're allowed to overcommit memory. | ||
1133 | */ | ||
1134 | if ((flags & MAP_NORESERVE) && sysctl_overcommit_memory != OVERCOMMIT_NEVER) | ||
1135 | vm_flags |= VM_NORESERVE; | ||
1136 | if (!accountable) | ||
1118 | vm_flags |= VM_NORESERVE; | 1137 | vm_flags |= VM_NORESERVE; |
1119 | 1138 | ||
1120 | if (accountable && (!(flags & MAP_NORESERVE) || | 1139 | /* |
1121 | sysctl_overcommit_memory == OVERCOMMIT_NEVER)) { | 1140 | * Private writable mapping: check memory availability |
1122 | if (vm_flags & VM_SHARED) { | 1141 | */ |
1123 | /* Check memory availability in shmem_file_setup? */ | 1142 | if (accountable_mapping(vm_flags)) { |
1124 | vm_flags |= VM_ACCOUNT; | 1143 | charged = len >> PAGE_SHIFT; |
1125 | } else if (vm_flags & VM_WRITE) { | 1144 | if (security_vm_enough_memory(charged)) |
1126 | /* | 1145 | return -ENOMEM; |
1127 | * Private writable mapping: check memory availability | 1146 | vm_flags |= VM_ACCOUNT; |
1128 | */ | ||
1129 | charged = len >> PAGE_SHIFT; | ||
1130 | if (security_vm_enough_memory(charged)) | ||
1131 | return -ENOMEM; | ||
1132 | vm_flags |= VM_ACCOUNT; | ||
1133 | } | ||
1134 | } | 1147 | } |
1135 | 1148 | ||
1136 | /* | 1149 | /* |
@@ -1181,14 +1194,6 @@ munmap_back: | |||
1181 | goto free_vma; | 1194 | goto free_vma; |
1182 | } | 1195 | } |
1183 | 1196 | ||
1184 | /* We set VM_ACCOUNT in a shared mapping's vm_flags, to inform | ||
1185 | * shmem_zero_setup (perhaps called through /dev/zero's ->mmap) | ||
1186 | * that memory reservation must be checked; but that reservation | ||
1187 | * belongs to shared memory object, not to vma: so now clear it. | ||
1188 | */ | ||
1189 | if ((vm_flags & (VM_SHARED|VM_ACCOUNT)) == (VM_SHARED|VM_ACCOUNT)) | ||
1190 | vma->vm_flags &= ~VM_ACCOUNT; | ||
1191 | |||
1192 | /* Can addr have changed?? | 1197 | /* Can addr have changed?? |
1193 | * | 1198 | * |
1194 | * Answer: Yes, several device drivers can do it in their | 1199 | * Answer: Yes, several device drivers can do it in their |
diff --git a/mm/page-writeback.c b/mm/page-writeback.c index b493db7841dc..dc32dae01e5f 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c | |||
@@ -1051,13 +1051,22 @@ continue_unlock: | |||
1051 | } | 1051 | } |
1052 | } | 1052 | } |
1053 | 1053 | ||
1054 | if (wbc->sync_mode == WB_SYNC_NONE) { | 1054 | if (nr_to_write > 0) |
1055 | wbc->nr_to_write--; | 1055 | nr_to_write--; |
1056 | if (wbc->nr_to_write <= 0) { | 1056 | else if (wbc->sync_mode == WB_SYNC_NONE) { |
1057 | done = 1; | 1057 | /* |
1058 | break; | 1058 | * We stop writing back only if we are not |
1059 | } | 1059 | * doing integrity sync. In case of integrity |
1060 | * sync we have to keep going because someone | ||
1061 | * may be concurrently dirtying pages, and we | ||
1062 | * might have synced a lot of newly appeared | ||
1063 | * dirty pages, but have not synced all of the | ||
1064 | * old dirty pages. | ||
1065 | */ | ||
1066 | done = 1; | ||
1067 | break; | ||
1060 | } | 1068 | } |
1069 | |||
1061 | if (wbc->nonblocking && bdi_write_congested(bdi)) { | 1070 | if (wbc->nonblocking && bdi_write_congested(bdi)) { |
1062 | wbc->encountered_congestion = 1; | 1071 | wbc->encountered_congestion = 1; |
1063 | done = 1; | 1072 | done = 1; |
diff --git a/mm/shmem.c b/mm/shmem.c index 5d0de96c9789..19d566ccdeea 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -2628,7 +2628,7 @@ struct file *shmem_file_setup(char *name, loff_t size, unsigned long flags) | |||
2628 | goto close_file; | 2628 | goto close_file; |
2629 | 2629 | ||
2630 | #ifdef CONFIG_SHMEM | 2630 | #ifdef CONFIG_SHMEM |
2631 | SHMEM_I(inode)->flags = flags & VM_ACCOUNT; | 2631 | SHMEM_I(inode)->flags = (flags & VM_NORESERVE) ? 0 : VM_ACCOUNT; |
2632 | #endif | 2632 | #endif |
2633 | d_instantiate(dentry, inode); | 2633 | d_instantiate(dentry, inode); |
2634 | inode->i_size = size; | 2634 | inode->i_size = size; |
@@ -1996,7 +1996,7 @@ static struct kmem_cache_cpu *alloc_kmem_cache_cpu(struct kmem_cache *s, | |||
1996 | static void free_kmem_cache_cpu(struct kmem_cache_cpu *c, int cpu) | 1996 | static void free_kmem_cache_cpu(struct kmem_cache_cpu *c, int cpu) |
1997 | { | 1997 | { |
1998 | if (c < per_cpu(kmem_cache_cpu, cpu) || | 1998 | if (c < per_cpu(kmem_cache_cpu, cpu) || |
1999 | c > per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { | 1999 | c >= per_cpu(kmem_cache_cpu, cpu) + NR_KMEM_CACHE_CPU) { |
2000 | kfree(c); | 2000 | kfree(c); |
2001 | return; | 2001 | return; |
2002 | } | 2002 | } |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 2e5f2ca3bdcd..da74b844f4ea 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2212,10 +2212,10 @@ unsigned int skb_seq_read(unsigned int consumed, const u8 **data, | |||
2212 | return 0; | 2212 | return 0; |
2213 | 2213 | ||
2214 | next_skb: | 2214 | next_skb: |
2215 | block_limit = skb_headlen(st->cur_skb); | 2215 | block_limit = skb_headlen(st->cur_skb) + st->stepped_offset; |
2216 | 2216 | ||
2217 | if (abs_offset < block_limit) { | 2217 | if (abs_offset < block_limit) { |
2218 | *data = st->cur_skb->data + abs_offset; | 2218 | *data = st->cur_skb->data + (abs_offset - st->stepped_offset); |
2219 | return block_limit - abs_offset; | 2219 | return block_limit - abs_offset; |
2220 | } | 2220 | } |
2221 | 2221 | ||
@@ -2250,13 +2250,14 @@ next_skb: | |||
2250 | st->frag_data = NULL; | 2250 | st->frag_data = NULL; |
2251 | } | 2251 | } |
2252 | 2252 | ||
2253 | if (st->cur_skb->next) { | 2253 | if (st->root_skb == st->cur_skb && |
2254 | st->cur_skb = st->cur_skb->next; | 2254 | skb_shinfo(st->root_skb)->frag_list) { |
2255 | st->cur_skb = skb_shinfo(st->root_skb)->frag_list; | ||
2255 | st->frag_idx = 0; | 2256 | st->frag_idx = 0; |
2256 | goto next_skb; | 2257 | goto next_skb; |
2257 | } else if (st->root_skb == st->cur_skb && | 2258 | } else if (st->cur_skb->next) { |
2258 | skb_shinfo(st->root_skb)->frag_list) { | 2259 | st->cur_skb = st->cur_skb->next; |
2259 | st->cur_skb = skb_shinfo(st->root_skb)->frag_list; | 2260 | st->frag_idx = 0; |
2260 | goto next_skb; | 2261 | goto next_skb; |
2261 | } | 2262 | } |
2262 | 2263 | ||
diff --git a/net/ipv4/ipconfig.c b/net/ipv4/ipconfig.c index 42a0f3dd3fd6..d722013c1cae 100644 --- a/net/ipv4/ipconfig.c +++ b/net/ipv4/ipconfig.c | |||
@@ -1268,6 +1268,9 @@ __be32 __init root_nfs_parse_addr(char *name) | |||
1268 | static int __init ip_auto_config(void) | 1268 | static int __init ip_auto_config(void) |
1269 | { | 1269 | { |
1270 | __be32 addr; | 1270 | __be32 addr; |
1271 | #ifdef IPCONFIG_DYNAMIC | ||
1272 | int retries = CONF_OPEN_RETRIES; | ||
1273 | #endif | ||
1271 | 1274 | ||
1272 | #ifdef CONFIG_PROC_FS | 1275 | #ifdef CONFIG_PROC_FS |
1273 | proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops); | 1276 | proc_net_fops_create(&init_net, "pnp", S_IRUGO, &pnp_seq_fops); |
@@ -1304,9 +1307,6 @@ static int __init ip_auto_config(void) | |||
1304 | #endif | 1307 | #endif |
1305 | ic_first_dev->next) { | 1308 | ic_first_dev->next) { |
1306 | #ifdef IPCONFIG_DYNAMIC | 1309 | #ifdef IPCONFIG_DYNAMIC |
1307 | |||
1308 | int retries = CONF_OPEN_RETRIES; | ||
1309 | |||
1310 | if (ic_dynamic() < 0) { | 1310 | if (ic_dynamic() < 0) { |
1311 | ic_close_devs(); | 1311 | ic_close_devs(); |
1312 | 1312 | ||
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 0cd71b84e483..76b148bcb0dc 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -524,7 +524,8 @@ static int tcp_splice_data_recv(read_descriptor_t *rd_desc, struct sk_buff *skb, | |||
524 | struct tcp_splice_state *tss = rd_desc->arg.data; | 524 | struct tcp_splice_state *tss = rd_desc->arg.data; |
525 | int ret; | 525 | int ret; |
526 | 526 | ||
527 | ret = skb_splice_bits(skb, offset, tss->pipe, rd_desc->count, tss->flags); | 527 | ret = skb_splice_bits(skb, offset, tss->pipe, min(rd_desc->count, len), |
528 | tss->flags); | ||
528 | if (ret > 0) | 529 | if (ret > 0) |
529 | rd_desc->count -= ret; | 530 | rd_desc->count -= ret; |
530 | return ret; | 531 | return ret; |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index cf5ab0581eba..1ab180bad72a 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -120,8 +120,11 @@ EXPORT_SYMBOL(sysctl_udp_wmem_min); | |||
120 | atomic_t udp_memory_allocated; | 120 | atomic_t udp_memory_allocated; |
121 | EXPORT_SYMBOL(udp_memory_allocated); | 121 | EXPORT_SYMBOL(udp_memory_allocated); |
122 | 122 | ||
123 | #define PORTS_PER_CHAIN (65536 / UDP_HTABLE_SIZE) | ||
124 | |||
123 | static int udp_lib_lport_inuse(struct net *net, __u16 num, | 125 | static int udp_lib_lport_inuse(struct net *net, __u16 num, |
124 | const struct udp_hslot *hslot, | 126 | const struct udp_hslot *hslot, |
127 | unsigned long *bitmap, | ||
125 | struct sock *sk, | 128 | struct sock *sk, |
126 | int (*saddr_comp)(const struct sock *sk1, | 129 | int (*saddr_comp)(const struct sock *sk1, |
127 | const struct sock *sk2)) | 130 | const struct sock *sk2)) |
@@ -132,12 +135,17 @@ static int udp_lib_lport_inuse(struct net *net, __u16 num, | |||
132 | sk_nulls_for_each(sk2, node, &hslot->head) | 135 | sk_nulls_for_each(sk2, node, &hslot->head) |
133 | if (net_eq(sock_net(sk2), net) && | 136 | if (net_eq(sock_net(sk2), net) && |
134 | sk2 != sk && | 137 | sk2 != sk && |
135 | sk2->sk_hash == num && | 138 | (bitmap || sk2->sk_hash == num) && |
136 | (!sk2->sk_reuse || !sk->sk_reuse) && | 139 | (!sk2->sk_reuse || !sk->sk_reuse) && |
137 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if | 140 | (!sk2->sk_bound_dev_if || !sk->sk_bound_dev_if |
138 | || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && | 141 | || sk2->sk_bound_dev_if == sk->sk_bound_dev_if) && |
139 | (*saddr_comp)(sk, sk2)) | 142 | (*saddr_comp)(sk, sk2)) { |
140 | return 1; | 143 | if (bitmap) |
144 | __set_bit(sk2->sk_hash / UDP_HTABLE_SIZE, | ||
145 | bitmap); | ||
146 | else | ||
147 | return 1; | ||
148 | } | ||
141 | return 0; | 149 | return 0; |
142 | } | 150 | } |
143 | 151 | ||
@@ -160,32 +168,47 @@ int udp_lib_get_port(struct sock *sk, unsigned short snum, | |||
160 | if (!snum) { | 168 | if (!snum) { |
161 | int low, high, remaining; | 169 | int low, high, remaining; |
162 | unsigned rand; | 170 | unsigned rand; |
163 | unsigned short first; | 171 | unsigned short first, last; |
172 | DECLARE_BITMAP(bitmap, PORTS_PER_CHAIN); | ||
164 | 173 | ||
165 | inet_get_local_port_range(&low, &high); | 174 | inet_get_local_port_range(&low, &high); |
166 | remaining = (high - low) + 1; | 175 | remaining = (high - low) + 1; |
167 | 176 | ||
168 | rand = net_random(); | 177 | rand = net_random(); |
169 | snum = first = rand % remaining + low; | 178 | first = (((u64)rand * remaining) >> 32) + low; |
170 | rand |= 1; | 179 | /* |
171 | for (;;) { | 180 | * force rand to be an odd multiple of UDP_HTABLE_SIZE |
172 | hslot = &udptable->hash[udp_hashfn(net, snum)]; | 181 | */ |
182 | rand = (rand | 1) * UDP_HTABLE_SIZE; | ||
183 | for (last = first + UDP_HTABLE_SIZE; first != last; first++) { | ||
184 | hslot = &udptable->hash[udp_hashfn(net, first)]; | ||
185 | bitmap_zero(bitmap, PORTS_PER_CHAIN); | ||
173 | spin_lock_bh(&hslot->lock); | 186 | spin_lock_bh(&hslot->lock); |
174 | if (!udp_lib_lport_inuse(net, snum, hslot, sk, saddr_comp)) | 187 | udp_lib_lport_inuse(net, snum, hslot, bitmap, sk, |
175 | break; | 188 | saddr_comp); |
176 | spin_unlock_bh(&hslot->lock); | 189 | |
190 | snum = first; | ||
191 | /* | ||
192 | * Iterate on all possible values of snum for this hash. | ||
193 | * Using steps of an odd multiple of UDP_HTABLE_SIZE | ||
194 | * give us randomization and full range coverage. | ||
195 | */ | ||
177 | do { | 196 | do { |
178 | snum = snum + rand; | 197 | if (low <= snum && snum <= high && |
179 | } while (snum < low || snum > high); | 198 | !test_bit(snum / UDP_HTABLE_SIZE, bitmap)) |
180 | if (snum == first) | 199 | goto found; |
181 | goto fail; | 200 | snum += rand; |
201 | } while (snum != first); | ||
202 | spin_unlock_bh(&hslot->lock); | ||
182 | } | 203 | } |
204 | goto fail; | ||
183 | } else { | 205 | } else { |
184 | hslot = &udptable->hash[udp_hashfn(net, snum)]; | 206 | hslot = &udptable->hash[udp_hashfn(net, snum)]; |
185 | spin_lock_bh(&hslot->lock); | 207 | spin_lock_bh(&hslot->lock); |
186 | if (udp_lib_lport_inuse(net, snum, hslot, sk, saddr_comp)) | 208 | if (udp_lib_lport_inuse(net, snum, hslot, NULL, sk, saddr_comp)) |
187 | goto fail_unlock; | 209 | goto fail_unlock; |
188 | } | 210 | } |
211 | found: | ||
189 | inet_sk(sk)->num = snum; | 212 | inet_sk(sk)->num = snum; |
190 | sk->sk_hash = snum; | 213 | sk->sk_hash = snum; |
191 | if (sk_unhashed(sk)) { | 214 | if (sk_unhashed(sk)) { |
@@ -992,9 +1015,11 @@ static int __udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) | |||
992 | 1015 | ||
993 | if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) { | 1016 | if ((rc = sock_queue_rcv_skb(sk, skb)) < 0) { |
994 | /* Note that an ENOMEM error is charged twice */ | 1017 | /* Note that an ENOMEM error is charged twice */ |
995 | if (rc == -ENOMEM) | 1018 | if (rc == -ENOMEM) { |
996 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, | 1019 | UDP_INC_STATS_BH(sock_net(sk), UDP_MIB_RCVBUFERRORS, |
997 | is_udplite); | 1020 | is_udplite); |
1021 | atomic_inc(&sk->sk_drops); | ||
1022 | } | ||
998 | goto drop; | 1023 | goto drop; |
999 | } | 1024 | } |
1000 | 1025 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index e92ad8455c63..f9afb452249c 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -4250,7 +4250,7 @@ static struct addrconf_sysctl_table | |||
4250 | .procname = "mc_forwarding", | 4250 | .procname = "mc_forwarding", |
4251 | .data = &ipv6_devconf.mc_forwarding, | 4251 | .data = &ipv6_devconf.mc_forwarding, |
4252 | .maxlen = sizeof(int), | 4252 | .maxlen = sizeof(int), |
4253 | .mode = 0644, | 4253 | .mode = 0444, |
4254 | .proc_handler = proc_dointvec, | 4254 | .proc_handler = proc_dointvec, |
4255 | }, | 4255 | }, |
4256 | #endif | 4256 | #endif |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 4f433847d95f..36dff8807183 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -443,10 +443,10 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, __u32 info, | |||
443 | if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) | 443 | if (xfrm_decode_session_reverse(skb, &fl2, AF_INET6)) |
444 | goto relookup_failed; | 444 | goto relookup_failed; |
445 | 445 | ||
446 | if (ip6_dst_lookup(sk, &dst2, &fl)) | 446 | if (ip6_dst_lookup(sk, &dst2, &fl2)) |
447 | goto relookup_failed; | 447 | goto relookup_failed; |
448 | 448 | ||
449 | err = xfrm_lookup(net, &dst2, &fl, sk, XFRM_LOOKUP_ICMP); | 449 | err = xfrm_lookup(net, &dst2, &fl2, sk, XFRM_LOOKUP_ICMP); |
450 | switch (err) { | 450 | switch (err) { |
451 | case 0: | 451 | case 0: |
452 | dst_release(dst); | 452 | dst_release(dst); |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 936f48946e20..f171e8dbac91 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -255,6 +255,7 @@ int ip6_mc_input(struct sk_buff *skb) | |||
255 | * IPv6 multicast router mode is now supported ;) | 255 | * IPv6 multicast router mode is now supported ;) |
256 | */ | 256 | */ |
257 | if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding && | 257 | if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding && |
258 | !(ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) && | ||
258 | likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) { | 259 | likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) { |
259 | /* | 260 | /* |
260 | * Okay, we try to forward - split and duplicate | 261 | * Okay, we try to forward - split and duplicate |
@@ -316,7 +317,6 @@ int ip6_mc_input(struct sk_buff *skb) | |||
316 | } | 317 | } |
317 | 318 | ||
318 | if (skb2) { | 319 | if (skb2) { |
319 | skb2->dev = skb2->dst->dev; | ||
320 | ip6_mr_input(skb2); | 320 | ip6_mr_input(skb2); |
321 | } | 321 | } |
322 | } | 322 | } |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 3c51b2d827f4..228be551e9c1 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
@@ -48,6 +48,7 @@ | |||
48 | #include <linux/pim.h> | 48 | #include <linux/pim.h> |
49 | #include <net/addrconf.h> | 49 | #include <net/addrconf.h> |
50 | #include <linux/netfilter_ipv6.h> | 50 | #include <linux/netfilter_ipv6.h> |
51 | #include <net/ip6_checksum.h> | ||
51 | 52 | ||
52 | /* Big lock, protecting vif table, mrt cache and mroute socket state. | 53 | /* Big lock, protecting vif table, mrt cache and mroute socket state. |
53 | Note that the changes are semaphored via rtnl_lock. | 54 | Note that the changes are semaphored via rtnl_lock. |
@@ -365,7 +366,9 @@ static int pim6_rcv(struct sk_buff *skb) | |||
365 | pim = (struct pimreghdr *)skb_transport_header(skb); | 366 | pim = (struct pimreghdr *)skb_transport_header(skb); |
366 | if (pim->type != ((PIM_VERSION << 4) | PIM_REGISTER) || | 367 | if (pim->type != ((PIM_VERSION << 4) | PIM_REGISTER) || |
367 | (pim->flags & PIM_NULL_REGISTER) || | 368 | (pim->flags & PIM_NULL_REGISTER) || |
368 | (ip_compute_csum((void *)pim, sizeof(*pim)) != 0 && | 369 | (csum_ipv6_magic(&ipv6_hdr(skb)->saddr, &ipv6_hdr(skb)->daddr, |
370 | sizeof(*pim), IPPROTO_PIM, | ||
371 | csum_partial((void *)pim, sizeof(*pim), 0)) && | ||
369 | csum_fold(skb_checksum(skb, 0, skb->len, 0)))) | 372 | csum_fold(skb_checksum(skb, 0, skb->len, 0)))) |
370 | goto drop; | 373 | goto drop; |
371 | 374 | ||
@@ -392,7 +395,7 @@ static int pim6_rcv(struct sk_buff *skb) | |||
392 | skb_pull(skb, (u8 *)encap - skb->data); | 395 | skb_pull(skb, (u8 *)encap - skb->data); |
393 | skb_reset_network_header(skb); | 396 | skb_reset_network_header(skb); |
394 | skb->dev = reg_dev; | 397 | skb->dev = reg_dev; |
395 | skb->protocol = htons(ETH_P_IP); | 398 | skb->protocol = htons(ETH_P_IPV6); |
396 | skb->ip_summed = 0; | 399 | skb->ip_summed = 0; |
397 | skb->pkt_type = PACKET_HOST; | 400 | skb->pkt_type = PACKET_HOST; |
398 | dst_release(skb->dst); | 401 | dst_release(skb->dst); |
@@ -481,6 +484,7 @@ static int mif6_delete(struct net *net, int vifi) | |||
481 | { | 484 | { |
482 | struct mif_device *v; | 485 | struct mif_device *v; |
483 | struct net_device *dev; | 486 | struct net_device *dev; |
487 | struct inet6_dev *in6_dev; | ||
484 | if (vifi < 0 || vifi >= net->ipv6.maxvif) | 488 | if (vifi < 0 || vifi >= net->ipv6.maxvif) |
485 | return -EADDRNOTAVAIL; | 489 | return -EADDRNOTAVAIL; |
486 | 490 | ||
@@ -513,6 +517,10 @@ static int mif6_delete(struct net *net, int vifi) | |||
513 | 517 | ||
514 | dev_set_allmulti(dev, -1); | 518 | dev_set_allmulti(dev, -1); |
515 | 519 | ||
520 | in6_dev = __in6_dev_get(dev); | ||
521 | if (in6_dev) | ||
522 | in6_dev->cnf.mc_forwarding--; | ||
523 | |||
516 | if (v->flags & MIFF_REGISTER) | 524 | if (v->flags & MIFF_REGISTER) |
517 | unregister_netdevice(dev); | 525 | unregister_netdevice(dev); |
518 | 526 | ||
@@ -622,6 +630,7 @@ static int mif6_add(struct net *net, struct mif6ctl *vifc, int mrtsock) | |||
622 | int vifi = vifc->mif6c_mifi; | 630 | int vifi = vifc->mif6c_mifi; |
623 | struct mif_device *v = &net->ipv6.vif6_table[vifi]; | 631 | struct mif_device *v = &net->ipv6.vif6_table[vifi]; |
624 | struct net_device *dev; | 632 | struct net_device *dev; |
633 | struct inet6_dev *in6_dev; | ||
625 | int err; | 634 | int err; |
626 | 635 | ||
627 | /* Is vif busy ? */ | 636 | /* Is vif busy ? */ |
@@ -662,6 +671,10 @@ static int mif6_add(struct net *net, struct mif6ctl *vifc, int mrtsock) | |||
662 | return -EINVAL; | 671 | return -EINVAL; |
663 | } | 672 | } |
664 | 673 | ||
674 | in6_dev = __in6_dev_get(dev); | ||
675 | if (in6_dev) | ||
676 | in6_dev->cnf.mc_forwarding++; | ||
677 | |||
665 | /* | 678 | /* |
666 | * Fill in the VIF structures | 679 | * Fill in the VIF structures |
667 | */ | 680 | */ |
@@ -838,8 +851,6 @@ static int ip6mr_cache_report(struct net *net, struct sk_buff *pkt, mifi_t mifi, | |||
838 | 851 | ||
839 | skb->dst = dst_clone(pkt->dst); | 852 | skb->dst = dst_clone(pkt->dst); |
840 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 853 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
841 | |||
842 | skb_pull(skb, sizeof(struct ipv6hdr)); | ||
843 | } | 854 | } |
844 | 855 | ||
845 | if (net->ipv6.mroute6_sk == NULL) { | 856 | if (net->ipv6.mroute6_sk == NULL) { |
@@ -1222,8 +1233,10 @@ static int ip6mr_sk_init(struct sock *sk) | |||
1222 | 1233 | ||
1223 | rtnl_lock(); | 1234 | rtnl_lock(); |
1224 | write_lock_bh(&mrt_lock); | 1235 | write_lock_bh(&mrt_lock); |
1225 | if (likely(net->ipv6.mroute6_sk == NULL)) | 1236 | if (likely(net->ipv6.mroute6_sk == NULL)) { |
1226 | net->ipv6.mroute6_sk = sk; | 1237 | net->ipv6.mroute6_sk = sk; |
1238 | net->ipv6.devconf_all->mc_forwarding++; | ||
1239 | } | ||
1227 | else | 1240 | else |
1228 | err = -EADDRINUSE; | 1241 | err = -EADDRINUSE; |
1229 | write_unlock_bh(&mrt_lock); | 1242 | write_unlock_bh(&mrt_lock); |
@@ -1242,6 +1255,7 @@ int ip6mr_sk_done(struct sock *sk) | |||
1242 | if (sk == net->ipv6.mroute6_sk) { | 1255 | if (sk == net->ipv6.mroute6_sk) { |
1243 | write_lock_bh(&mrt_lock); | 1256 | write_lock_bh(&mrt_lock); |
1244 | net->ipv6.mroute6_sk = NULL; | 1257 | net->ipv6.mroute6_sk = NULL; |
1258 | net->ipv6.devconf_all->mc_forwarding--; | ||
1245 | write_unlock_bh(&mrt_lock); | 1259 | write_unlock_bh(&mrt_lock); |
1246 | 1260 | ||
1247 | mroute_clean_tables(net); | 1261 | mroute_clean_tables(net); |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index c4a59824ac2c..9c574235c905 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -794,7 +794,7 @@ void ip6_route_input(struct sk_buff *skb) | |||
794 | .proto = iph->nexthdr, | 794 | .proto = iph->nexthdr, |
795 | }; | 795 | }; |
796 | 796 | ||
797 | if (rt6_need_strict(&iph->daddr)) | 797 | if (rt6_need_strict(&iph->daddr) && skb->dev->type != ARPHRD_PIMREG) |
798 | flags |= RT6_LOOKUP_F_IFACE; | 798 | flags |= RT6_LOOKUP_F_IFACE; |
799 | 799 | ||
800 | skb->dst = fib6_rule_lookup(net, &fl, flags, ip6_pol_route_input); | 800 | skb->dst = fib6_rule_lookup(net, &fl, flags, ip6_pol_route_input); |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 5f94db2f3e9e..1fc4a7885c41 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -77,6 +77,7 @@ | |||
77 | #include <linux/poll.h> | 77 | #include <linux/poll.h> |
78 | #include <linux/module.h> | 78 | #include <linux/module.h> |
79 | #include <linux/init.h> | 79 | #include <linux/init.h> |
80 | #include <linux/mutex.h> | ||
80 | 81 | ||
81 | #ifdef CONFIG_INET | 82 | #ifdef CONFIG_INET |
82 | #include <net/inet_common.h> | 83 | #include <net/inet_common.h> |
@@ -175,6 +176,7 @@ struct packet_sock { | |||
175 | #endif | 176 | #endif |
176 | struct packet_type prot_hook; | 177 | struct packet_type prot_hook; |
177 | spinlock_t bind_lock; | 178 | spinlock_t bind_lock; |
179 | struct mutex pg_vec_lock; | ||
178 | unsigned int running:1, /* prot_hook is attached*/ | 180 | unsigned int running:1, /* prot_hook is attached*/ |
179 | auxdata:1, | 181 | auxdata:1, |
180 | origdev:1; | 182 | origdev:1; |
@@ -220,13 +222,13 @@ static void *packet_lookup_frame(struct packet_sock *po, unsigned int position, | |||
220 | h.raw = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size); | 222 | h.raw = po->pg_vec[pg_vec_pos] + (frame_offset * po->frame_size); |
221 | switch (po->tp_version) { | 223 | switch (po->tp_version) { |
222 | case TPACKET_V1: | 224 | case TPACKET_V1: |
223 | if (status != h.h1->tp_status ? TP_STATUS_USER : | 225 | if (status != (h.h1->tp_status ? TP_STATUS_USER : |
224 | TP_STATUS_KERNEL) | 226 | TP_STATUS_KERNEL)) |
225 | return NULL; | 227 | return NULL; |
226 | break; | 228 | break; |
227 | case TPACKET_V2: | 229 | case TPACKET_V2: |
228 | if (status != h.h2->tp_status ? TP_STATUS_USER : | 230 | if (status != (h.h2->tp_status ? TP_STATUS_USER : |
229 | TP_STATUS_KERNEL) | 231 | TP_STATUS_KERNEL)) |
230 | return NULL; | 232 | return NULL; |
231 | break; | 233 | break; |
232 | } | 234 | } |
@@ -1069,6 +1071,7 @@ static int packet_create(struct net *net, struct socket *sock, int protocol) | |||
1069 | */ | 1071 | */ |
1070 | 1072 | ||
1071 | spin_lock_init(&po->bind_lock); | 1073 | spin_lock_init(&po->bind_lock); |
1074 | mutex_init(&po->pg_vec_lock); | ||
1072 | po->prot_hook.func = packet_rcv; | 1075 | po->prot_hook.func = packet_rcv; |
1073 | 1076 | ||
1074 | if (sock->type == SOCK_PACKET) | 1077 | if (sock->type == SOCK_PACKET) |
@@ -1865,6 +1868,7 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing | |||
1865 | synchronize_net(); | 1868 | synchronize_net(); |
1866 | 1869 | ||
1867 | err = -EBUSY; | 1870 | err = -EBUSY; |
1871 | mutex_lock(&po->pg_vec_lock); | ||
1868 | if (closing || atomic_read(&po->mapped) == 0) { | 1872 | if (closing || atomic_read(&po->mapped) == 0) { |
1869 | err = 0; | 1873 | err = 0; |
1870 | #define XC(a, b) ({ __typeof__ ((a)) __t; __t = (a); (a) = (b); __t; }) | 1874 | #define XC(a, b) ({ __typeof__ ((a)) __t; __t = (a); (a) = (b); __t; }) |
@@ -1886,6 +1890,7 @@ static int packet_set_ring(struct sock *sk, struct tpacket_req *req, int closing | |||
1886 | if (atomic_read(&po->mapped)) | 1890 | if (atomic_read(&po->mapped)) |
1887 | printk(KERN_DEBUG "packet_mmap: vma is busy: %d\n", atomic_read(&po->mapped)); | 1891 | printk(KERN_DEBUG "packet_mmap: vma is busy: %d\n", atomic_read(&po->mapped)); |
1888 | } | 1892 | } |
1893 | mutex_unlock(&po->pg_vec_lock); | ||
1889 | 1894 | ||
1890 | spin_lock(&po->bind_lock); | 1895 | spin_lock(&po->bind_lock); |
1891 | if (was_running && !po->running) { | 1896 | if (was_running && !po->running) { |
@@ -1918,7 +1923,7 @@ static int packet_mmap(struct file *file, struct socket *sock, struct vm_area_st | |||
1918 | 1923 | ||
1919 | size = vma->vm_end - vma->vm_start; | 1924 | size = vma->vm_end - vma->vm_start; |
1920 | 1925 | ||
1921 | lock_sock(sk); | 1926 | mutex_lock(&po->pg_vec_lock); |
1922 | if (po->pg_vec == NULL) | 1927 | if (po->pg_vec == NULL) |
1923 | goto out; | 1928 | goto out; |
1924 | if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE) | 1929 | if (size != po->pg_vec_len*po->pg_vec_pages*PAGE_SIZE) |
@@ -1941,7 +1946,7 @@ static int packet_mmap(struct file *file, struct socket *sock, struct vm_area_st | |||
1941 | err = 0; | 1946 | err = 0; |
1942 | 1947 | ||
1943 | out: | 1948 | out: |
1944 | release_sock(sk); | 1949 | mutex_unlock(&po->pg_vec_lock); |
1945 | return err; | 1950 | return err; |
1946 | } | 1951 | } |
1947 | #endif | 1952 | #endif |
diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig index dcef600d0bf5..5592883e1e4a 100644 --- a/net/sunrpc/Kconfig +++ b/net/sunrpc/Kconfig | |||
@@ -6,7 +6,7 @@ config SUNRPC_GSS | |||
6 | 6 | ||
7 | config SUNRPC_XPRT_RDMA | 7 | config SUNRPC_XPRT_RDMA |
8 | tristate | 8 | tristate |
9 | depends on SUNRPC && INFINIBAND && EXPERIMENTAL | 9 | depends on SUNRPC && INFINIBAND && INFINIBAND_ADDR_TRANS && EXPERIMENTAL |
10 | default SUNRPC && INFINIBAND | 10 | default SUNRPC && INFINIBAND |
11 | help | 11 | help |
12 | This option allows the NFS client and server to support | 12 | This option allows the NFS client and server to support |
diff --git a/net/wimax/debugfs.c b/net/wimax/debugfs.c index 87cf4430079c..94d216a46407 100644 --- a/net/wimax/debugfs.c +++ b/net/wimax/debugfs.c | |||
@@ -28,17 +28,6 @@ | |||
28 | #include "debug-levels.h" | 28 | #include "debug-levels.h" |
29 | 29 | ||
30 | 30 | ||
31 | /* Debug framework control of debug levels */ | ||
32 | struct d_level D_LEVEL[] = { | ||
33 | D_SUBMODULE_DEFINE(debugfs), | ||
34 | D_SUBMODULE_DEFINE(id_table), | ||
35 | D_SUBMODULE_DEFINE(op_msg), | ||
36 | D_SUBMODULE_DEFINE(op_reset), | ||
37 | D_SUBMODULE_DEFINE(op_rfkill), | ||
38 | D_SUBMODULE_DEFINE(stack), | ||
39 | }; | ||
40 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
41 | |||
42 | #define __debugfs_register(prefix, name, parent) \ | 31 | #define __debugfs_register(prefix, name, parent) \ |
43 | do { \ | 32 | do { \ |
44 | result = d_level_register_debugfs(prefix, name, parent); \ | 33 | result = d_level_register_debugfs(prefix, name, parent); \ |
diff --git a/net/wimax/stack.c b/net/wimax/stack.c index d4da92f8981a..3869c0327882 100644 --- a/net/wimax/stack.c +++ b/net/wimax/stack.c | |||
@@ -516,6 +516,19 @@ void wimax_dev_rm(struct wimax_dev *wimax_dev) | |||
516 | } | 516 | } |
517 | EXPORT_SYMBOL_GPL(wimax_dev_rm); | 517 | EXPORT_SYMBOL_GPL(wimax_dev_rm); |
518 | 518 | ||
519 | |||
520 | /* Debug framework control of debug levels */ | ||
521 | struct d_level D_LEVEL[] = { | ||
522 | D_SUBMODULE_DEFINE(debugfs), | ||
523 | D_SUBMODULE_DEFINE(id_table), | ||
524 | D_SUBMODULE_DEFINE(op_msg), | ||
525 | D_SUBMODULE_DEFINE(op_reset), | ||
526 | D_SUBMODULE_DEFINE(op_rfkill), | ||
527 | D_SUBMODULE_DEFINE(stack), | ||
528 | }; | ||
529 | size_t D_LEVEL_SIZE = ARRAY_SIZE(D_LEVEL); | ||
530 | |||
531 | |||
519 | struct genl_family wimax_gnl_family = { | 532 | struct genl_family wimax_gnl_family = { |
520 | .id = GENL_ID_GENERATE, | 533 | .id = GENL_ID_GENERATE, |
521 | .name = "WiMAX", | 534 | .name = "WiMAX", |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c index bc494cef2102..85c9034c59b2 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c | |||
@@ -498,6 +498,7 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
498 | * calculate the number of reg rules we will need. We will need one | 498 | * calculate the number of reg rules we will need. We will need one |
499 | * for each channel subband */ | 499 | * for each channel subband */ |
500 | while (country_ie_len >= 3) { | 500 | while (country_ie_len >= 3) { |
501 | int end_channel = 0; | ||
501 | struct ieee80211_country_ie_triplet *triplet = | 502 | struct ieee80211_country_ie_triplet *triplet = |
502 | (struct ieee80211_country_ie_triplet *) country_ie; | 503 | (struct ieee80211_country_ie_triplet *) country_ie; |
503 | int cur_sub_max_channel = 0, cur_channel = 0; | 504 | int cur_sub_max_channel = 0, cur_channel = 0; |
@@ -509,9 +510,25 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
509 | continue; | 510 | continue; |
510 | } | 511 | } |
511 | 512 | ||
513 | /* 2 GHz */ | ||
514 | if (triplet->chans.first_channel <= 14) | ||
515 | end_channel = triplet->chans.first_channel + | ||
516 | triplet->chans.num_channels; | ||
517 | else | ||
518 | /* | ||
519 | * 5 GHz -- For example in country IEs if the first | ||
520 | * channel given is 36 and the number of channels is 4 | ||
521 | * then the individual channel numbers defined for the | ||
522 | * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 | ||
523 | * and not 36, 37, 38, 39. | ||
524 | * | ||
525 | * See: http://tinyurl.com/11d-clarification | ||
526 | */ | ||
527 | end_channel = triplet->chans.first_channel + | ||
528 | (4 * (triplet->chans.num_channels - 1)); | ||
529 | |||
512 | cur_channel = triplet->chans.first_channel; | 530 | cur_channel = triplet->chans.first_channel; |
513 | cur_sub_max_channel = ieee80211_channel_to_frequency( | 531 | cur_sub_max_channel = end_channel; |
514 | cur_channel + triplet->chans.num_channels); | ||
515 | 532 | ||
516 | /* Basic sanity check */ | 533 | /* Basic sanity check */ |
517 | if (cur_sub_max_channel < cur_channel) | 534 | if (cur_sub_max_channel < cur_channel) |
@@ -590,15 +607,6 @@ static struct ieee80211_regdomain *country_ie_2_rd( | |||
590 | end_channel = triplet->chans.first_channel + | 607 | end_channel = triplet->chans.first_channel + |
591 | triplet->chans.num_channels; | 608 | triplet->chans.num_channels; |
592 | else | 609 | else |
593 | /* | ||
594 | * 5 GHz -- For example in country IEs if the first | ||
595 | * channel given is 36 and the number of channels is 4 | ||
596 | * then the individual channel numbers defined for the | ||
597 | * 5 GHz PHY by these parameters are: 36, 40, 44, and 48 | ||
598 | * and not 36, 37, 38, 39. | ||
599 | * | ||
600 | * See: http://tinyurl.com/11d-clarification | ||
601 | */ | ||
602 | end_channel = triplet->chans.first_channel + | 610 | end_channel = triplet->chans.first_channel + |
603 | (4 * (triplet->chans.num_channels - 1)); | 611 | (4 * (triplet->chans.num_channels - 1)); |
604 | 612 | ||
@@ -1276,7 +1284,7 @@ static void reg_country_ie_process_debug( | |||
1276 | if (intersected_rd) { | 1284 | if (intersected_rd) { |
1277 | printk(KERN_DEBUG "cfg80211: We intersect both of these " | 1285 | printk(KERN_DEBUG "cfg80211: We intersect both of these " |
1278 | "and get:\n"); | 1286 | "and get:\n"); |
1279 | print_regdomain_info(rd); | 1287 | print_regdomain_info(intersected_rd); |
1280 | return; | 1288 | return; |
1281 | } | 1289 | } |
1282 | printk(KERN_DEBUG "cfg80211: Intersection between both failed\n"); | 1290 | printk(KERN_DEBUG "cfg80211: Intersection between both failed\n"); |