forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Applied omap24xx openwrt patches (2.6.38)
patch -p1 < 200-omap-platform.patch patch -p1 < 300-nokia-board.patch patch -p1 < 301-nokia-board-additional.patch patch -p1 < 310-n8x0-gpioswitch-input.patch patch -p1 < 400-bluetooth-hci_h4p.patch patch -p1 < 410-hci-h4p-fixes.patch patch -p1 < 420-hci-h4p-interrupt-workaround.patch patch -p1 < 500-cbus.patch patch -p1 < 501-cbus-retu-irq-nr-fix.patch patch -p1 < 505-cbus-retu-write-lock.patch patch -p1 < 506-cbus-retu-irq-handler-locking.patch patch -p1 < 510-cbus-retu-defines.patch patch -p1 < 520-cbus-tahvo-defines.patch patch -p1 < 530-cbus-retu-wdt-preemptible.patch patch -p1 < 531-cbus-retu-wdt-fix-bitfield.patch patch -p1 < 534-cbus-retu-wdt-remove-unused-interfaces.patch patch -p1 < 535-cbus-retu-wdt-cleanup.patch patch -p1 < 540-cbus-retu-wdt-remove-static-variables.patch patch -p1 < 545-cbus-retu-wdt-constify-info-struct.patch patch -p1 < 590-cbus-tahvo-usb-ptr-fix.patch patch -p1 < 595-cbus-tahvo-usb-leak.patch patch -p1 < 596-cbus-tahvo-usb-clk.patch patch -p1 < 597-cbus-tahvo-usb-platform.patch patch -p1 < 600-tsc2005.patch patch -p1 < 710-evdev-events-without-grab.patch patch -p1 < 810-mmc-fixes.patch patch -p1 < 811-mmc-null-ptr-fix.patch patch -p1 < 820-backlight-fixes.patch patch -p1 < 830-omap2-serial-fixes.patch patch -p1 < 850-musb-tusb-modular-fixes.patch patch -p1 < 900-n810-battery-management.patch
- Loading branch information
Showing
55 changed files
with
9,731 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
/* | ||
* linux/arch/arm/mach-omap2/board-n8x0.c | ||
* | ||
* Copyright (C) 2005-2009 Nokia Corporation | ||
* Author: Juha Yrjola <[email protected]> | ||
* | ||
* Modified from mach-omap2/board-generic.c | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
|
||
#include <linux/clk.h> | ||
#include <linux/delay.h> | ||
#include <linux/gpio.h> | ||
#include <linux/omapfb.h> | ||
|
||
#include <plat/lcd_mipid.h> | ||
#include <plat/blizzard.h> | ||
|
||
#include <../drivers/cbus/tahvo.h> | ||
|
||
#define N8X0_BLIZZARD_POWERDOWN_GPIO 15 | ||
|
||
// MIPID LCD Panel | ||
|
||
static void mipid_shutdown(struct mipid_platform_data *pdata) | ||
{ | ||
if (pdata->nreset_gpio != -1) { | ||
pr_info("shutdown LCD\n"); | ||
gpio_set_value(pdata->nreset_gpio, 0); | ||
msleep(120); | ||
} | ||
} | ||
|
||
static int n8x0_get_backlight_level(struct mipid_platform_data *pdata) | ||
{ | ||
return tahvo_get_backlight_level(); | ||
} | ||
|
||
static int n8x0_get_max_backlight_level(struct mipid_platform_data *pdata) | ||
{ | ||
return tahvo_get_max_backlight_level(); | ||
} | ||
|
||
static void n8x0_set_backlight_level(struct mipid_platform_data *pdata, int level) | ||
{ | ||
tahvo_set_backlight_level(level); | ||
} | ||
|
||
struct mipid_platform_data n8x0_mipid_platform_data = { | ||
.shutdown = mipid_shutdown, | ||
.get_bklight_level = n8x0_get_backlight_level, | ||
.set_bklight_level = n8x0_set_backlight_level, | ||
.get_bklight_max = n8x0_get_max_backlight_level, | ||
}; | ||
|
||
void __init n8x0_mipid_init(void) | ||
{ | ||
const struct omap_lcd_config *conf; | ||
int err; | ||
|
||
conf = omap_get_config(OMAP_TAG_LCD, struct omap_lcd_config); | ||
if (conf != NULL) { | ||
n8x0_mipid_platform_data.nreset_gpio = conf->nreset_gpio; | ||
n8x0_mipid_platform_data.data_lines = conf->data_lines; | ||
if (conf->nreset_gpio != -1) { | ||
err = gpio_request(conf->nreset_gpio, "MIPID nreset"); | ||
if (err) { | ||
printk(KERN_ERR "N8x0 MIPID failed to request nreset GPIO %d\n", | ||
conf->nreset_gpio); | ||
} else { | ||
err = gpio_direction_output(conf->nreset_gpio, 1); | ||
if (err) { | ||
printk(KERN_ERR "N8x0 MIPID failed to set nreset GPIO %d\n", | ||
conf->nreset_gpio); | ||
} | ||
} | ||
} | ||
printk(KERN_INFO "N8x0 MIPID config loaded"); | ||
} | ||
else | ||
printk(KERN_INFO "N8x0 MIPID config not provided"); | ||
} | ||
|
||
|
||
// Epson Blizzard LCD Controller | ||
|
||
static struct { | ||
struct clk *sys_ck; | ||
} blizzard; | ||
|
||
static int blizzard_get_clocks(void) | ||
{ | ||
blizzard.sys_ck = clk_get(0, "osc_ck"); | ||
if (IS_ERR(blizzard.sys_ck)) { | ||
printk(KERN_ERR "can't get Blizzard clock\n"); | ||
return PTR_ERR(blizzard.sys_ck); | ||
} | ||
return 0; | ||
} | ||
|
||
static unsigned long blizzard_get_clock_rate(struct device *dev) | ||
{ | ||
return clk_get_rate(blizzard.sys_ck); | ||
} | ||
|
||
static void blizzard_enable_clocks(int enable) | ||
{ | ||
if (enable) | ||
clk_enable(blizzard.sys_ck); | ||
else | ||
clk_disable(blizzard.sys_ck); | ||
} | ||
|
||
static void blizzard_power_up(struct device *dev) | ||
{ | ||
/* Vcore to 1.475V */ | ||
tahvo_set_clear_reg_bits(0x07, 0, 0xf); | ||
msleep(10); | ||
|
||
blizzard_enable_clocks(1); | ||
gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 1); | ||
} | ||
|
||
static void blizzard_power_down(struct device *dev) | ||
{ | ||
gpio_set_value(N8X0_BLIZZARD_POWERDOWN_GPIO, 0); | ||
blizzard_enable_clocks(0); | ||
|
||
/* Vcore to 1.005V */ | ||
tahvo_set_clear_reg_bits(0x07, 0xf, 0); | ||
} | ||
|
||
static struct blizzard_platform_data n8x0_blizzard_data = { | ||
.power_up = blizzard_power_up, | ||
.power_down = blizzard_power_down, | ||
.get_clock_rate = blizzard_get_clock_rate, | ||
.te_connected = 1, | ||
}; | ||
|
||
void __init n8x0_blizzard_init(void) | ||
{ | ||
int r; | ||
|
||
r = gpio_request(N8X0_BLIZZARD_POWERDOWN_GPIO, "Blizzard pd"); | ||
if (r < 0) | ||
{ | ||
printk(KERN_ERR "Can't get N8x0 Blizzard powerdown GPIO %d\n", N8X0_BLIZZARD_POWERDOWN_GPIO); | ||
return; | ||
} | ||
gpio_direction_output(N8X0_BLIZZARD_POWERDOWN_GPIO, 1); | ||
|
||
blizzard_get_clocks(); | ||
omapfb_set_ctrl_platform_data(&n8x0_blizzard_data); | ||
|
||
printk(KERN_INFO "N8x0 Blizzard initialized"); | ||
} |
Oops, something went wrong.