[OpenWrt-Devel] [PATCH] [bcm63xx] spi driver remove bcm_rset usage

2010-12-09 Thread Miguel GAIO
Hi all,

Since bcm636x platform embeds two spi master device,
the attached patch removes static bcm_rset usage, replaced  by
bs-regs field for all I/O operation.

Regards,

Miguel
From d8afe919203a948a23368e8fdb50ec2d9db30e2b Mon Sep 17 00:00:00 2001
From: Miguel Gaio miguel.g...@efixo.com
Date: Thu, 9 Dec 2010 15:33:43 +0100
Subject: [PATCH]  * [brcm63xx] spi driver: remove bcm_rset usage

---
 target/linux/brcm63xx/patches-2.6.35/240-spi.patch |  136 +++-
 1 files changed, 74 insertions(+), 62 deletions(-)

diff --git a/target/linux/brcm63xx/patches-2.6.35/240-spi.patch b/target/linux/brcm63xx/patches-2.6.35/240-spi.patch
index 62afe8c..ab12a6f 100644
--- a/target/linux/brcm63xx/patches-2.6.35/240-spi.patch
+++ b/target/linux/brcm63xx/patches-2.6.35/240-spi.patch
@@ -318,7 +318,7 @@
  #endif /* BCM63XX_REGS_H_ */
 --- /dev/null
 +++ b/drivers/spi/bcm63xx_spi.c
-@@ -0,0 +1,479 @@
+@@ -0,0 +1,501 @@
 +/*
 + * Broadcom BCM63xx SPI controller support
 + *
@@ -357,11 +357,11 @@
 +
 +struct bcm63xx_spi {
 +	spinlock_t  lock;
-+	int stopping;
++	int			stopping;
 +struct completion	done;
 +
-+void __iomem		*regs;
-+int			irq;
++	void __iomem		*regs;
++	int			irq;
 +
 +	/* Platform data */
 +u32			speed_hz;
@@ -376,6 +376,30 @@
 +	struct platform_device	*pdev;
 +};
 +
++static inline u8 bcm_spi_readb(struct bcm63xx_hsspi *bs,
++unsigned int offset)
++{
++return bcm_readw(bs-regs + bcm63xx_spireg(offset));
++}
++
++static inline u16 bcm_spi_readw(struct bcm63xx_hsspi *bs,
++unsigned int offset)
++{
++return bcm_readw(bs-regs + bcm63xx_spireg(offset));
++}
++
++static inline void bcm_spi_writeb(struct bcm63xx_hsspi *bs,
++  u8 value, unsigned int offset)
++{
++bcm_writeb(value, bs-regs + bcm63xx_spireg(offset));
++}
++
++static inline void bcm_spi_writew(struct bcm63xx_hsspi *bs,
++  u16 value, unsigned int offset)
++{
++bcm_writew(value, bs-regs + bcm63xx_spireg(offset));
++}
++
 +static int bcm63xx_spi_setup_transfer(struct spi_device *spi,
 +	struct spi_transfer *t)
 +{
@@ -428,7 +452,7 @@
 +		break;
 +	}
 +
-+	bcm_spi_writeb(clk_cfg, SPI_CLK_CFG);
++	bcm_spi_writeb(bs, clk_cfg, SPI_CLK_CFG);
 +	dev_dbg(spi-dev, Setting clock register to %d (hz %d, cmd %02x)\n,
 +		div, hz, clk_cfg);
 +
@@ -441,7 +465,7 @@
 +static int bcm63xx_spi_setup(struct spi_device *spi)
 +{
 +	struct bcm63xx_spi *bs;
-+	int retval;
++	int ret;
 +
 +	bs = spi_master_get_devdata(spi-master);
 +
@@ -457,11 +481,11 @@
 +		return -EINVAL;
 +	}
 +
