Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 137271
b: refs/heads/master
c: 104a416
h: refs/heads/master
i:
  137269: 7d81264
  137267: 7d69ca7
  137263: dfd4183
v: v3
  • Loading branch information
Dmitry Artamonow authored and Russell King committed Mar 15, 2009
1 parent 3aed262 commit 78a6684
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 32 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: ddcd8c09001e66f78488bfc238ed5bd8441d4496
refs/heads/master: 104a416d80fca22284319b06eff87b6f632a3649
6 changes: 1 addition & 5 deletions trunk/arch/arm/mach-sa1100/h3600.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,7 @@ static int h3600_irda_set_power(struct device *dev, unsigned int state)

static void h3600_irda_set_speed(struct device *dev, unsigned int speed)
{
if (speed < 4000000) {
clr_h3600_egpio(IPAQ_EGPIO_IR_FSEL);
} else {
set_h3600_egpio(IPAQ_EGPIO_IR_FSEL);
}
assign_h3600_egpio(IPAQ_EGPIO_IR_FSEL, !(speed < 4000000));
}

static struct irda_platform_data h3600_irda_data = {
Expand Down
13 changes: 0 additions & 13 deletions trunk/arch/arm/mach-sa1100/include/mach/h3600.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,6 @@ static __inline__ void assign_h3600_egpio(enum ipaq_egpio_type x, int level)
ipaq_model_ops.control(x,level);
}

static __inline__ void clr_h3600_egpio(enum ipaq_egpio_type x)
{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,0);
}

static __inline__ void set_h3600_egpio(enum ipaq_egpio_type x)
{
if (ipaq_model_ops.control)
ipaq_model_ops.control(x,1);
}


#endif /* ASSEMBLY */

#endif /* _INCLUDE_H3600_H_ */
23 changes: 10 additions & 13 deletions trunk/drivers/pcmcia/sa1100_h3600.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ static void h3600_pcmcia_hw_shutdown(struct soc_pcmcia_socket *skt)
soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));

/* Disable CF bus: */
clr_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
clr_h3600_egpio(IPAQ_EGPIO_OPT_ON);
set_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
}

static void
Expand Down Expand Up @@ -79,10 +79,7 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
return -1;
}

if (state->flags & SS_RESET)
set_h3600_egpio(IPAQ_EGPIO_CARD_RESET);
else
clr_h3600_egpio(IPAQ_EGPIO_CARD_RESET);
assign_h3600_egpio(IPAQ_EGPIO_CARD_RESET, !!(state->flags & SS_RESET));

/* Silently ignore Vpp, output enable, speaker enable. */

Expand All @@ -92,9 +89,9 @@ h3600_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state_
static void h3600_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
{
/* Enable CF bus: */
set_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
set_h3600_egpio(IPAQ_EGPIO_OPT_ON);
clr_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 1);
assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 1);
assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 0);

msleep(10);

Expand All @@ -112,10 +109,10 @@ static void h3600_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
* socket 0 then socket 1.
*/
if (skt->nr == 1) {
clr_h3600_egpio(IPAQ_EGPIO_OPT_ON);
clr_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON);
assign_h3600_egpio(IPAQ_EGPIO_OPT_ON, 0);
assign_h3600_egpio(IPAQ_EGPIO_OPT_NVRAM_ON, 0);
/* hmm, does this suck power? */
set_h3600_egpio(IPAQ_EGPIO_OPT_RESET);
assign_h3600_egpio(IPAQ_EGPIO_OPT_RESET, 1);
}
}

Expand Down

0 comments on commit 78a6684

Please sign in to comment.