Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c3cc208 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
  genetlink: fix netns vs. netlink table locking (2)
  3c59x: Get rid of "Trying to free already-free IRQ"
  tunnel: eliminate recursion field
  ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2
  net: fix htmldocs sunrpc, clnt.c
  Phonet: error on broadcast sending (unimplemented)
  Phonet: fix race for port number in concurrent bind()
  pktgen: better scheduler friendliness
  pktgen: T_TERMINATE flag is unused
  ipv4: check optlen for IP_MULTICAST_IF option
  ath9k: Initialize txgain and rxgain for newer AR9287 chipsets.
  iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx
  ath9k: Fix RFKILL bugs
  drivers/net/wireless: Use usb_endpoint_dir_out
  cfg80211: don't overwrite privacy setting
  wl12xx: fix kconfig/link errors
  rt2x00: fix the definition of rt2x00crypto_rx_insert_iv
  iwlwifi: reduce noise when skb allocation fails
  iwlwifi: do not send sync command while holding spinlock
  mac80211: fix DTIM setting
  ...
parents 851b147e b8273570
Loading
Loading
Loading
Loading
+36 −0
Original line number Diff line number Diff line
@@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data)
void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
#endif

/* --------------------------------------------------------------------
 *  CAN Controller
 * -------------------------------------------------------------------- */

#if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE)
static struct resource can_resources[] = {
	[0] = {
		.start	= AT91SAM9263_BASE_CAN,
		.end	= AT91SAM9263_BASE_CAN + SZ_16K - 1,
		.flags	= IORESOURCE_MEM,
	},
	[1] = {
		.start	= AT91SAM9263_ID_CAN,
		.end	= AT91SAM9263_ID_CAN,
		.flags	= IORESOURCE_IRQ,
	},
};

static struct platform_device at91sam9263_can_device = {
	.name		= "at91_can",
	.id		= -1,
	.resource	= can_resources,
	.num_resources	= ARRAY_SIZE(can_resources),
};

void __init at91_add_device_can(struct at91_can_data *data)
{
	at91_set_A_periph(AT91_PIN_PA13, 0);	/* CANTX */
	at91_set_A_periph(AT91_PIN_PA14, 0);	/* CANRX */
	at91sam9263_can_device.dev.platform_data = data;

	platform_device_register(&at91sam9263_can_device);
}
#else
void __init at91_add_device_can(struct at91_can_data *data) {}
#endif

/* --------------------------------------------------------------------
 *  LCD Controller
+19 −0
Original line number Diff line number Diff line
@@ -400,6 +400,23 @@ static struct gpio_led ek_pwm_led[] = {
	}
};

/*
 * CAN
 */
static void sam9263ek_transceiver_switch(int on)
{
	if (on) {
		at91_set_gpio_output(AT91_PIN_PA18, 1); /* CANRXEN */
		at91_set_gpio_output(AT91_PIN_PA19, 0); /* CANRS */
	} else {
		at91_set_gpio_output(AT91_PIN_PA18, 0); /* CANRXEN */
		at91_set_gpio_output(AT91_PIN_PA19, 1); /* CANRS */
	}
}

static struct at91_can_data ek_can_data = {
	.transceiver_switch = sam9263ek_transceiver_switch,
};

static void __init ek_board_init(void)
{
@@ -431,6 +448,8 @@ static void __init ek_board_init(void)
	/* LEDs */
	at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
	at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
	/* CAN */
	at91_add_device_can(&ek_can_data);
}

MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
+6 −0
Original line number Diff line number Diff line
@@ -188,6 +188,12 @@ extern void __init at91_add_device_isi(void);
 /* Touchscreen Controller */
extern void __init at91_add_device_tsadcc(void);

/* CAN */
struct at91_can_data {
	void (*transceiver_switch)(int on);
};
extern void __init at91_add_device_can(struct at91_can_data *data);

 /* LEDs */