-+	retval = bcm63xx_spi_setup_transfer(spi, NULL);
-+	if (retval  0) {
++	ret = bcm63xx_spi_setup_transfer(spi, NULL);
++	if (ret  0) {
 +		dev_err(spi-dev, setup: unsupported mode bits %x\n,
 +			spi-mode  ~MODEBITS);
-+		return retval;
++		return ret;
 +	}
 +
 +	dev_dbg(spi-dev, %s, mode %d, %u bits/w, %u nsec/bit\n,
@@ -473,20 +497,20 @@
 +/* Fill the TX FIFO with as many bytes as possible */
 +static void bcm63xx_spi_fill_tx_fifo(struct bcm63xx_spi *bs)
 +{
-+u8 tail;
++	u8 tail;
 +
 +/* Fill the Tx FIFO with as many bytes as possible */
-+	tail = bcm_spi_readb(SPI_MSG_TAIL);
++	tail = bcm_spi_readb(bs, SPI_MSG_TAIL);
 +
-+while ((tail  bs-fifo_size)  (bs-remaining_bytes  0)) {
-+if (bs-tx_ptr)
-+bcm_spi_writeb(*bs-tx_ptr++, SPI_MSG_DATA);
++	while ((tail  bs-fifo_size)  (bs-remaining_bytes  0)) {
++		if (bs-tx_ptr)
++			bcm_spi_writeb(bs, *bs-tx_ptr++, SPI_MSG_DATA);
 +		else
-+			bcm_spi_writeb(0, SPI_MSG_DATA);
++			bcm_spi_writeb(bs, 0, SPI_MSG_DATA);
 +
-+bs-remaining_bytes--;
-+		tail = bcm_spi_readb(SPI_MSG_TAIL);
-+}
++		bs-remaining_bytes--;
++		tail = bcm_spi_readb(bs, SPI_MSG_TAIL);
++	}
 +}
 +
 +static int bcm63xx_txrx_bufs(struct spi_device *spi, struct spi_transfer *t)
@@ -510,7 +534,7 @@
 +
 +	/* Enable the command done interrupt which
 +	 * we use to determine completion of a command */
-+	bcm_spi_writeb(SPI_INTR_CMD_DONE, SPI_INT_MASK);
++	bcm_spi_writeb(bs, SPI_INTR_CMD_DONE, SPI_INT_MASK);
 +
 +	/* Fill in the Message control register */
 +	msg_ctl = (t-len  SPI_BYTE_CNT_SHIFT);
@@ -522,37 +546,37 @@
 +	else if (t-tx_buf)
 +		msg_ctl |= (SPI_HD_W  SPI_MSG_TYPE_SHIFT);
 +
-+	bcm_spi_writew(msg_ctl, SPI_MSG_CTL);
++	bcm_spi_writew(bs, msg_ctl, SPI_MSG_CTL);
 +
 +	/* Issue the transfer */
 +	cmd = SPI_CMD_START_IMMEDIATE;
 +	cmd |= (0  SPI_CMD_PREPEND_BYTE_CNT_SHIFT);
-+	bcm_spi_writew(cmd, SPI_CMD);
++	bcm_spi_writew(bs, cmd, SPI_CMD);
 +	wait_for_completion(bs-done);
 +
 +	/* Disable the CMD_DONE interrupt */
-+	bcm_spi_writeb(0, SPI_INT_MASK);
++	bcm_spi_writeb(bs, 0, SPI_INT_MASK);
 +
 +	return t-len - bs-remaining_bytes;
 +}
 +
-+static int bcm63xx_transfer(struct spi_device *spi, struct spi_message *msg)
++static int bcm63xx_transfer(struct spi_device *spi, struct spi_message *m)
 +{
 +	struct bcm63xx_spi *bs = spi_master_get_devdata(spi-master);
-+	struct 

Re: [OpenWrt-Devel] [PATCH] ar71xx UBNT Secondary MAC address duplicate fix

2010-12-09 Thread Gabor Juhos
2010.12.06. 9:19 keltezéssel, Kestutis Barkauskas írta:
 There is Secondary MAC address duplicate problem with some UBNT
 RouterStation and RouterStation Pro HW batches as Primary MAC addresses
 are not increased by 2 per device in board data. Fix is to use 'Locally
 Administrated bit' for Secondary MAC address instead of increasing
 Primary MAC addresses by 1 which could overlap with other device Primary MAC
 address.

It would be possible to know the exact MAC address ranges? Then we would be able
to apply the workaround for the affected boards only.

Regards,
Gabor
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] FOWSR : PWSweather-format output, see ChangeLog for other changes

2010-12-09 Thread Arne-Jørgen Auberg
- added PWS Weather format
- added multiple output format option
- patch for FreeBSD (thanks Alexander Leidinger!)

Signed-off-by: Arne-Jørgen Auberg arne.jorgen.auberg at gmail.com

Index: packages/utils/fowsr/Makefile

 PKG_NAME:=fowsr
 PKG_VERSION:=1.0
-PKG_RELEASE:=20100718
+PKG_RELEASE:=20101010
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.gz
 PKG_SOURCE_URL:=http://fowsr.googlecode.com/files
-PKG_MD5SUM:=34a53f0ba60a62636feef3e09d9e4312
+PKG_MD5SUM:=f177751a7e8882d4f08b5259c072d452
 PKG_CAT:=zcat

define Build/Configure
@@ -50,6 +46,7 @@
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fowsr $(1)/usr/bin/
+  $(INSTALL_BIN) $(PKG_BUILD_DIR)/fowsr.sh $(1)/usr/bin/
+  $(INSTALL_BIN) $(PKG_BUILD_DIR)/pwsweather.sh $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/wunderground.sh $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/pywws.sh $(1)/usr/bin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/xml.sh $(1)/usr/bin/
endef
$(eval $(call BuildPackage,fowsr))
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] OpenWRT packages tagged for releases?

