diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 20:29:26 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 20:29:26 -0500 |
commit | 5e93c6b4ecd78b1bab49bad1dc2f6ed7ec0115ee (patch) | |
tree | 4f4e321a1ca0baf64d8af528080c71f93495a7d7 /arch/arm/mach-shmobile | |
parent | 98d27b8abf413a310df6676f7d2128ada1cccc08 (diff) | |
parent | 3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 into rmobile-latest
Conflicts:
arch/arm/mach-shmobile/Kconfig
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/board-ap4evb.c | 71 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7367.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7377.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | 87 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/zboot_macros.h | 65 |
7 files changed, 215 insertions, 47 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c index 07b85c034d13..86edc772f82a 100644 --- a/arch/arm/mach-shmobile/board-ap4evb.c +++ b/arch/arm/mach-shmobile/board-ap4evb.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include <asm/mach/arch.h> | 61 | #include <asm/mach/arch.h> |
62 | #include <asm/mach/map.h> | 62 | #include <asm/mach/map.h> |
63 | #include <asm/mach/time.h> | 63 | #include <asm/mach/time.h> |
64 | #include <asm/setup.h> | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | * Address Interface BusWidth note | 67 | * Address Interface BusWidth note |
@@ -511,7 +512,12 @@ static struct platform_device keysc_device = { | |||
511 | static struct resource mipidsi0_resources[] = { | 512 | static struct resource mipidsi0_resources[] = { |
512 | [0] = { | 513 | [0] = { |
513 | .start = 0xffc60000, | 514 | .start = 0xffc60000, |
514 | .end = 0xffc68fff, | 515 | .end = 0xffc63073, |
516 | .flags = IORESOURCE_MEM, | ||
517 | }, | ||
518 | [1] = { | ||
519 | .start = 0xffc68000, | ||
520 | .end = 0xffc680ef, | ||
515 | .flags = IORESOURCE_MEM, | 521 | .flags = IORESOURCE_MEM, |
516 | }, | 522 | }, |
517 | }; | 523 | }; |
@@ -519,6 +525,7 @@ static struct resource mipidsi0_resources[] = { | |||
519 | static struct sh_mipi_dsi_info mipidsi0_info = { | 525 | static struct sh_mipi_dsi_info mipidsi0_info = { |
520 | .data_format = MIPI_RGB888, | 526 | .data_format = MIPI_RGB888, |
521 | .lcd_chan = &lcdc_info.ch[0], | 527 | .lcd_chan = &lcdc_info.ch[0], |
528 | .vsynw_offset = 17, | ||
522 | }; | 529 | }; |
523 | 530 | ||
524 | static struct platform_device mipidsi0_device = { | 531 | static struct platform_device mipidsi0_device = { |
@@ -531,44 +538,6 @@ static struct platform_device mipidsi0_device = { | |||
531 | }, | 538 | }, |
532 | }; | 539 | }; |
533 | 540 | ||
534 | /* This function will disappear when we switch to (runtime) PM */ | ||
535 | static int __init ap4evb_init_display_clk(void) | ||
536 | { | ||
537 | struct clk *lcdc_clk; | ||
538 | struct clk *dsitx_clk; | ||
539 | int ret; | ||
540 | |||
541 | lcdc_clk = clk_get(&lcdc_device.dev, "sh_mobile_lcdc_fb.0"); | ||
542 | if (IS_ERR(lcdc_clk)) | ||
543 | return PTR_ERR(lcdc_clk); | ||
544 | |||
545 | dsitx_clk = clk_get(&mipidsi0_device.dev, "sh-mipi-dsi.0"); | ||
546 | if (IS_ERR(dsitx_clk)) { | ||
547 | ret = PTR_ERR(dsitx_clk); | ||
548 | goto eclkdsitxget; | ||
549 | } | ||
550 | |||
551 | ret = clk_enable(lcdc_clk); | ||
552 | if (ret < 0) | ||
553 | goto eclklcdcon; | ||
554 | |||
555 | ret = clk_enable(dsitx_clk); | ||
556 | if (ret < 0) | ||
557 | goto eclkdsitxon; | ||
558 | |||
559 | return 0; | ||
560 | |||
561 | eclkdsitxon: | ||
562 | clk_disable(lcdc_clk); | ||
563 | eclklcdcon: | ||
564 | clk_put(dsitx_clk); | ||
565 | eclkdsitxget: | ||
566 | clk_put(lcdc_clk); | ||
567 | |||
568 | return ret; | ||
569 | } | ||
570 | device_initcall(ap4evb_init_display_clk); | ||
571 | |||
572 | static struct platform_device *qhd_devices[] __initdata = { | 541 | static struct platform_device *qhd_devices[] __initdata = { |
573 | &mipidsi0_device, | 542 | &mipidsi0_device, |
574 | &keysc_device, | 543 | &keysc_device, |
@@ -777,10 +746,15 @@ static struct platform_device lcdc1_device = { | |||
777 | }, | 746 | }, |
778 | }; | 747 | }; |
779 | 748 | ||
749 | static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq, | ||
750 | unsigned long *parent_freq); | ||
751 | |||
752 | |||
780 | static struct sh_mobile_hdmi_info hdmi_info = { | 753 | static struct sh_mobile_hdmi_info hdmi_info = { |
781 | .lcd_chan = &sh_mobile_lcdc1_info.ch[0], | 754 | .lcd_chan = &sh_mobile_lcdc1_info.ch[0], |
782 | .lcd_dev = &lcdc1_device.dev, | 755 | .lcd_dev = &lcdc1_device.dev, |
783 | .flags = HDMI_SND_SRC_SPDIF, | 756 | .flags = HDMI_SND_SRC_SPDIF, |
757 | .clk_optimize_parent = ap4evb_clk_optimize, | ||
784 | }; | 758 | }; |
785 | 759 | ||
786 | static struct resource hdmi_resources[] = { | 760 | static struct resource hdmi_resources[] = { |
@@ -807,6 +781,25 @@ static struct platform_device hdmi_device = { | |||
807 | }, | 781 | }, |
808 | }; | 782 | }; |
809 | 783 | ||
784 | static long ap4evb_clk_optimize(unsigned long target, unsigned long *best_freq, | ||
785 | unsigned long *parent_freq) | ||
786 | { | ||
787 | struct clk *hdmi_ick = clk_get(&hdmi_device.dev, "ick"); | ||
788 | long error; | ||
789 | |||
790 | if (IS_ERR(hdmi_ick)) { | ||
791 | int ret = PTR_ERR(hdmi_ick); | ||
792 | pr_err("Cannot get HDMI ICK: %d\n", ret); | ||
793 | return ret; | ||
794 | } | ||
795 | |||
796 | error = clk_round_parent(hdmi_ick, target, best_freq, parent_freq, 1, 64); | ||
797 | |||
798 | clk_put(hdmi_ick); | ||
799 | |||
800 | return error; | ||
801 | } | ||
802 | |||
810 | static struct gpio_led ap4evb_leds[] = { | 803 | static struct gpio_led ap4evb_leds[] = { |
811 | { | 804 | { |
812 | .name = "led4", | 805 | .name = "led4", |
diff --git a/arch/arm/mach-shmobile/clock-sh7367.c b/arch/arm/mach-shmobile/clock-sh7367.c index 9f78729098f2..6b186aefcbd6 100644 --- a/arch/arm/mach-shmobile/clock-sh7367.c +++ b/arch/arm/mach-shmobile/clock-sh7367.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7367 registers */ | 26 | /* SH7367 registers */ |
27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 3aa026069435..9aa8d68d1a9c 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7372 registers */ | 26 | /* SH7372 registers */ |
27 | #define FRQCRA 0xe6150000 | 27 | #define FRQCRA 0xe6150000 |
@@ -507,7 +507,7 @@ enum { MSTP001, | |||
507 | MSTP223, | 507 | MSTP223, |
508 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, | 508 | MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, MSTP201, MSTP200, |
509 | MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, | 509 | MSTP329, MSTP328, MSTP323, MSTP322, MSTP314, MSTP313, MSTP312, |
510 | MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, | 510 | MSTP423, MSTP415, MSTP413, MSTP411, MSTP410, MSTP406, MSTP403, |
511 | MSTP_NR }; | 511 | MSTP_NR }; |
512 | 512 | ||
513 | #define MSTP(_parent, _reg, _bit, _flags) \ | 513 | #define MSTP(_parent, _reg, _bit, _flags) \ |
@@ -543,6 +543,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
543 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ | 543 | [MSTP314] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 14, 0), /* SDHI0 */ |
544 | [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ | 544 | [MSTP313] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 13, 0), /* SDHI1 */ |
545 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ | 545 | [MSTP312] = MSTP(&div4_clks[DIV4_HP], SMSTPCR3, 12, 0), /* MMC */ |
546 | [MSTP423] = MSTP(&div4_clks[DIV4_B], SMSTPCR4, 23, 0), /* DSITX1 */ | ||
546 | [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */ | 547 | [MSTP415] = MSTP(&div4_clks[DIV4_HP], SMSTPCR4, 15, 0), /* SDHI2 */ |
547 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ | 548 | [MSTP413] = MSTP(&pllc1_div2_clk, SMSTPCR4, 13, 0), /* HDMI */ |
548 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ | 549 | [MSTP411] = MSTP(&div6_clks[DIV6_SUB], SMSTPCR4, 11, 0), /* IIC3 */ |
@@ -596,9 +597,10 @@ static struct clk_lookup lookups[] = { | |||
596 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | 597 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), |
597 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | 598 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), |
598 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), | 599 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), |
599 | CLKDEV_CON_ID("dsit_clk", &div6_clks[DIV6_DSIT]), | 600 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), |
600 | CLKDEV_CON_ID("dsi0p_clk", &div6_clks[DIV6_DSI0P]), | 601 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), |
601 | CLKDEV_CON_ID("dsi1p_clk", &div6_clks[DIV6_DSI1P]), | 602 | CLKDEV_ICK_ID("dsi0p_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), |
603 | CLKDEV_ICK_ID("dsi1p_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
602 | 604 | ||
603 | /* MSTP32 clocks */ | 605 | /* MSTP32 clocks */ |
604 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 606 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
@@ -610,7 +612,7 @@ static struct clk_lookup lookups[] = { | |||
610 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ | 612 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */ |
611 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ | 613 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ |
612 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ | 614 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ |
613 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ | 615 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */ |
614 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ | 616 | CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */ |
615 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ | 617 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */ |
616 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ | 618 | CLKDEV_DEV_ID("uio_pdrv_genirq.5", &mstp_clks[MSTP106]), /* JPU */ |
@@ -633,6 +635,7 @@ static struct clk_lookup lookups[] = { | |||
633 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ | 635 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]), /* SDHI0 */ |
634 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ | 636 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]), /* SDHI1 */ |
635 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */ | 637 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP312]), /* MMC */ |
638 | CLKDEV_DEV_ID("sh-mipi-dsi.1", &mstp_clks[MSTP423]), /* DSITX1 */ | ||
636 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */ | 639 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP415]), /* SDHI2 */ |
637 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ | 640 | CLKDEV_DEV_ID("sh-mobile-hdmi", &mstp_clks[MSTP413]), /* HDMI */ |
638 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ | 641 | CLKDEV_DEV_ID("i2c-sh_mobile.3", &mstp_clks[MSTP411]), /* IIC3 */ |
diff --git a/arch/arm/mach-shmobile/clock-sh7377.c b/arch/arm/mach-shmobile/clock-sh7377.c index f91395aeb9ab..95942466e63f 100644 --- a/arch/arm/mach-shmobile/clock-sh7377.c +++ b/arch/arm/mach-shmobile/clock-sh7377.c | |||
@@ -20,8 +20,8 @@ | |||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <linux/io.h> | 21 | #include <linux/io.h> |
22 | #include <linux/sh_clk.h> | 22 | #include <linux/sh_clk.h> |
23 | #include <linux/clkdev.h> | ||
23 | #include <mach/common.h> | 24 | #include <mach/common.h> |
24 | #include <asm/clkdev.h> | ||
25 | 25 | ||
26 | /* SH7377 registers */ | 26 | /* SH7377 registers */ |
27 | #define RTFRQCR 0xe6150000 | 27 | #define RTFRQCR 0xe6150000 |
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt new file mode 100644 index 000000000000..e3ebfa73956e --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt | |||
@@ -0,0 +1,87 @@ | |||
1 | LIST "partner-jet-setup.txt" | ||
2 | LIST "(C) Copyright 2010 Renesas Solutions Corp" | ||
3 | LIST "Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>" | ||
4 | |||
5 | LIST "RWT Setting" | ||
6 | EW 0xE6020004, 0xA500 | ||
7 | EW 0xE6030004, 0xA500 | ||
8 | |||
9 | DD 0x01001000, 0x01001000 | ||
10 | |||
11 | LIST "GPIO Setting" | ||
12 | EB 0xE6051013, 0xA2 | ||
13 | |||
14 | LIST "CPG" | ||
15 | ED 0xE6150080, 0x00000180 | ||
16 | ED 0xE61500C0, 0x00000002 | ||
17 | |||
18 | WAIT 1, 0xFE40009C | ||
19 | |||
20 | LIST "FRQCR" | ||
21 | ED 0xE6150000, 0x2D1305C3 | ||
22 | ED 0xE61500E0, 0x9E40358E | ||
23 | ED 0xE6150004, 0x80331050 | ||
24 | |||
25 | WAIT 1, 0xFE40009C | ||
26 | |||
27 | ED 0xE61500E4, 0x00002000 | ||
28 | |||
29 | WAIT 1, 0xFE40009C | ||
30 | |||
31 | LIST "PLL" | ||
32 | ED 0xE6150028, 0x00004000 | ||
33 | |||
34 | WAIT 1, 0xFE40009C | ||
35 | |||
36 | ED 0xE615002C, 0x93000040 | ||
37 | |||
38 | WAIT 1, 0xFE40009C | ||
39 | |||
40 | LIST "BSC" | ||
41 | ED 0xFEC10000, 0x00E0001B | ||
42 | |||
43 | LIST "SBSC1" | ||
44 | ED 0xFE400354, 0x01AD8000 | ||
45 | ED 0xFE400354, 0x01AD8001 | ||
46 | |||
47 | WAIT 5, 0xFE40009C | ||
48 | |||
49 | ED 0xFE400008, 0xBCC90151 | ||
50 | ED 0xFE400040, 0x41774113 | ||
51 | ED 0xFE400044, 0x2712E229 | ||
52 | ED 0xFE400048, 0x20C18505 | ||
53 | ED 0xFE40004C, 0x00110209 | ||
54 | ED 0xFE400010, 0x00000087 | ||
55 | |||
56 | WAIT 10, 0xFE40009C | ||
57 | |||
58 | ED 0xFE400084, 0x0000003F | ||
59 | EB 0xFE500000, 0x00 | ||
60 | |||
61 | WAIT 5, 0xFE40009C | ||
62 | |||
63 | ED 0xFE400084, 0x0000FF0A | ||
64 | EB 0xFE500000, 0x00 | ||
65 | |||
66 | WAIT 1, 0xFE40009C | ||
67 | |||
68 | ED 0xFE400084, 0x00002201 | ||
69 | EB 0xFE500000, 0x00 | ||
70 | ED 0xFE400084, 0x00000302 | ||
71 | EB 0xFE500000, 0x00 | ||
72 | EB 0xFE5C0000, 0x00 | ||
73 | ED 0xFE400008, 0xBCC90159 | ||
74 | ED 0xFE40008C, 0x88800004 | ||
75 | ED 0xFE400094, 0x00000004 | ||
76 | ED 0xFE400028, 0xA55A0032 | ||
77 | ED 0xFE40002C, 0xA55A000C | ||
78 | ED 0xFE400020, 0xA55A2048 | ||
79 | ED 0xFE400008, 0xBCC90959 | ||
80 | |||
81 | LIST "Change CPGA setting" | ||
82 | ED 0xE61500E0, 0x9E40352E | ||
83 | ED 0xE6150004, 0x80331050 | ||
84 | |||
85 | WAIT 1, 0xFE40009C | ||
86 | |||
87 | ED 0xE6150354, 0x00000002 | ||
diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h new file mode 100644 index 000000000000..3ad86b7708e9 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot.h | |||
@@ -0,0 +1,20 @@ | |||
1 | #ifndef ZBOOT_H | ||
2 | #define ZBOOT_H | ||
3 | |||
4 | #include <asm/mach-types.h> | ||
5 | #include <mach/zboot_macros.h> | ||
6 | |||
7 | /************************************************** | ||
8 | * | ||
9 | * board specific settings | ||
10 | * | ||
11 | **************************************************/ | ||
12 | |||
13 | #ifdef CONFIG_MACH_AP4EVB | ||
14 | #define MACH_TYPE MACH_TYPE_AP4EVB | ||
15 | #include "mach/head-ap4evb.txt" | ||
16 | #else | ||
17 | #error "unsupported board." | ||
18 | #endif | ||
19 | |||
20 | #endif /* ZBOOT_H */ | ||
diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h new file mode 100644 index 000000000000..aa6111fbc989 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h | |||
@@ -0,0 +1,65 @@ | |||
1 | #ifndef __ZBOOT_MACRO_H | ||
2 | #define __ZBOOT_MACRO_H | ||
3 | |||
4 | /* The LIST command is used to include comments in the script */ | ||
5 | .macro LIST comment | ||
6 | .endm | ||
7 | |||
8 | /* The ED command is used to write a 32-bit word */ | ||
9 | .macro ED, addr, data | ||
10 | LDR r0, 1f | ||
11 | LDR r1, 2f | ||
12 | STR r1, [r0] | ||
13 | B 3f | ||
14 | 1 : .long \addr | ||
15 | 2 : .long \data | ||
16 | 3 : | ||
17 | .endm | ||
18 | |||
19 | /* The EW command is used to write a 16-bit word */ | ||
20 | .macro EW, addr, data | ||
21 | LDR r0, 1f | ||
22 | LDR r1, 2f | ||
23 | STRH r1, [r0] | ||
24 | B 3f | ||
25 | 1 : .long \addr | ||
26 | 2 : .long \data | ||
27 | 3 : | ||
28 | .endm | ||
29 | |||
30 | /* The EB command is used to write an 8-bit word */ | ||
31 | .macro EB, addr, data | ||
32 | LDR r0, 1f | ||
33 | LDR r1, 2f | ||
34 | STRB r1, [r0] | ||
35 | B 3f | ||
36 | 1 : .long \addr | ||
37 | 2 : .long \data | ||
38 | 3 : | ||
39 | .endm | ||
40 | |||
41 | /* The WAIT command is used to delay the execution */ | ||
42 | .macro WAIT, time, reg | ||
43 | LDR r1, 1f | ||
44 | LDR r0, 2f | ||
45 | STR r0, [r1] | ||
46 | 10 : | ||
47 | LDR r0, [r1] | ||
48 | CMP r0, #0x00000000 | ||
49 | BNE 10b | ||
50 | NOP | ||
51 | B 3f | ||
52 | 1 : .long \reg | ||
53 | 2 : .long \time * 100 | ||
54 | 3 : | ||
55 | .endm | ||
56 | |||
57 | /* The DD command is used to read a 32-bit word */ | ||
58 | .macro DD, start, end | ||
59 | LDR r1, 1f | ||
60 | B 2f | ||
61 | 1 : .long \start | ||
62 | 2 : | ||
63 | .endm | ||
64 | |||
65 | #endif /* __ZBOOT_MACRO_H */ | ||