extern void __init at91_init_leds(u8 cpu_led, u8 timer_led);
extern void __init at91_gpio_leds(struct gpio_led *leds, int nr);
+50 −9
Original line number Diff line number Diff line
@@ -790,11 +790,15 @@ he_init_group(struct he_dev *he_dev, int group)
	he_dev->rbps_base = pci_alloc_consistent(he_dev->pci_dev,
		CONFIG_RBPS_SIZE * sizeof(struct he_rbp), &he_dev->rbps_phys);
	if (he_dev->rbps_base == NULL) {
		hprintk("failed to alloc rbps\n");
		return -ENOMEM;
		hprintk("failed to alloc rbps_base\n");
		goto out_destroy_rbps_pool;
	}
	memset(he_dev->rbps_base, 0, CONFIG_RBPS_SIZE * sizeof(struct he_rbp));
	he_dev->rbps_virt = kmalloc(CONFIG_RBPS_SIZE * sizeof(struct he_virt), GFP_KERNEL);
	if (he_dev->rbps_virt == NULL) {
		hprintk("failed to alloc rbps_virt\n");
		goto out_free_rbps_base;
	}

	for (i = 0; i < CONFIG_RBPS_SIZE; ++i) {
		dma_addr_t dma_handle;
@@ -802,7 +806,7 @@ he_init_group(struct he_dev *he_dev, int group)

		cpuaddr = pci_pool_alloc(he_dev->rbps_pool, GFP_KERNEL|GFP_DMA, &dma_handle);
		if (cpuaddr == NULL)
			return -ENOMEM;
			goto out_free_rbps_virt;

		he_dev->rbps_virt[i].virt = cpuaddr;
		he_dev->rbps_base[i].status = RBP_LOANED | RBP_SMALLBUF | (i << RBP_INDEX_OFF);
@@ -827,17 +831,21 @@ he_init_group(struct he_dev *he_dev, int group)
			CONFIG_RBPL_BUFSIZE, 8, 0);
	if (he_dev->rbpl_pool == NULL) {
		hprintk("unable to create rbpl pool\n");
		return -ENOMEM;
		goto out_free_rbps_virt;
	}

	he_dev->rbpl_base = pci_alloc_consistent(he_dev->pci_dev,
		CONFIG_RBPL_SIZE * sizeof(struct he_rbp), &he_dev->rbpl_phys);
	if (he_dev->rbpl_base == NULL) {
		hprintk("failed to alloc rbpl\n");
		return -ENOMEM;
		hprintk("failed to alloc rbpl_base\n");
		goto out_destroy_rbpl_pool;
	}
	memset(he_dev->rbpl_base, 0, CONFIG_RBPL_SIZE * sizeof(struct he_rbp));
	he_dev->rbpl_virt = kmalloc(CONFIG_RBPL_SIZE * sizeof(struct he_virt), GFP_KERNEL);
	if (he_dev->rbpl_virt == NULL) {
		hprintk("failed to alloc rbpl_virt\n");
		goto out_free_rbpl_base;
	}

	for (i = 0; i < CONFIG_RBPL_SIZE; ++i) {
		dma_addr_t dma_handle;
@@ -845,7 +853,7 @@ he_init_group(struct he_dev *he_dev, int group)

		cpuaddr = pci_pool_alloc(he_dev->rbpl_pool, GFP_KERNEL|GFP_DMA, &dma_handle);
		if (cpuaddr == NULL)
			return -ENOMEM;
			goto out_free_rbpl_virt;

		he_dev->rbpl_virt[i].virt = cpuaddr;
		he_dev->rbpl_base[i].status = RBP_LOANED | (i << RBP_INDEX_OFF);
@@ -870,7 +878,7 @@ he_init_group(struct he_dev *he_dev, int group)
		CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq), &he_dev->rbrq_phys);
	if (he_dev->rbrq_base == NULL) {
		hprintk("failed to allocate rbrq\n");
		return -ENOMEM;
		goto out_free_rbpl_virt;
	}
	memset(he_dev->rbrq_base, 0, CONFIG_RBRQ_SIZE * sizeof(struct he_rbrq));

