Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97561
b: refs/heads/master
c: c4913c7
h: refs/heads/master
i:
  97559: 9cab9f9
v: v3
  • Loading branch information
Alexey Dobriyan authored and Herbert Xu committed Jun 2, 2008
1 parent dd138b0 commit f133ab0
Show file tree
Hide file tree
Showing 64 changed files with 745 additions and 794 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: 28928b2f1d769abdc173c96e2632d30cbde9ec4a
refs/heads/master: c4913c7b71abc79b008a3c118628cfb59bdb0efc
12 changes: 2 additions & 10 deletions trunk/Documentation/lguest/lguest.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@ struct virtqueue

/* The routine to call when the Guest pings us. */
void (*handle_output)(int fd, struct virtqueue *me);

/* Outstanding buffers */
unsigned int inflight;
};

/* Remember the arguments to the program so we can "reboot" */
Expand Down Expand Up @@ -705,7 +702,6 @@ static unsigned get_vq_desc(struct virtqueue *vq,
errx(1, "Looped descriptor");
} while ((i = next_desc(vq, i)) != vq->vring.num);

vq->inflight++;
return head;
}

Expand All @@ -723,17 +719,15 @@ static void add_used(struct virtqueue *vq, unsigned int head, int len)
/* Make sure buffer is written before we update index. */
wmb();
vq->vring.used->idx++;
vq->inflight--;
}

/* This actually sends the interrupt for this virtqueue */
static void trigger_irq(int fd, struct virtqueue *vq)
{
unsigned long buf[] = { LHREQ_IRQ, vq->config.irq };

/* If they don't want an interrupt, don't send one, unless empty. */
if ((vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
&& vq->inflight)
/* If they don't want an interrupt, don't send one. */
if (vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT)
return;

/* Send the Guest an interrupt tell them we used something up. */
Expand Down Expand Up @@ -1113,7 +1107,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs,
vq->next = NULL;
vq->last_avail_idx = 0;
vq->dev = dev;
vq->inflight = 0;

/* Initialize the configuration. */
vq->config.num = num_descs;
Expand Down Expand Up @@ -1375,7 +1368,6 @@ static void setup_tun_net(const char *arg)

/* Tell Guest what MAC address to use. */
add_feature(dev, VIRTIO_NET_F_MAC);
add_feature(dev, VIRTIO_F_NOTIFY_ON_EMPTY);
set_config(dev, sizeof(conf), &conf);

/* We don't need the socket any more; setup is done. */
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/kernel/gptimers.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/io.h>

#include <asm/io.h>
#include <asm/blackfin.h>
#include <asm/gptimers.h>

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/lib/outs.S
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ ENTRY(_outsw_8)
R0 = R0 + R1;
.Lword8_loop_e: W[P0] = R0;
RTS;
ENDPROC(_outsw_8)
ENDPROC(_outsw)
4 changes: 2 additions & 2 deletions trunk/arch/blackfin/mach-bf527/boards/ezkit.c
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,10 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = {
{
.modalias = "ad7877",
.platform_data = &bfin_ad7877_ts_info,
.irq = IRQ_PF8,
.irq = IRQ_PF6,
.max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */
.bus_num = 0,
.chip_select = 2,
.chip_select = 1,
.controller_data = &spi_ad7877_chip_info,
},
#endif
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf537/boards/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o
obj-$(CONFIG_BFIN537_STAMP) += stamp.o
obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o
obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o
obj-$(CONFIG_PNAV10) += pnav10.o
obj-$(CONFIG_CAMSIG_MINOTAUR) += minotaur.o
183 changes: 183 additions & 0 deletions trunk/arch/blackfin/mach-bf537/boards/led.S
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
/****************************************************
* LED1 ---- PF6 LED2 ---- PF7 *
* LED3 ---- PF8 LED4 ---- PF9 *
* LED5 ---- PF10 LED6 ---- PF11 *
****************************************************/

#include <linux/linkage.h>
#include <asm/blackfin.h>

/* All functions in this file save the registers they uses.
So there is no need to save any registers before calling them. */

.text;

/* Initialize LEDs. */

ENTRY(_led_init)
LINK 12;
[--SP] = P0;
[--SP] = R0;
[--SP] = R1;
[--SP] = R2;
R1 = PF6|PF7|PF8|PF9|PF10|PF11 (Z);
R2 = ~R1;

P0.H = hi(PORTF_FER);
P0.L = lo(PORTF_FER);
R0 = W[P0](Z);
SSYNC;
R0 = R0 & R2;
W[P0] = R0.L;
SSYNC;

P0.H = hi(PORTFIO_DIR);
P0.L = lo(PORTFIO_DIR);
R0 = W[P0](Z);
SSYNC;
R0 = R0 | R1;
W[P0] = R0.L;
SSYNC;

P0.H = hi(PORTFIO_INEN);
P0.L = lo(PORTFIO_INEN);
R0 = W[P0](Z);
SSYNC;
R0 = R0 & R2;
W[P0] = R0.L;
SSYNC;

R2 = [SP++];
R1 = [SP++];
R0 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_init, .-_led_init

/* Set one LED on. Leave other LEDs unchanged.
It expects the LED number passed through R0. */

ENTRY(_led_on)
LINK 12;
[--SP] = P0;
[--SP] = R1;
CALL _led_init;
R1 = 1;
R0 += 5;
R1 <<= R0;
P0.H = hi(PORTFIO);
P0.L = lo(PORTFIO);
R0 = W[P0](Z);
SSYNC;
R0 = R0 | R1;
W[P0] = R0.L;
SSYNC;
R1 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_on, .-_led_on

/* Set one LED off. Leave other LEDs unchanged. */

ENTRY(_led_off)
LINK 12;
[--SP] = P0;
[--SP] = R1;
CALL _led_init;
R1 = 1;
R0 += 5;
R1 <<= R0;
R1 = ~R1;
P0.H = hi(PORTFIO);
P0.L = lo(PORTFIO);
R0 = W[P0](Z);
SSYNC;
R0 = R0 & R1;
W[P0] = R0.L;
SSYNC;
R1 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_off, .-_led_off

/* Toggle one LED. Leave other LEDs unchanged. */

ENTRY(_led_toggle)
LINK 12;
[--SP] = P0;
[--SP] = R1;
CALL _led_init;
R1 = 1;
R0 += 5;
R1 <<= R0;
P0.H = hi(PORTFIO);
P0.L = lo(PORTFIO);
R0 = W[P0](Z);
SSYNC;
R0 = R0 ^ R1;
W[P0] = R0.L;
SSYNC;
R1 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_toggle, .-_led_toggle

/* Display the number using LEDs in binary format. */

ENTRY(_led_disp_num)
LINK 12;
[--SP] = P0;
[--SP] = R1;
[--SP] = R2;
CALL _led_init;
R1 = 0x3f(X);
R0 = R0 & R1;
R2 = 6(X);
R0 <<= R2;
R1 <<= R2;
P0.H = hi(PORTFIO);
P0.L = lo(PORTFIO);
R2 = W[P0](Z);
SSYNC;
R1 = ~R1;
R2 = R2 & R1;
R2 = R2 | R0;
W[P0] = R2.L;
SSYNC;
R2 = [SP++];
R1 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_disp_num, .-_led_disp_num

/* Toggle the number using LEDs in binary format. */

ENTRY(_led_toggle_num)
LINK 12;
[--SP] = P0;
[--SP] = R1;
[--SP] = R2;
CALL _led_init;
R1 = 0x3f(X);
R0 = R0 & R1;
R1 = 6(X);
R0 <<= R1;
P0.H = hi(PORTFIO);
P0.L = lo(PORTFIO);
R1 = W[P0](Z);
SSYNC;
R1 = R1 ^ R0;
W[P0] = R1.L;
SSYNC;
R2 = [SP++];
R1 = [SP++];
P0 = [SP++];
UNLINK;
RTS;
.size _led_toggle_num, .-_led_toggle_num

2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf548/boards/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# arch/blackfin/mach-bf548/boards/Makefile
#

obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o
obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o
obj-$(CONFIG_BFIN548_BLUETECHNIX_CM) += cm_bf548.o
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mach-bf548/boards/cm_bf548.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ static struct platform_device *cm_bf548_devices[] __initdata = {

static int __init cm_bf548_init(void)
{
printk(KERN_INFO "%s(): registering device resources\n", __func__);
printk(KERN_INFO "%s(): registering device resources\n", __FUNCTION__);
platform_add_devices(cm_bf548_devices, ARRAY_SIZE(cm_bf548_devices));

#if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE)
Expand Down
Loading

0 comments on commit f133ab0

Please sign in to comment.