2010-12-09 Thread Ryan Nowakowski
On Wed, Dec 08, 2010 at 02:57:41PM -0600, Ryan Nowakowski wrote:
 I noticed that the svn trunk gets tagged for releases.  For example,
 the backfire release[1].  Do you guys tag the packages[2][3] for a
 particular release too?  Is there a backfire version of the packages?
 
 Thanks,
 
 Ryan
 
 1. svn://svn.openwrt.org/openwrt/tags/backfire_10.03/
 2. http://downloads.openwrt.org/backfire/10.03/x86/packages/
 3. svn://svn.openwrt.org/openwrt/packages/

I just spoke with jow in #openwrt-devel on FreeNode.  He said that
packages aren't tagged during release but that I could just specify
a revision at the end of the packages src-svn line in feeds.conf.
This works fine for the first feeds update.  However subsequent feeds
update runs update packages to HEAD.  I'd like a way to rebuild backfire,
packages and all from the same svn revision.

Is there any reason not to tag packages for each release?  Perhaps:
svn cp svn://svn.openwrt.org/openwrt/packa...@{releaserevision} 
svn://svn.openwrt.org/tags/packages_{RELEASENAME}_{RELEASEVERSION}

Example:
svn cp svn://svn.openwrt.org/openwrt/packa...@20742 
svn://svn.openwrt.org/tags/packages_backfire_10.03

- Ryan
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] buildbot config

2010-12-09 Thread Ryan Nowakowski
Is the buildbot config checked in anywhere?

- Ryan

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] [PATCH] update package triggerhappy to version 0.3.0-1

2010-12-09 Thread Stefan Tomanek
Signed-off-by: Stefan Tomanek stefan.tomanek+open...@wertarbyte.de
---
 utils/triggerhappy/Makefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/triggerhappy/Makefile b/utils/triggerhappy/Makefile
index a0bde02..23dc53b 100644
--- a/utils/triggerhappy/Makefile
+++ b/utils/triggerhappy/Makefile
@@ -6,8 +6,8 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=triggerhappy
-PKG_VERSION:=0.1.6
-PKG_REV:=01bedc72451f8afd0c35649dd67c428c44a0f737
+PKG_VERSION:=0.3.0
+PKG_REV:=19f8b9ad3b33ee5f4c2c992caf0c794ac73fdc35
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-- 
1.7.1
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] buildbot config

2010-12-09 Thread Travis Kemen
The buildbot config is generated by having the arch and CONFIG_ALL=y in
.config then running make defconfig

Travis

On Thu, Dec 9, 2010 at 5:09 PM, Ryan Nowakowski tuba...@fattuba.com wrote:

 Is the buildbot config checked in anywhere?

 - Ryan

 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel