Commit 9d14070f656addddce3d63fd483de46930b51850

Authored by Paul Mundt

Merge branch 'sh/hwblk' into sh-latest

Showing 18 changed files Side-by-side Diff

arch/sh/boards/mach-ap325rxa/setup.c
... ... @@ -249,9 +249,6 @@
249 249 .dev = {
250 250 .platform_data = &lcdc_info,
251 251 },
252   - .archdata = {
253   - .hwblk_id = HWBLK_LCDC,
254   - },
255 252 };
256 253  
257 254 static void camera_power(int val)
... ... @@ -424,9 +421,6 @@
424 421 .dev = {
425 422 .platform_data = &sh_mobile_ceu_info,
426 423 },
427   - .archdata = {
428   - .hwblk_id = HWBLK_CEU,
429   - },
430 424 };
431 425  
432 426 static struct resource sdhi0_cn3_resources[] = {
... ... @@ -454,9 +448,6 @@
454 448 .dev = {
455 449 .platform_data = &sdhi0_cn3_data,
456 450 },
457   - .archdata = {
458   - .hwblk_id = HWBLK_SDHI0,
459   - },
460 451 };
461 452  
462 453 static struct resource sdhi1_cn7_resources[] = {
... ... @@ -483,9 +474,6 @@
483 474 .resource = sdhi1_cn7_resources,
484 475 .dev = {
485 476 .platform_data = &sdhi1_cn7_data,
486   - },
487   - .archdata = {
488   - .hwblk_id = HWBLK_SDHI1,
489 477 },
490 478 };
491 479  
arch/sh/boards/mach-ecovec24/setup.c
... ... @@ -156,9 +156,6 @@
156 156 },
157 157 .num_resources = ARRAY_SIZE(sh_eth_resources),
158 158 .resource = sh_eth_resources,
159   - .archdata = {
160   - .hwblk_id = HWBLK_ETHER,
161   - },
162 159 };
163 160  
164 161 /* USB0 host */
... ... @@ -278,9 +275,6 @@
278 275 },
279 276 .num_resources = ARRAY_SIZE(usbhs_resources),
280 277 .resource = usbhs_resources,
281   - .archdata = {
282   - .hwblk_id = HWBLK_USB1,
283   - },
284 278 };
285 279  
286 280 /* LCDC */
... ... @@ -366,9 +360,6 @@
366 360 .dev = {
367 361 .platform_data = &lcdc_info,
368 362 },
369   - .archdata = {
370   - .hwblk_id = HWBLK_LCDC,
371   - },
372 363 };
373 364  
374 365 /* CEU0 */
... ... @@ -400,9 +391,6 @@
400 391 .dev = {
401 392 .platform_data = &sh_mobile_ceu0_info,
402 393 },
403   - .archdata = {
404   - .hwblk_id = HWBLK_CEU0,
405   - },
406 394 };
407 395  
408 396 /* CEU1 */
... ... @@ -434,9 +422,6 @@
434 422 .dev = {
435 423 .platform_data = &sh_mobile_ceu1_info,
436 424 },
437   - .archdata = {
438   - .hwblk_id = HWBLK_CEU1,
439   - },
440 425 };
441 426  
442 427 /* I2C device */
... ... @@ -491,9 +476,6 @@
491 476 .dev = {
492 477 .platform_data = &keysc_info,
493 478 },
494   - .archdata = {
495   - .hwblk_id = HWBLK_KEYSC,
496   - },
497 479 };
498 480  
499 481 /* TouchScreen */
... ... @@ -568,9 +550,6 @@
568 550 .dev = {
569 551 .platform_data = &sdhi0_info,
570 552 },
571   - .archdata = {
572   - .hwblk_id = HWBLK_SDHI0,
573   - },
574 553 };
575 554  
576 555 #if !defined(CONFIG_MMC_SH_MMCIF) && !defined(CONFIG_MMC_SH_MMCIF_MODULE)
... ... @@ -608,9 +587,6 @@
608 587 .dev = {
609 588 .platform_data = &sdhi1_info,
610 589 },
611   - .archdata = {
612   - .hwblk_id = HWBLK_SDHI1,
613   - },
614 590 };
615 591 #endif /* CONFIG_MMC_SH_MMCIF */
616 592  
... ... @@ -676,9 +652,6 @@
676 652 },
677 653 .num_resources = ARRAY_SIZE(msiof0_resources),
678 654 .resource = msiof0_resources,
679   - .archdata = {
680   - .hwblk_id = HWBLK_MSIOF0,
681   - },
682 655 };
683 656  
684 657 #endif
... ... @@ -818,9 +791,6 @@
818 791 .dev = {
819 792 .platform_data = &fsi_info,
820 793 },
821   - .archdata = {
822   - .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
823   - },
824 794 };
825 795  
826 796 /* IrDA */
... ... @@ -882,9 +852,6 @@
882 852 .dev = {
883 853 .platform_data = &sh_vou_pdata,
884 854 },
885   - .archdata = {
886   - .hwblk_id = HWBLK_VOU,
887   - },
888 855 };
889 856  
890 857 #if defined(CONFIG_MMC_SH_MMCIF) || defined(CONFIG_MMC_SH_MMCIF_MODULE)
... ... @@ -936,9 +903,6 @@
936 903 },
937 904 .num_resources = ARRAY_SIZE(sh_mmcif_resources),
938 905 .resource = sh_mmcif_resources,
939   - .archdata = {
940   - .hwblk_id = HWBLK_MMC,
941   - },
942 906 };
943 907 #endif
944 908  
arch/sh/boards/mach-kfr2r09/setup.c
... ... @@ -122,9 +122,6 @@
122 122 .dev = {
123 123 .platform_data = &kfr2r09_sh_keysc_info,
124 124 },
125   - .archdata = {
126   - .hwblk_id = HWBLK_KEYSC,
127   - },
128 125 };
129 126  
130 127 static const struct fb_videomode kfr2r09_lcdc_modes[] = {
... ... @@ -191,9 +188,6 @@
191 188 .dev = {
192 189 .platform_data = &kfr2r09_sh_lcdc_info,
193 190 },
194   - .archdata = {
195   - .hwblk_id = HWBLK_LCDC,
196   - },
197 191 };
198 192  
199 193 static struct r8a66597_platdata kfr2r09_usb0_gadget_data = {
... ... @@ -254,9 +248,6 @@
254 248 .dev = {
255 249 .platform_data = &sh_mobile_ceu_info,
256 250 },
257   - .archdata = {
258   - .hwblk_id = HWBLK_CEU0,
259   - },
260 251 };
261 252  
262 253 static struct i2c_board_info kfr2r09_i2c_camera = {
... ... @@ -376,9 +367,6 @@
376 367 .resource = kfr2r09_sh_sdhi0_resources,
377 368 .dev = {
378 369 .platform_data = &sh7724_sdhi0_data,
379   - },
380   - .archdata = {
381   - .hwblk_id = HWBLK_SDHI0,
382 370 },
383 371 };
384 372  
arch/sh/boards/mach-migor/setup.c
... ... @@ -99,9 +99,6 @@
99 99 .dev = {
100 100 .platform_data = &sh_keysc_info,
101 101 },
102   - .archdata = {
103   - .hwblk_id = HWBLK_KEYSC,
104   - },
105 102 };
106 103  
107 104 static struct mtd_partition migor_nor_flash_partitions[] =
... ... @@ -300,9 +297,6 @@
300 297 .dev = {
301 298 .platform_data = &sh_mobile_lcdc_info,
302 299 },
303   - .archdata = {
304   - .hwblk_id = HWBLK_LCDC,
305   - },
306 300 };
307 301  
308 302 static struct clk *camera_clk;
... ... @@ -390,9 +384,6 @@
390 384 .dev = {
391 385 .platform_data = &sh_mobile_ceu_info,
392 386 },
393   - .archdata = {
394   - .hwblk_id = HWBLK_CEU,
395   - },
396 387 };
397 388  
398 389 static struct resource sdhi_cn9_resources[] = {
... ... @@ -420,9 +411,6 @@
420 411 .resource = sdhi_cn9_resources,
421 412 .dev = {
422 413 .platform_data = &sh7724_sdhi_data,
423   - },
424   - .archdata = {
425   - .hwblk_id = HWBLK_SDHI,
426 414 },
427 415 };
428 416  
arch/sh/boards/mach-se/7722/setup.c
... ... @@ -127,9 +127,6 @@
127 127 .dev = {
128 128 .platform_data = &sh_keysc_info,
129 129 },
130   - .archdata = {
131   - .hwblk_id = HWBLK_KEYSC,
132   - },
133 130 };
134 131  
135 132 static struct platform_device *se7722_devices[] __initdata = {
arch/sh/boards/mach-se/7724/setup.c
... ... @@ -210,9 +210,6 @@
210 210 .dev = {
211 211 .platform_data = &lcdc_info,
212 212 },
213   - .archdata = {
214   - .hwblk_id = HWBLK_LCDC,
215   - },
216 213 };
217 214  
218 215 /* CEU0 */
... ... @@ -244,9 +241,6 @@
244 241 .dev = {
245 242 .platform_data = &sh_mobile_ceu0_info,
246 243 },
247   - .archdata = {
248   - .hwblk_id = HWBLK_CEU0,
249   - },
250 244 };
251 245  
252 246 /* CEU1 */
... ... @@ -278,9 +272,6 @@
278 272 .dev = {
279 273 .platform_data = &sh_mobile_ceu1_info,
280 274 },
281   - .archdata = {
282   - .hwblk_id = HWBLK_CEU1,
283   - },
284 275 };
285 276  
286 277 /* FSI */
... ... @@ -310,9 +301,6 @@
310 301 .dev = {
311 302 .platform_data = &fsi_info,
312 303 },
313   - .archdata = {
314   - .hwblk_id = HWBLK_SPU, /* FSI needs SPU hwblk */
315   - },
316 304 };
317 305  
318 306 static struct platform_device fsi_ak4642_device = {
... ... @@ -355,9 +343,6 @@
355 343 .dev = {
356 344 .platform_data = &keysc_info,
357 345 },
358   - .archdata = {
359   - .hwblk_id = HWBLK_KEYSC,
360   - },
361 346 };
362 347  
363 348 /* SH Eth */
... ... @@ -386,9 +371,6 @@
386 371 },
387 372 .num_resources = ARRAY_SIZE(sh_eth_resources),
388 373 .resource = sh_eth_resources,
389   - .archdata = {
390   - .hwblk_id = HWBLK_ETHER,
391   - },
392 374 };
393 375  
394 376 static struct r8a66597_platdata sh7724_usb0_host_data = {
... ... @@ -418,9 +400,6 @@
418 400 },
419 401 .num_resources = ARRAY_SIZE(sh7724_usb0_host_resources),
420 402 .resource = sh7724_usb0_host_resources,
421   - .archdata = {
422   - .hwblk_id = HWBLK_USB0,
423   - },
424 403 };
425 404  
426 405 static struct r8a66597_platdata sh7724_usb1_gadget_data = {
... ... @@ -479,9 +458,6 @@
479 458 .dev = {
480 459 .platform_data = &sh7724_sdhi0_data,
481 460 },
482   - .archdata = {
483   - .hwblk_id = HWBLK_SDHI0,
484   - },
485 461 };
486 462  
487 463 static struct resource sdhi1_cn8_resources[] = {
... ... @@ -511,9 +487,6 @@
511 487 .dev = {
512 488 .platform_data = &sh7724_sdhi1_data,
513 489 },
514   - .archdata = {
515   - .hwblk_id = HWBLK_SDHI1,
516   - },
517 490 };
518 491  
519 492 /* IrDA */
... ... @@ -575,9 +548,6 @@
575 548 .resource = sh_vou_resources,
576 549 .dev = {
577 550 .platform_data = &sh_vou_pdata,
578   - },
579   - .archdata = {
580   - .hwblk_id = HWBLK_VOU,
581 551 },
582 552 };
583 553  
arch/sh/include/asm/device.h
... ... @@ -15,6 +15,5 @@
15 15 void plat_early_device_setup(void);
16 16  
17 17 struct pdev_archdata {
18   - int hwblk_id;
19 18 };
arch/sh/include/asm/hwblk.h
1   -#ifndef __ASM_SH_HWBLK_H
2   -#define __ASM_SH_HWBLK_H
3   -
4   -#include <asm/clock.h>
5   -#include <asm/io.h>
6   -
7   -#define HWBLK_CNT_USAGE 0
8   -#define HWBLK_CNT_IDLE 1
9   -#define HWBLK_CNT_DEVICES 2
10   -#define HWBLK_CNT_NR 3
11   -
12   -#define HWBLK_AREA_FLAG_PARENT (1 << 0) /* valid parent */
13   -
14   -#define HWBLK_AREA(_flags, _parent) \
15   -{ \
16   - .flags = _flags, \
17   - .parent = _parent, \
18   -}
19   -
20   -struct hwblk_area {
21   - int cnt[HWBLK_CNT_NR];
22   - unsigned char parent;
23   - unsigned char flags;
24   -};
25   -
26   -#define HWBLK(_mstp, _bit, _area) \
27   -{ \
28   - .mstp = (void __iomem *)_mstp, \
29   - .bit = _bit, \
30   - .area = _area, \
31   -}
32   -
33   -struct hwblk {
34   - void __iomem *mstp;
35   - unsigned char bit;
36   - unsigned char area;
37   - int cnt[HWBLK_CNT_NR];
38   -};
39   -
40   -struct hwblk_info {
41   - struct hwblk_area *areas;
42   - int nr_areas;
43   - struct hwblk *hwblks;
44   - int nr_hwblks;
45   -};
46   -
47   -#if !defined(CONFIG_CPU_SUBTYPE_SH7722) && \
48   - !defined(CONFIG_CPU_SUBTYPE_SH7723) && \
49   - !defined(CONFIG_CPU_SUBTYPE_SH7724)
50   -/* Should be defined by processor-specific code */
51   -int arch_hwblk_init(void);
52   -int arch_hwblk_sleep_mode(void);
53   -
54   -int hwblk_register(struct hwblk_info *info);
55   -int hwblk_init(void);
56   -
57   -void hwblk_enable(struct hwblk_info *info, int hwblk);
58   -void hwblk_disable(struct hwblk_info *info, int hwblk);
59   -
60   -void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int cnt);
61   -void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int cnt);
62   -
63   -/* allow clocks to enable and disable hardware blocks */
64   -#define SH_HWBLK_CLK(_hwblk, _parent, _flags) \
65   -[_hwblk] = { \
66   - .parent = _parent, \
67   - .arch_flags = _hwblk, \
68   - .flags = _flags, \
69   -}
70   -
71   -int sh_hwblk_clk_register(struct clk *clks, int nr);
72   -#else
73   -#define hwblk_init() 0
74   -#endif
75   -#endif /* __ASM_SH_HWBLK_H */
arch/sh/include/cpu-sh4/cpu/sh7722.h
... ... @@ -222,14 +222,11 @@
222 222 };
223 223  
224 224 enum {
225   - HWBLK_UNKNOWN = 0,
226   - HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_URAM, HWBLK_XYMEM,
227   - HWBLK_INTC, HWBLK_DMAC, HWBLK_SHYWAY, HWBLK_HUDI,
228   - HWBLK_UBC, HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL,
229   - HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SIO,
230   - HWBLK_SIOF0, HWBLK_SIOF1, HWBLK_IIC, HWBLK_RTC,
231   - HWBLK_TPU, HWBLK_IRDA, HWBLK_SDHI, HWBLK_SIM, HWBLK_KEYSC,
232   - HWBLK_TSIF, HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU,
  225 + HWBLK_URAM, HWBLK_XYMEM,
  226 + HWBLK_TMU, HWBLK_CMT, HWBLK_RWDT, HWBLK_FLCTL,
  227 + HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_IIC, HWBLK_RTC,
  228 + HWBLK_SDHI, HWBLK_KEYSC,
  229 + HWBLK_USBF, HWBLK_2DG, HWBLK_SIU, HWBLK_VOU,
233 230 HWBLK_JPU, HWBLK_BEU, HWBLK_CEU, HWBLK_VEU, HWBLK_VPU,
234 231 HWBLK_LCDC,
235 232 HWBLK_NR,
arch/sh/include/cpu-sh4/cpu/sh7723.h
... ... @@ -266,10 +266,9 @@
266 266 };
267 267  
268 268 enum {
269   - HWBLK_UNKNOWN = 0,
270 269 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_L2C, HWBLK_ILMEM, HWBLK_FPU,
271 270 HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
272   - HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC, HWBLK_SUBC,
  271 + HWBLK_HUDI, HWBLK_UBC,
273 272 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
274 273 HWBLK_FLCTL,
275 274 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2,
arch/sh/include/cpu-sh4/cpu/sh7724.h
... ... @@ -268,10 +268,9 @@
268 268 };
269 269  
270 270 enum {
271   - HWBLK_UNKNOWN = 0,
272 271 HWBLK_TLB, HWBLK_IC, HWBLK_OC, HWBLK_RSMEM, HWBLK_ILMEM, HWBLK_L2C,
273 272 HWBLK_FPU, HWBLK_INTC, HWBLK_DMAC0, HWBLK_SHYWAY,
274   - HWBLK_HUDI, HWBLK_DBG, HWBLK_UBC,
  273 + HWBLK_HUDI, HWBLK_UBC,
275 274 HWBLK_TMU0, HWBLK_CMT, HWBLK_RWDT, HWBLK_DMAC1, HWBLK_TMU1,
276 275 HWBLK_SCIF0, HWBLK_SCIF1, HWBLK_SCIF2, HWBLK_SCIF3,
277 276 HWBLK_SCIF4, HWBLK_SCIF5, HWBLK_MSIOF0, HWBLK_MSIOF1,
arch/sh/kernel/cpu/Makefile
... ... @@ -19,7 +19,4 @@
19 19 obj-$(CONFIG_SH_CLK_CPG_LEGACY) += clock-cpg.o
20 20  
21 21 obj-y += irq/ init.o clock.o fpu.o proc.o
22   -ifneq ($(CONFIG_CPU_SUBTYPE_SH7722)$(CONFIG_CPU_SUBTYPE_SH7723)$(CONFIG_CPU_SUBTYPE_SH7724),y)
23   -obj-y += hwblk.o
24   -endif
arch/sh/kernel/cpu/hwblk.c
1   -#include <linux/clk.h>
2   -#include <linux/compiler.h>
3   -#include <linux/io.h>
4   -#include <linux/spinlock.h>
5   -#include <asm/suspend.h>
6   -#include <asm/hwblk.h>
7   -#include <asm/clock.h>
8   -
9   -static DEFINE_SPINLOCK(hwblk_lock);
10   -
11   -static void hwblk_area_mod_cnt(struct hwblk_info *info,
12   - int area, int counter, int value, int goal)
13   -{
14   - struct hwblk_area *hap = info->areas + area;
15   -
16   - hap->cnt[counter] += value;
17   -
18   - if (hap->cnt[counter] != goal)
19   - return;
20   -
21   - if (hap->flags & HWBLK_AREA_FLAG_PARENT)
22   - hwblk_area_mod_cnt(info, hap->parent, counter, value, goal);
23   -}
24   -
25   -
26   -static int __hwblk_mod_cnt(struct hwblk_info *info, int hwblk,
27   - int counter, int value, int goal)
28   -{
29   - struct hwblk *hp = info->hwblks + hwblk;
30   -
31   - hp->cnt[counter] += value;
32   - if (hp->cnt[counter] == goal)
33   - hwblk_area_mod_cnt(info, hp->area, counter, value, goal);
34   -
35   - return hp->cnt[counter];
36   -}
37   -
38   -static void hwblk_mod_cnt(struct hwblk_info *info, int hwblk,
39   - int counter, int value, int goal)
40   -{
41   - unsigned long flags;
42   -
43   - spin_lock_irqsave(&hwblk_lock, flags);
44   - __hwblk_mod_cnt(info, hwblk, counter, value, goal);
45   - spin_unlock_irqrestore(&hwblk_lock, flags);
46   -}
47   -
48   -void hwblk_cnt_inc(struct hwblk_info *info, int hwblk, int counter)
49   -{
50   - hwblk_mod_cnt(info, hwblk, counter, 1, 1);
51   -}
52   -
53   -void hwblk_cnt_dec(struct hwblk_info *info, int hwblk, int counter)
54   -{
55   - hwblk_mod_cnt(info, hwblk, counter, -1, 0);
56   -}
57   -
58   -void hwblk_enable(struct hwblk_info *info, int hwblk)
59   -{
60   - struct hwblk *hp = info->hwblks + hwblk;
61   - unsigned long tmp;
62   - unsigned long flags;
63   - int ret;
64   -
65   - spin_lock_irqsave(&hwblk_lock, flags);
66   -
67   - ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, 1, 1);
68   - if (ret == 1) {
69   - tmp = __raw_readl(hp->mstp);
70   - tmp &= ~(1 << hp->bit);
71   - __raw_writel(tmp, hp->mstp);
72   - }
73   -
74   - spin_unlock_irqrestore(&hwblk_lock, flags);
75   -}
76   -
77   -void hwblk_disable(struct hwblk_info *info, int hwblk)
78   -{
79   - struct hwblk *hp = info->hwblks + hwblk;
80   - unsigned long tmp;
81   - unsigned long flags;
82   - int ret;
83   -
84   - spin_lock_irqsave(&hwblk_lock, flags);
85   -
86   - ret = __hwblk_mod_cnt(info, hwblk, HWBLK_CNT_USAGE, -1, 0);
87   - if (ret == 0) {
88   - tmp = __raw_readl(hp->mstp);
89   - tmp |= 1 << hp->bit;
90   - __raw_writel(tmp, hp->mstp);
91   - }
92   -
93   - spin_unlock_irqrestore(&hwblk_lock, flags);
94   -}
95   -
96   -struct hwblk_info *hwblk_info;
97   -
98   -int __init hwblk_register(struct hwblk_info *info)
99   -{
100   - hwblk_info = info;
101   - return 0;
102   -}
103   -
104   -int __init __weak arch_hwblk_init(void)
105   -{
106   - return 0;
107   -}
108   -
109   -int __weak arch_hwblk_sleep_mode(void)
110   -{
111   - return SUSP_SH_SLEEP;
112   -}
113   -
114   -int __init hwblk_init(void)
115   -{
116   - return arch_hwblk_init();
117   -}
118   -
119   -/* allow clocks to enable and disable hardware blocks */
120   -static int sh_hwblk_clk_enable(struct clk *clk)
121   -{
122   - if (!hwblk_info)
123   - return -ENOENT;
124   -
125   - hwblk_enable(hwblk_info, clk->arch_flags);
126   - return 0;
127   -}
128   -
129   -static void sh_hwblk_clk_disable(struct clk *clk)
130   -{
131   - if (hwblk_info)
132   - hwblk_disable(hwblk_info, clk->arch_flags);
133   -}
134   -
135   -static struct clk_ops sh_hwblk_clk_ops = {
136   - .enable = sh_hwblk_clk_enable,
137   - .disable = sh_hwblk_clk_disable,
138   - .recalc = followparent_recalc,
139   -};
140   -
141   -int __init sh_hwblk_clk_register(struct clk *clks, int nr)
142   -{
143   - struct clk *clkp;
144   - int ret = 0;
145   - int k;
146   -
147   - for (k = 0; !ret && (k < nr); k++) {
148   - clkp = clks + k;
149   -
150   - /* skip over clocks using hwblk 0 (HWBLK_UNKNOWN) */
151   - if (!clkp->arch_flags)
152   - continue;
153   -
154   - clkp->ops = &sh_hwblk_clk_ops;
155   - ret |= clk_register(clkp);
156   - }
157   -
158   - return ret;
159   -}
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
... ... @@ -173,9 +173,6 @@
173 173 .dev = {
174 174 .platform_data = &dma_platform_data,
175 175 },
176   - .archdata = {
177   - .hwblk_id = HWBLK_DMAC,
178   - },
179 176 };
180 177  
181 178 /* Serial */
... ... @@ -264,9 +261,6 @@
264 261 .id = -1,
265 262 .num_resources = ARRAY_SIZE(rtc_resources),
266 263 .resource = rtc_resources,
267   - .archdata = {
268   - .hwblk_id = HWBLK_RTC,
269   - },
270 264 };
271 265  
272 266 static struct m66592_platdata usbf_platdata = {
... ... @@ -297,9 +291,6 @@
297 291 },
298 292 .num_resources = ARRAY_SIZE(usbf_resources),
299 293 .resource = usbf_resources,
300   - .archdata = {
301   - .hwblk_id = HWBLK_USBF,
302   - },
303 294 };
304 295  
305 296 static struct resource iic_resources[] = {
... ... @@ -321,9 +312,6 @@
321 312 .id = 0, /* "i2c0" clock */
322 313 .num_resources = ARRAY_SIZE(iic_resources),
323 314 .resource = iic_resources,
324   - .archdata = {
325   - .hwblk_id = HWBLK_IIC,
326   - },
327 315 };
328 316  
329 317 static struct uio_info vpu_platform_data = {
... ... @@ -352,9 +340,6 @@
352 340 },
353 341 .resource = vpu_resources,
354 342 .num_resources = ARRAY_SIZE(vpu_resources),
355   - .archdata = {
356   - .hwblk_id = HWBLK_VPU,
357   - },
358 343 };
359 344  
360 345 static struct uio_info veu_platform_data = {
... ... @@ -383,9 +368,6 @@
383 368 },
384 369 .resource = veu_resources,
385 370 .num_resources = ARRAY_SIZE(veu_resources),
386   - .archdata = {
387   - .hwblk_id = HWBLK_VEU,
388   - },
389 371 };
390 372  
391 373 static struct uio_info jpu_platform_data = {
... ... @@ -414,9 +396,6 @@
414 396 },
415 397 .resource = jpu_resources,
416 398 .num_resources = ARRAY_SIZE(jpu_resources),
417   - .archdata = {
418   - .hwblk_id = HWBLK_JPU,
419   - },
420 399 };
421 400  
422 401 static struct sh_timer_config cmt_platform_data = {
... ... @@ -446,9 +425,6 @@
446 425 },
447 426 .resource = cmt_resources,
448 427 .num_resources = ARRAY_SIZE(cmt_resources),
449   - .archdata = {
450   - .hwblk_id = HWBLK_CMT,
451   - },
452 428 };
453 429  
454 430 static struct sh_timer_config tmu0_platform_data = {
... ... @@ -477,9 +453,6 @@
477 453 },
478 454 .resource = tmu0_resources,
479 455 .num_resources = ARRAY_SIZE(tmu0_resources),
480   - .archdata = {
481   - .hwblk_id = HWBLK_TMU,
482   - },
483 456 };
484 457  
485 458 static struct sh_timer_config tmu1_platform_data = {
... ... @@ -508,9 +481,6 @@
508 481 },
509 482 .resource = tmu1_resources,
510 483 .num_resources = ARRAY_SIZE(tmu1_resources),
511   - .archdata = {
512   - .hwblk_id = HWBLK_TMU,
513   - },
514 484 };
515 485  
516 486 static struct sh_timer_config tmu2_platform_data = {
... ... @@ -538,9 +508,6 @@
538 508 },
539 509 .resource = tmu2_resources,
540 510 .num_resources = ARRAY_SIZE(tmu2_resources),
541   - .archdata = {
542   - .hwblk_id = HWBLK_TMU,
543   - },
544 511 };
545 512  
546 513 static struct siu_platform siu_platform_data = {
... ... @@ -571,9 +538,6 @@
571 538 },
572 539 .resource = siu_resources,
573 540 .num_resources = ARRAY_SIZE(siu_resources),
574   - .archdata = {
575   - .hwblk_id = HWBLK_SIU,
576   - },
577 541 };
578 542  
579 543 static struct platform_device *sh7722_devices[] __initdata = {
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
... ... @@ -158,9 +158,6 @@
158 158 },
159 159 .resource = vpu_resources,
160 160 .num_resources = ARRAY_SIZE(vpu_resources),
161   - .archdata = {
162   - .hwblk_id = HWBLK_VPU,
163   - },
164 161 };
165 162  
166 163 static struct uio_info veu0_platform_data = {
... ... @@ -189,9 +186,6 @@
189 186 },
190 187 .resource = veu0_resources,
191 188 .num_resources = ARRAY_SIZE(veu0_resources),
192   - .archdata = {
193   - .hwblk_id = HWBLK_VEU2H0,
194   - },
195 189 };
196 190  
197 191 static struct uio_info veu1_platform_data = {
... ... @@ -220,9 +214,6 @@
220 214 },
221 215 .resource = veu1_resources,
222 216 .num_resources = ARRAY_SIZE(veu1_resources),
223   - .archdata = {
224   - .hwblk_id = HWBLK_VEU2H1,
225   - },
226 217 };
227 218  
228 219 static struct sh_timer_config cmt_platform_data = {
... ... @@ -252,9 +243,6 @@
252 243 },
253 244 .resource = cmt_resources,
254 245 .num_resources = ARRAY_SIZE(cmt_resources),
255   - .archdata = {
256   - .hwblk_id = HWBLK_CMT,
257   - },
258 246 };
259 247  
260 248 static struct sh_timer_config tmu0_platform_data = {
... ... @@ -283,9 +271,6 @@
283 271 },
284 272 .resource = tmu0_resources,
285 273 .num_resources = ARRAY_SIZE(tmu0_resources),
286   - .archdata = {
287   - .hwblk_id = HWBLK_TMU0,
288   - },
289 274 };
290 275  
291 276 static struct sh_timer_config tmu1_platform_data = {
... ... @@ -314,9 +299,6 @@
314 299 },
315 300 .resource = tmu1_resources,
316 301 .num_resources = ARRAY_SIZE(tmu1_resources),
317   - .archdata = {
318   - .hwblk_id = HWBLK_TMU0,
319   - },
320 302 };
321 303  
322 304 static struct sh_timer_config tmu2_platform_data = {
... ... @@ -344,9 +326,6 @@
344 326 },
345 327 .resource = tmu2_resources,
346 328 .num_resources = ARRAY_SIZE(tmu2_resources),
347   - .archdata = {
348   - .hwblk_id = HWBLK_TMU0,
349   - },
350 329 };
351 330  
352 331 static struct sh_timer_config tmu3_platform_data = {
... ... @@ -374,9 +353,6 @@
374 353 },
375 354 .resource = tmu3_resources,
376 355 .num_resources = ARRAY_SIZE(tmu3_resources),
377   - .archdata = {
378   - .hwblk_id = HWBLK_TMU1,
379   - },
380 356 };
381 357  
382 358 static struct sh_timer_config tmu4_platform_data = {
... ... @@ -404,9 +380,6 @@
404 380 },
405 381 .resource = tmu4_resources,
406 382 .num_resources = ARRAY_SIZE(tmu4_resources),
407   - .archdata = {
408   - .hwblk_id = HWBLK_TMU1,
409   - },
410 383 };
411 384  
412 385 static struct sh_timer_config tmu5_platform_data = {
... ... @@ -434,9 +407,6 @@
434 407 },
435 408 .resource = tmu5_resources,
436 409 .num_resources = ARRAY_SIZE(tmu5_resources),
437   - .archdata = {
438   - .hwblk_id = HWBLK_TMU1,
439   - },
440 410 };
441 411  
442 412 static struct resource rtc_resources[] = {
... ... @@ -467,9 +437,6 @@
467 437 .id = -1,
468 438 .num_resources = ARRAY_SIZE(rtc_resources),
469 439 .resource = rtc_resources,
470   - .archdata = {
471   - .hwblk_id = HWBLK_RTC,
472   - },
473 440 };
474 441  
475 442 static struct r8a66597_platdata r8a66597_data = {
... ... @@ -499,9 +466,6 @@
499 466 },
500 467 .num_resources = ARRAY_SIZE(sh7723_usb_host_resources),
501 468 .resource = sh7723_usb_host_resources,
502   - .archdata = {
503   - .hwblk_id = HWBLK_USB,
504   - },
505 469 };
506 470  
507 471 static struct resource iic_resources[] = {
... ... @@ -523,9 +487,6 @@
523 487 .id = 0, /* "i2c0" clock */
524 488 .num_resources = ARRAY_SIZE(iic_resources),
525 489 .resource = iic_resources,
526   - .archdata = {
527   - .hwblk_id = HWBLK_IIC,
528   - },
529 490 };
530 491  
531 492 static struct platform_device *sh7723_devices[] __initdata = {
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
... ... @@ -275,9 +275,6 @@
275 275 .dev = {
276 276 .platform_data = &dma_platform_data,
277 277 },
278   - .archdata = {
279   - .hwblk_id = HWBLK_DMAC0,
280   - },
281 278 };
282 279  
283 280 static struct platform_device dma1_device = {
... ... @@ -288,9 +285,6 @@
288 285 .dev = {
289 286 .platform_data = &dma_platform_data,
290 287 },
291   - .archdata = {
292   - .hwblk_id = HWBLK_DMAC1,
293   - },
294 288 };
295 289  
296 290 /* Serial */
... ... @@ -434,9 +428,6 @@
434 428 .id = -1,
435 429 .num_resources = ARRAY_SIZE(rtc_resources),
436 430 .resource = rtc_resources,
437   - .archdata = {
438   - .hwblk_id = HWBLK_RTC,
439   - },
440 431 };
441 432  
442 433 /* I2C0 */
... ... @@ -459,9 +450,6 @@
459 450 .id = 0, /* "i2c0" clock */
460 451 .num_resources = ARRAY_SIZE(iic0_resources),
461 452 .resource = iic0_resources,
462   - .archdata = {
463   - .hwblk_id = HWBLK_IIC0,
464   - },
465 453 };
466 454  
467 455 /* I2C1 */
... ... @@ -484,9 +472,6 @@
484 472 .id = 1, /* "i2c1" clock */
485 473 .num_resources = ARRAY_SIZE(iic1_resources),
486 474 .resource = iic1_resources,
487   - .archdata = {
488   - .hwblk_id = HWBLK_IIC1,
489   - },
490 475 };
491 476  
492 477 /* VPU */
... ... @@ -516,9 +501,6 @@
516 501 },
517 502 .resource = vpu_resources,
518 503 .num_resources = ARRAY_SIZE(vpu_resources),
519   - .archdata = {
520   - .hwblk_id = HWBLK_VPU,
521   - },
522 504 };
523 505  
524 506 /* VEU0 */
... ... @@ -548,9 +530,6 @@
548 530 },
549 531 .resource = veu0_resources,
550 532 .num_resources = ARRAY_SIZE(veu0_resources),
551   - .archdata = {
552   - .hwblk_id = HWBLK_VEU0,
553   - },
554 533 };
555 534  
556 535 /* VEU1 */
... ... @@ -580,9 +559,6 @@
580 559 },
581 560 .resource = veu1_resources,
582 561 .num_resources = ARRAY_SIZE(veu1_resources),
583   - .archdata = {
584   - .hwblk_id = HWBLK_VEU1,
585   - },
586 562 };
587 563  
588 564 /* BEU0 */
... ... @@ -612,9 +588,6 @@
612 588 },
613 589 .resource = beu0_resources,
614 590 .num_resources = ARRAY_SIZE(beu0_resources),
615   - .archdata = {
616   - .hwblk_id = HWBLK_BEU0,
617   - },
618 591 };
619 592  
620 593 /* BEU1 */
... ... @@ -644,9 +617,6 @@
644 617 },
645 618 .resource = beu1_resources,
646 619 .num_resources = ARRAY_SIZE(beu1_resources),
647   - .archdata = {
648   - .hwblk_id = HWBLK_BEU1,
649   - },
650 620 };
651 621  
652 622 static struct sh_timer_config cmt_platform_data = {
... ... @@ -676,9 +646,6 @@
676 646 },
677 647 .resource = cmt_resources,
678 648 .num_resources = ARRAY_SIZE(cmt_resources),
679   - .archdata = {
680   - .hwblk_id = HWBLK_CMT,
681   - },
682 649 };
683 650  
684 651 static struct sh_timer_config tmu0_platform_data = {
... ... @@ -707,9 +674,6 @@
707 674 },
708 675 .resource = tmu0_resources,
709 676 .num_resources = ARRAY_SIZE(tmu0_resources),
710   - .archdata = {
711   - .hwblk_id = HWBLK_TMU0,
712   - },
713 677 };
714 678  
715 679 static struct sh_timer_config tmu1_platform_data = {
... ... @@ -738,9 +702,6 @@
738 702 },
739 703 .resource = tmu1_resources,
740 704 .num_resources = ARRAY_SIZE(tmu1_resources),
741   - .archdata = {
742   - .hwblk_id = HWBLK_TMU0,
743   - },
744 705 };
745 706  
746 707 static struct sh_timer_config tmu2_platform_data = {
... ... @@ -768,9 +729,6 @@
768 729 },
769 730 .resource = tmu2_resources,
770 731 .num_resources = ARRAY_SIZE(tmu2_resources),
771   - .archdata = {
772   - .hwblk_id = HWBLK_TMU0,
773   - },
774 732 };
775 733  
776 734  
... ... @@ -799,9 +757,6 @@
799 757 },
800 758 .resource = tmu3_resources,
801 759 .num_resources = ARRAY_SIZE(tmu3_resources),
802   - .archdata = {
803   - .hwblk_id = HWBLK_TMU1,
804   - },
805 760 };
806 761  
807 762 static struct sh_timer_config tmu4_platform_data = {
... ... @@ -829,9 +784,6 @@
829 784 },
830 785 .resource = tmu4_resources,
831 786 .num_resources = ARRAY_SIZE(tmu4_resources),
832   - .archdata = {
833   - .hwblk_id = HWBLK_TMU1,
834   - },
835 787 };
836 788  
837 789 static struct sh_timer_config tmu5_platform_data = {
... ... @@ -859,9 +811,6 @@
859 811 },
860 812 .resource = tmu5_resources,
861 813 .num_resources = ARRAY_SIZE(tmu5_resources),
862   - .archdata = {
863   - .hwblk_id = HWBLK_TMU1,
864   - },
865 814 };
866 815  
867 816 /* JPU */
... ... @@ -891,9 +840,6 @@
891 840 },
892 841 .resource = jpu_resources,
893 842 .num_resources = ARRAY_SIZE(jpu_resources),
894   - .archdata = {
895   - .hwblk_id = HWBLK_JPU,
896   - },
897 843 };
898 844  
899 845 /* SPU2DSP0 */
... ... @@ -923,9 +869,6 @@
923 869 },
924 870 .resource = spu0_resources,
925 871 .num_resources = ARRAY_SIZE(spu0_resources),
926   - .archdata = {
927   - .hwblk_id = HWBLK_SPU,
928   - },
929 872 };
930 873  
931 874 /* SPU2DSP1 */
... ... @@ -955,9 +898,6 @@
955 898 },
956 899 .resource = spu1_resources,
957 900 .num_resources = ARRAY_SIZE(spu1_resources),
958   - .archdata = {
959   - .hwblk_id = HWBLK_SPU,
960   - },
961 901 };
962 902  
963 903 static struct platform_device *sh7724_devices[] __initdata = {
arch/sh/kernel/cpu/shmobile/cpuidle.c
... ... @@ -17,7 +17,6 @@
17 17 #include <linux/export.h>
18 18 #include <asm/suspend.h>
19 19 #include <asm/uaccess.h>
20   -#include <asm/hwblk.h>
21 20  
22 21 static unsigned long cpuidle_mode[] = {
23 22 SUSP_SH_SLEEP, /* regular sleep mode */
... ... @@ -29,7 +28,7 @@
29 28 struct cpuidle_driver *drv,
30 29 int index)
31 30 {
32   - unsigned long allowed_mode = arch_hwblk_sleep_mode();
  31 + unsigned long allowed_mode = SUSP_SH_SLEEP;
33 32 ktime_t before, after;
34 33 int requested_state = index;
35 34 int allowed_state;
arch/sh/kernel/time.c
... ... @@ -21,7 +21,6 @@
21 21 #include <linux/smp.h>
22 22 #include <linux/rtc.h>
23 23 #include <asm/clock.h>
24   -#include <asm/hwblk.h>
25 24 #include <asm/rtc.h>
26 25  
27 26 /* Dummy RTC ops */
... ... @@ -110,7 +109,6 @@
110 109 if (board_time_init)
111 110 board_time_init();
112 111  
113   - hwblk_init();
114 112 clk_init();
115 113  
116 114 late_time_init = sh_late_time_init;