Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296353
b: refs/heads/master
c: 00d9497
h: refs/heads/master
i:
  296351: 1df901f
v: v3
  • Loading branch information
Russell King committed Feb 21, 2012
1 parent 2081f51 commit c356179
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9bb13eed37cc17fd176346c2866e2584772953bb
refs/heads/master: 00d94979c37fcba3486e9cc76a2eee750172a6a4
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-sa1100/include/mach/shannon.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define SHANNON_GPIO_U3_RTS GPIO_GPIO (19) /* ?? */
#define SHANNON_GPIO_U3_CTS GPIO_GPIO (20) /* ?? */
#define SHANNON_GPIO_SENSE_12V GPIO_GPIO (21) /* Input, 12v flash unprotect detected */
#define SHANNON_GPIO_DISP_EN GPIO_GPIO (22) /* out */
#define SHANNON_GPIO_DISP_EN 22 /* out */
/* XXX GPIO 23 unaccounted for */
#define SHANNON_GPIO_EJECT_0 GPIO_GPIO (24) /* in */
#define SHANNON_IRQ_GPIO_EJECT_0 IRQ_GPIO24
Expand Down
24 changes: 16 additions & 8 deletions trunk/drivers/video/sa1100fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/cpufreq.h>
#include <linux/gpio.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/mutex.h>
Expand Down Expand Up @@ -796,10 +797,8 @@ static void sa1100fb_enable_controller(struct sa1100fb_info *fbi)
DBAR2 = fbi->dbar2;
LCCR0 |= LCCR0_LEN;

if (machine_is_shannon()) {
GPDR |= SHANNON_GPIO_DISP_EN;
GPSR = SHANNON_GPIO_DISP_EN;
}
if (machine_is_shannon())
gpio_set_value(SHANNON_GPIO_DISP_EN, 1);

dev_dbg(fbi->dev, "DBAR1 = 0x%08lx\n", DBAR1);
dev_dbg(fbi->dev, "DBAR2 = 0x%08lx\n", DBAR2);
Expand All @@ -815,9 +814,8 @@ static void sa1100fb_disable_controller(struct sa1100fb_info *fbi)

dev_dbg(fbi->dev, "Disabling LCD controller\n");

if (machine_is_shannon()) {
GPCR = SHANNON_GPIO_DISP_EN;
}
if (machine_is_shannon())
gpio_set_value(SHANNON_GPIO_DISP_EN, 0);

set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&fbi->ctrlr_wait, &wait);
Expand Down Expand Up @@ -1230,6 +1228,13 @@ static int __devinit sa1100fb_probe(struct platform_device *pdev)
goto failed;
}

if (machine_is_shannon()) {
ret = gpio_request_one(SHANNON_GPIO_DISP_EN,
GPIOF_OUT_INIT_LOW, "display enable");
if (ret)
goto err_free_irq;
}

/*
* This makes sure that our colour bitfield
* descriptors are correctly initialised.
Expand All @@ -1240,7 +1245,7 @@ static int __devinit sa1100fb_probe(struct platform_device *pdev)

ret = register_framebuffer(&fbi->fb);
if (ret < 0)
goto err_free_irq;
goto err_reg_fb;

#ifdef CONFIG_CPU_FREQ
fbi->freq_transition.notifier_call = sa1100fb_freq_transition;
Expand All @@ -1252,6 +1257,9 @@ static int __devinit sa1100fb_probe(struct platform_device *pdev)
/* This driver cannot be unloaded at the moment */
return 0;

err_reg_fb:
if (machine_is_shannon())
gpio_free(SHANNON_GPIO_DISP_EN);
err_free_irq:
free_irq(irq, fbi);
failed:
Expand Down

0 comments on commit c356179

Please sign in to comment.