@@ -894,7 +902,7 @@ he_init_group(struct he_dev *he_dev, int group)
		CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq), &he_dev->tbrq_phys);
	if (he_dev->tbrq_base == NULL) {
		hprintk("failed to allocate tbrq\n");
		return -ENOMEM;
		goto out_free_rbpq_base;
	}
	memset(he_dev->tbrq_base, 0, CONFIG_TBRQ_SIZE * sizeof(struct he_tbrq));

@@ -906,6 +914,39 @@ he_init_group(struct he_dev *he_dev, int group)
	he_writel(he_dev, CONFIG_TBRQ_THRESH, G0_TBRQ_THRESH + (group * 16));

	return 0;

out_free_rbpq_base:
	pci_free_consistent(he_dev->pci_dev, CONFIG_RBRQ_SIZE *
			sizeof(struct he_rbrq), he_dev->rbrq_base,
			he_dev->rbrq_phys);
	i = CONFIG_RBPL_SIZE;
out_free_rbpl_virt:
	while (--i)
		pci_pool_free(he_dev->rbps_pool, he_dev->rbpl_virt[i].virt,
				he_dev->rbps_base[i].phys);
	kfree(he_dev->rbpl_virt);

out_free_rbpl_base:
	pci_free_consistent(he_dev->pci_dev, CONFIG_RBPL_SIZE *
			sizeof(struct he_rbp), he_dev->rbpl_base,
			he_dev->rbpl_phys);
out_destroy_rbpl_pool:
	pci_pool_destroy(he_dev->rbpl_pool);

	i = CONFIG_RBPL_SIZE;
out_free_rbps_virt:
	while (--i)
		pci_pool_free(he_dev->rbpl_pool, he_dev->rbps_virt[i].virt,
				he_dev->rbpl_base[i].phys);
	kfree(he_dev->rbps_virt);

out_free_rbps_base:
	pci_free_consistent(he_dev->pci_dev, CONFIG_RBPS_SIZE *
			sizeof(struct he_rbp), he_dev->rbps_base,
			he_dev->rbps_phys);
out_destroy_rbps_pool:
	pci_pool_destroy(he_dev->rbps_pool);
	return -ENOMEM;
}

static int __devinit
+11 −0
Original line number Diff line number Diff line
@@ -25,6 +25,10 @@ SOLOS_ATTR_RO(RSCorrectedErrorsUp)
SOLOS_ATTR_RO(RSUnCorrectedErrorsUp)
SOLOS_ATTR_RO(InterleaveRDn)
SOLOS_ATTR_RO(InterleaveRUp)
SOLOS_ATTR_RO(BisRDn)
SOLOS_ATTR_RO(BisRUp)
SOLOS_ATTR_RO(INPdown)
SOLOS_ATTR_RO(INPup)
SOLOS_ATTR_RO(ShowtimeStart)
SOLOS_ATTR_RO(ATURVendor)
SOLOS_ATTR_RO(ATUCCountry)
@@ -62,6 +66,13 @@ SOLOS_ATTR_RW(Defaults)
SOLOS_ATTR_RW(LineMode)
SOLOS_ATTR_RW(Profile)
SOLOS_ATTR_RW(DetectNoise)
SOLOS_ATTR_RW(BisAForceSNRMarginDn)
SOLOS_ATTR_RW(BisMForceSNRMarginDn)
SOLOS_ATTR_RW(BisAMaxMargin)
SOLOS_ATTR_RW(BisMMaxMargin)
SOLOS_ATTR_RW(AnnexAForceSNRMarginDn)
SOLOS_ATTR_RW(AnnexAMaxMargin)
SOLOS_ATTR_RW(AnnexMMaxMargin)
SOLOS_ATTR_RO(SupportedAnnexes)
SOLOS_ATTR_RO(Status)
SOLOS_ATTR_RO(TotalStart)
Loading