atben/misc/mkpatches |
| 1 | #!/bin/sh |
| 2 | |
| 3 | hdr() |
| 4 | { |
| 5 | cat <<EOF |
| 6 | From: Werner Almesberger <werner@almesberger.net> |
| 7 | To: discussion@lists.en.qi-hardware.com |
| 8 | EOF |
| 9 | } |
| 10 | |
| 11 | |
| 12 | intro() |
| 13 | { |
| 14 | hdr |
| 15 | case "$1" in |
| 16 | 0) cat <<EOF |
| 17 | Subject: [RFC 0/3] ATBEN kernel support for the Ben NanoNote |
| 18 | |
| 19 | For review before submitting things upstream: |
| 20 | |
| 21 | This set of three patches adds support for the ATBEN IEEE 802.15.4 board, |
| 22 | along with the infrastructure needed for the Ben NanoNote. It consists |
| 23 | of three parts: |
| 24 | |
| 25 | 1) addition of a platform-specific reset function to the AT86RF230 driver. |
| 26 | The driver assumes that it can reset the transceiver through a reset |
| 27 | pin, but ATBEN uses power cycling instead. We therefore need a |
| 28 | platform-specific function to perform the reset. |
| 29 | |
| 30 | 2) addition of an SPI-GPIO driver optimized for the Jz4740. ATBEN |
| 31 | connects to a physical MMC interface but uses SPI (with some quirks) |
| 32 | for communication. We therefore have to use bit-banging. |
| 33 | |
| 34 | The SPI-GPIO driver would be too slow, so we introduce a driver |
| 35 | optimized for the Ingenic Jz4740 SoC that implements a subset of |
| 36 | SPI-GPIO's functionality and is up to about six times faster. |
| 37 | |
| 38 | 3) last but not least, we add the platform definitions that connect |
| 39 | the drivers and devices, and provide the platform-specific reset |
| 40 | function. Since all this is specific to the Ben NanoNote, the code |
| 41 | goes into arch/mips/jz4740/ |
| 42 | |
| 43 | Comments welcome. |
| 44 | |
| 45 | - Werner |
| 46 | EOF |
| 47 | exit;; |
| 48 | 1) cat <<EOF |
| 49 | Subject: [RFC 1/3] at86rf230: add support for platform-specific reset function |
| 50 | |
| 51 | Some platforms may not connect the /RST line directly to a GPIO, or they |
| 52 | may not connect it at all and instead use power cycling to reset the |
| 53 | transceiver. |
| 54 | |
| 55 | An example of the latter type is the ATBEN board on the Ben NanoNote. |
| 56 | |
| 57 | This patch adds support for a platform-specific reset function to the |
| 58 | AT86RF230/1 driver. If the platform provides a reset function, "rstn" |
| 59 | is ignored and no GPIO is allocated for it. |
| 60 | EOF |
| 61 | ;; |
| 62 | 2) cat <<EOF |
| 63 | Subject: [RFC 2/3] SPI-GPIO variant optimized for the Ingenic Jz4740 SoC |
| 64 | |
| 65 | This is a drop-in replacement for spi-gpio.c optimized for Jz4740-based |
| 66 | systems. It is up to about six times faster than its generic counterpart. |
| 67 | Only supports SPI mode 0 and CS active-low. Furthermore, MOSI, MISO, and |
| 68 | SCK must be on the same port. |
| 69 | |
| 70 | A detailed performance analysis can be found here: |
| 71 | http://projects.qi-hardware.com/index.php/p/ben-wpan/source/tree/master/atben/misc/atben-spi-performance.txt |
| 72 | EOF |
| 73 | ;; |
| 74 | 3) cat <<EOF |
| 75 | Subject: [RFC 3/3] add ATBEN framework for Ben NanoNote in arch/mips/jz4740/ |
| 76 | |
| 77 | These are the driver and device definitions, and a platform-specific |
| 78 | reset function needed for operating an ATBEN IEEE 802.15.4 board on |
| 79 | the Ben NanoNote (aka QI_LB60). |
| 80 | EOF |
| 81 | ;; |
| 82 | *) echo "usage: $0 1|2|3" 1>&2 |
| 83 | exit 1;; |
| 84 | esac |
| 85 | } |
| 86 | |
| 87 | diffs() |
| 88 | { |
| 89 | case "$1" in |
| 90 | 1) git diff upstream/master include/linux/spi/at86rf230.h |
| 91 | git diff upstream/master drivers/net/ieee802154/at86rf230.c |
| 92 | ;; |
| 93 | 2) git diff upstream/master drivers/spi |
| 94 | ;; |
| 95 | 3) git diff f07af316acaa03939e749a3ffe909510e5b7d536 arch/mips |
| 96 | ;; |
| 97 | esac |
| 98 | } |
| 99 | |
| 100 | intro "$@" |
| 101 | echo --- |
| 102 | diffs "$@" | diffstat |
| 103 | echo |
| 104 | diffs "$@" |