~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/arm/mach-s3c2416/mach-smdk2416.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <linux/mtd/partitions.h>
24
24
#include <linux/gpio.h>
25
25
#include <linux/fb.h>
 
26
#include <linux/delay.h>
26
27
 
27
28
#include <asm/mach/arch.h>
28
29
#include <asm/mach/map.h>
35
36
#include <plat/regs-serial.h>
36
37
#include <mach/regs-gpio.h>
37
38
#include <mach/regs-lcd.h>
 
39
#include <mach/regs-s3c2443-clock.h>
38
40
 
39
41
#include <mach/idle.h>
40
42
#include <mach/leds-gpio.h>
47
49
#include <plat/cpu.h>
48
50
#include <plat/nand.h>
49
51
#include <plat/sdhci.h>
 
52
#include <plat/udc.h>
50
53
 
51
54
#include <plat/regs-fb-v4.h>
52
55
#include <plat/fb.h>
121
124
        }
122
125
};
123
126
 
 
127
void smdk2416_hsudc_gpio_init(void)
 
128
{
 
129
        s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_UP);
 
130
        s3c_gpio_setpull(S3C2410_GPF(2), S3C_GPIO_PULL_NONE);
 
131
        s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(1));
 
132
        s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 0);
 
133
}
 
134
 
 
135
void smdk2416_hsudc_gpio_uninit(void)
 
136
{
 
137
        s3c2410_modify_misccr(S3C2416_MISCCR_SEL_SUSPND, 1);
 
138
        s3c_gpio_setpull(S3C2410_GPH(14), S3C_GPIO_PULL_NONE);
 
139
        s3c_gpio_cfgpin(S3C2410_GPH(14), S3C_GPIO_SFN(0));
 
140
}
 
141
 
 
142
struct s3c24xx_hsudc_platdata smdk2416_hsudc_platdata = {
 
143
        .epnum = 9,
 
144
        .gpio_init = smdk2416_hsudc_gpio_init,
 
145
        .gpio_uninit = smdk2416_hsudc_gpio_uninit,
 
146
};
 
147
 
124
148
struct s3c_fb_pd_win smdk2416_fb_win[] = {
125
149
        [0] = {
126
150
                /* think this is the same as the smdk6410 */
186
210
        &s3c_device_i2c0,
187
211
        &s3c_device_hsmmc0,
188
212
        &s3c_device_hsmmc1,
 
213
        &s3c_device_usb_hsudc,
189
214
};
190
215
 
191
216
static void __init smdk2416_map_io(void)
203
228
        s3c_sdhci0_set_platdata(&smdk2416_hsmmc0_pdata);
204
229
        s3c_sdhci1_set_platdata(&smdk2416_hsmmc1_pdata);
205
230
 
 
231
        s3c24xx_hsudc_set_platdata(&smdk2416_hsudc_platdata);
 
232
 
206
233
        gpio_request(S3C2410_GPB(4), "USBHost Power");
207
234
        gpio_direction_output(S3C2410_GPB(4), 1);
208
235