Re: [linux-sunxi] Re: linux-sunxi.org is down

2015-01-28 Thread Alejandro Mery
Hi, sorry for the inconvenient and most importantly, the silence. I was 
away from a computer almost all day preparing my departure from DE this 
weekend. (I really hate not been able to go to FOSDEM for the same reason)


On 28.01.2015 23:06, batari.bal...@gmail.com wrote:

2015. január 28., szerda 17:54:24 UTC+1 időpontban Jens Lucius a következőt 
írta:

Down again?


Yepp, hope it will be up soon ...



the site went down when a defective disk was replaced, which was 
expected to be a minor downtime... unfortunately it was `sda` and after 
the technician replaced the disk and powered it up again it didn't boot 
anymore.


unfortunately^2 after grub was happy ubuntu decided to not boot because 
the raid was degraded... and without access to a console that was quite 
a pain to figure out. (thank you Turl!)


unfortunately^4 after convincing ubuntu that it was safe to boot 
degraded `sdb` decided to die while sync'ing the new sda.


fortunately the machine has 4 disks in raid10 and there are backups too, 
but the risk is too high to put it back in production as-is.


all the data from sunxi.org is safe and secured on a different server.

currently there are two options:
1) wait until tomorrow to get sdb replaced as well and continue as 
nothing happened.
2) wait until tomorrow and get a new machine (already ordered) 
provisioned, and get the linux-sunxi.org running again there.


I'm personally inclined for #2 because it's too much coincidence and it 
might be an issue with the motherboard.


Best regards,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: nand linux-sunxi 3.4

2015-01-15 Thread Alejandro Mery

Hi,

On 15.01.2015 14:26, Toroshin Dmitry wrote:



On Thursday, January 15, 2015 at 6:38:20 PM UTC+6, Mohamed MEDIOUNI wrote:

just crashes after insmod ( 3.4.79)

Le mardi 13 janvier 2015 16:09:07 UTC, Toroshin Dmitry a écrit :



On Tuesday, January 13, 2015 at 9:56:03 PM UTC+6, Mohamed
MEDIOUNI wrote:

Loading sunxi_nand in the Kurio7S just makes 100% CPU usage
for nandd without working access

sunxi-3.4 nand format is incompatible with lichee-3.4 (sdk kernel).
You can try this port of new nand driver:
https://github.com/mittorn/sun7i-nand-sunxi

https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fmittorn%2Fsun7i-nand-sunxisa=Dsntz=1usg=AFQjCNEpAwshe_H84gn6NrYlGPvnbhMrsw
First you should make source in lib dir, after that run make in
root path with LICHEE_KDIR set to sunxi kernel sources path, you
shuld get out-of-tree nand.ko module. You need to enable sunxi
partition table support in kernel to detect partitions.

I have tested it only on 3.4.101 and 3.4.104 kernels. And you need to
enable sunxi partition table support (i have disabled creating nodes for
partitions as sunxi kernel already have this feature, it creatres nand1,
nand2 etc).
Did you have any warnings at the build time? Try to insmod it with fb
console with high loglevel.


can you submit it to be merged into sunxi-3.4?

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] logo update?

2014-12-14 Thread Alejandro Mery



On 02.12.2014 18:31, Tim Tisdall wrote:

I just noticed that https://github.com/linux-sunxi has a A1X logo
instead of the SUNXI logo on the wiki.  I'm thinking someone needs to
update that as the git repo has support for more than just A10 and A13.


thank you for the reminder. I've uploaded the logo from the wiki to  github.

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] usb: gadget: midi: Fix ignored index and id module parameters

2014-09-07 Thread Alejandro Mery

Hi,

On 06/09/14 14:59, Marcus Weseloh wrote:

The MIDI USB gadget driver has index and id parameters which should
determine the alsa sound card index and id to use when registering the
card. Those parameters had no effect, as the relevant information is only
set on the midi structure after f_midi_register_card is called.

This patch moves the two initialisation statements before the function call.

Signed-off-by: Marcus Weseloh mar...@weseloh.cc
---
  drivers/usb/gadget/f_midi.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/f_midi.c
index 1bf9596..1c16bcb 100644
--- a/drivers/usb/gadget/f_midi.c
+++ b/drivers/usb/gadget/f_midi.c
@@ -959,6 +959,8 @@ int __init f_midi_bind_config(struct usb_configuration *c,
/* set up ALSA midi devices */
midi-in_ports = in_ports;
midi-out_ports = out_ports;
+   midi-id = kstrdup(id, GFP_KERNEL);
+   midi-index = index;
status = f_midi_register_card(midi);
if (status  0)
goto setup_fail;
@@ -970,8 +972,6 @@ int __init f_midi_bind_config(struct usb_configuration *c,
midi-func.set_alt = f_midi_set_alt;
midi-func.disable = f_midi_disable;

-   midi-id = kstrdup(id, GFP_KERNEL);
-   midi-index = index;
midi-buflen = buflen;
midi-qlen = qlen;




thank you, I just promoted v3.4.103-r0 out of stage and then applied 
this patch into stage/sunxi-3.4.


I'm really sorry for the delay. If you know any other outstanding patch 
for 3.4, please poke me (mnemoc) on irc.


Thanks,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] sunxi: g2d: don't skip mutex_unlock on invalid ioctl

2014-08-14 Thread Alejandro Mery



On 07/07/14 16:45, Jens Kuske wrote:

Signed-off-by: Jens Kuske jensku...@gmail.com
---
  drivers/char/sunxi_g2d/g2d_driver.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/char/sunxi_g2d/g2d_driver.c 
b/drivers/char/sunxi_g2d/g2d_driver.c
index 0ff1beb..0066867 100644
--- a/drivers/char/sunxi_g2d/g2d_driver.c
+++ b/drivers/char/sunxi_g2d/g2d_driver.c
@@ -426,7 +426,8 @@ long g2d_ioctl(struct file *file, unsigned int cmd, 
unsigned long arg)

/* Invalid IOCTL call */
default:
-   return -EINVAL;
+   ret = -EINVAL;
+   break;
}

  err_noput:



thank you, applied on stage/sunxi-3.4

regards,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] nand sunxi-nand

2014-08-14 Thread Alejandro Mery



On 25/07/14 15:14, Tim Tisdall wrote:

 From cdc41a44c4fad7626b6e65939e009acf80fd154a Mon Sep 17 00:00:00 2001
From: Tim Tisdall tisd...@gmail.com mailto:tisd...@gmail.com
Date: Wed, 23 Jul 2014 10:35:24 -0400
Subject: [PATCH] rename to sunxi_nand to avoid naming conflict

rename to sunxi_nand to avoid conflict with drivers/mtd/nand/nand.ko
---
  drivers/block/sunxi_nand/nfd/Makefile | 16 +---
  1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/block/sunxi_nand/nfd/Makefile
b/drivers/block/sunxi_nand/nfd/Makefile
index 32507e6..bd91457 100644
--- a/drivers/block/sunxi_nand/nfd/Makefile
+++ b/drivers/block/sunxi_nand/nfd/Makefile
@@ -1,10 +1,12 @@
-obj-$(CONFIG_SUNXI_NAND)  += nand.o
-nand-y := nand_blk.o  dma_for_nand.o int_for_nand.o \
- ../src/format/nand_format.o \
- ../src/logic/bad_manage.o ../src/logic/logic_ctl.o
../src/logic/mapping.o ../src/logic/mapping_base.o ../src/logic/merge.o
../src/logic/read_reclaim.o ../src/logic/wear_levelling.o
../src/logic/logic_cache.o \
- ../src/scan/nand_scan.o ../src/scan/nand_id.o\
- ../src/physic/nand_phy.o ../src/physic/nand_simple_r.o
../src/physic/nand_simple_w.o \
- ../nfc/nfc_r.o ../nfc/nfc_w.o
+obj-$(CONFIG_SUNXI_NAND)  += sunxi_nand.o
+sunxi_nand-y := nand_blk.o dma_for_nand.o int_for_nand.o \
+../src/format/nand_format.o \
+../src/logic/bad_manage.o ../src/logic/logic_ctl.o
../src/logic/mapping.o \
+../src/logic/mapping_base.o ../src/logic/merge.o
../src/logic/read_reclaim.o \
+../src/logic/wear_levelling.o ../src/logic/logic_cache.o \
+../src/scan/nand_scan.o ../src/scan/nand_id.o \
+../src/physic/nand_phy.o ../src/physic/nand_simple_r.o
../src/physic/nand_simple_w.o \
+../nfc/nfc_r.o ../nfc/nfc_w.o
--
1.9.1




thank you, applied on stage/sunxi-3.4

regards,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] sunxi: disp: Allow negative hardware cursor position

2014-08-14 Thread Alejandro Mery



On 18/07/14 15:56, Jens Kuske wrote:

The hardware cursor coordinates seem to be signed 14 bit values.
This has been tested on sun4i and sun7i.

Signed-off-by: Jens Kuske jensku...@gmail.com
---
  drivers/video/sunxi/disp/de_hwc.c | 11 ---
  1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/video/sunxi/disp/de_hwc.c 
b/drivers/video/sunxi/disp/de_hwc.c
index 44c94a8..fd43af6 100644
--- a/drivers/video/sunxi/disp/de_hwc.c
+++ b/drivers/video/sunxi/disp/de_hwc.c
@@ -32,11 +32,8 @@ __s32 DE_BE_HWC_Enable(__u32 sel, __bool enable)

  __s32 DE_BE_HWC_Set_Pos(__u32 sel, __disp_pos_t *pos)
  {
-   __u32 tmp;
-
-   tmp = DE_BE_RUINT32(sel, DE_BE_HWC_CRD_CTL_OFF);
-   DE_BE_WUINT32(sel, DE_BE_HWC_CRD_CTL_OFF, (tmp  0xf800f800) |
- (pos-y  0x7ff)  16 | (pos-x  0x7ff));
+   DE_BE_WUINT32(sel, DE_BE_HWC_CRD_CTL_OFF,
+ (pos-y  0x3fff)  16 | (pos-x  0x3fff));

return 0;
  }
@@ -46,8 +43,8 @@ __s32 DE_BE_HWC_Get_Pos(__u32 sel, __disp_pos_t *pos)
__u32 readval;

readval = DE_BE_RUINT32(sel, DE_BE_HWC_CRD_CTL_OFF);
-   pos-y = (readval  0x07ff)  16;
-   pos-x = (readval  0x07ff);
+   pos-y = sign_extend32((readval  0x3fff)  16, 13);
+   pos-x = sign_extend32(readval  0x3fff, 13);

return 0;




thank you, applied on stage/sunxi-3.4

regards,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 1/1] fexc: add some sanity checking to bin reading

2014-08-14 Thread Alejandro Mery



On 14/08/14 02:28, Luc Verhaegen wrote:

Signed-off-by: Luc Verhaegen l...@skynet.be
---
  script_bin.c |   39 +--
  1 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/script_bin.c b/script_bin.c
index cd71218..c797fbe 100644
--- a/script_bin.c
+++ b/script_bin.c
@@ -210,17 +210,35 @@ int script_generate_bin(void *bin, size_t 
UNUSED(bin_size),
  /*
   * decompiler
   */
-static int decompile_section(void *bin, size_t UNUSED(bin_size),
+static int decompile_section(void *bin, size_t bin_size,
 const char *filename,
 struct script_bin_section *section,
 struct script *script)
  {
-   struct script_bin_entry *entry = PTR(bin,  section-offset2);
+   struct script_bin_entry *entry;
struct script_section *s;
+   int size;
+
+   if ((section-offset  0) || (section-offset  (int)(bin_size / 4))) {
+   pr_err(Malformed data: invalid section offset: %d\n,
+  section-offset);
+   return 0;
+   }
+
+   size = bin_size - 4 * section-offset;
+
+   if ((section-length = 0) ||
+   (section-length  (size / (int)sizeof(struct script_bin_entry {
+   pr_err(Malformed data: invalid section length: %d\n,
+  section-length);
+   return 0;
+   }

if ((s = script_section_new(script, section-name)) == NULL)
goto malloc_error;

+   entry = PTR(bin, section-offset2);
+
for (int i = section-length; i--; entry++) {
void *data = PTR(bin, entry-offset2);
unsigned type, words;
@@ -289,6 +307,9 @@ failure:
return 0;
  }

+#define SCRIPT_BIN_VERSION_LIMIT 0x10
+#define SCRIPT_BIN_SECTION_LIMIT 0x100
+
  int script_decompile_bin(void *bin, size_t bin_size,
 const char *filename,
 struct script *script)
@@ -302,6 +323,20 @@ int script_decompile_bin(void *bin, size_t bin_size,
pr_info(%s: size: %zu (%d sections)\n, filename,
bin_size, head-sections);

+   if (head-sections  SCRIPT_BIN_SECTION_LIMIT) {
+   pr_err(Malformed data: too many sections (%d).\n,
+  head-sections);
+   return 0;
+   }
+
+   if ((head-version[0]  SCRIPT_BIN_VERSION_LIMIT) ||
+   (head-version[1]  SCRIPT_BIN_VERSION_LIMIT) ||
+   (head-version[2]  SCRIPT_BIN_VERSION_LIMIT)) {
+   pr_err(Malformed data: version %d.%d.%d.\n,
+  head-version[0], head-version[1], head-version[2]);
+   return 0;
+   }
+
/* TODO: SANITY: compare head.sections with bin_size */
for (i=0; i  head-sections; i++) {
struct script_bin_section *section = head-section[i];



thank you! lng time waiting for this :)

Alejandro

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH sunxi-tools v2] Add copyright headers to various files.

2014-06-30 Thread Alejandro Mery



On 17/06/14 13:19, Ian Campbell wrote:

On Fri, 2014-06-13 at 07:42 +0100, Ian Campbell wrote:

Hi Alejandro,

I think yours is the last Ack which is needed for this change. Sorry to
be a pain.


sorry for the late response. I have over 9k unread mails in my sunxi 
folder :\


afaik everything in there is GPL2+

After your ping over IRC, and as every other author agrees, I was going 
to apply the patch now... but it doesn't : can I pull it from somewhere?


cheers,
Alejandro




Cheers,
Ian.


I'd like to package sunxi-tools for Debian and therefore it is important for
the licensing information to be complete/accurate. I believe the intention was
for everything here to be GPL2+ by default, since that is the license on every
file which has one and COPYING contains GPL2.

Early on the license applied to this repo was GPLv3 however this was changed to
GPL2+ by Alejandro in 79ea14d4e050 at which point he had been the only
contributor.

This patch adds the standard GPL2+ stanza used already in sunxi-tools.git or
the MIT license stanza when requested by the copyright holder to various files
which were missing one as follows:

adb-devprobe.sh
fel-gpio
 According to git all of these were written by Henrik. Copyright years
 according to git. Henrik requested that these be put under an MIT license,
 so that is what has been done.

boot_head.lds
fel-pio.lds
fel-sdboot.lds
jtag-loop.lds
 According to git all of these were written by Henrik. Copyright years
 according to git. According to Henrik These linker scripts are all GPLv2+
 as the C / ASM sources they refer to.

include/endian_compat.h
 The content of this file was originally added to fel.c (commit
 c71ff92c02d3), which had a GPL2+ stanza at the time, by Eric Molitor and 
later
 those lines were moved by Alejandro (commit bcde0fc72170) into this file.
 I originally added GPL2+ from fel.c and added Eric's copyright with the
 correct year according to git but Eric said Ack but also would prefer
 MIT/Dual :), so it has now been changed to MIT.

include/types.h:
 Henrik originally added some of these lines to bootinfo.c, along with a
 GPL2+ stanza, in the original version (commit c26e5ff80af6). Later on
 Alejandro moved them into this file (commit 329a13ed75e5) and added more.
 I've copied the stanza from bootinfo.c and added both copyrights with the
 years according to git. Authors:
   Henrik, who says OK.
   Alejandro Mery

Makefile:
 GPL2+ with copyrights and years according to git. Authors are:
   Alejandro Mery
   Henrik Nordstrom, who says Yes
   Pat Wood, who says Fine with me

usb-boot:
 Henrik is the primary author, added MIT license on Henrik's request with
 his copyright and years according to git. Authors are:
   Henrik Nordstrom, who says Yes, that too should be MIT
   Alejandro Mery (typo fix)
   Michal Suchanek (typo fix)

Everyone affected by the above is CCd.

This probably seems pretty obvious to most people, sorry for being so pedantic
about it. It will save hassel when it comes to getting it into Debian though.

Cc: Henrik Nordstrom hen...@henriknordstrom.net
Cc: Eric Molitor e...@molitor.org
Cc: Alejandro Mery am...@geeks.cl
Cc: Pat Wood pat.w...@efi.com
Cc: Michal Suchanek hramr...@gmail.com
---
v2: Gathered feedback from the authors
  - Pat said Fine with me
  - Henrik asked that adb-devprobe.sh, fel-gpio and usb-boot be MIT, acked
*.lds, types.h and Makefile
  - Explicitly listed authors of Makefile and usb-boot
  - Michal Suchanek make a typo fix to usb-boot but wasn't CCd, sorry.
  - Reworded commit message due to some bits now being MIT on request of the
author.
---
  Makefile| 18 ++
  adb-devprobe.sh | 20 
  boot_head.lds   | 16 
  fel-gpio| 20 
  fel-pio.lds | 16 
  fel-sdboot.lds  | 16 
  include/endian_compat.h | 24 +++-
  include/types.h | 20 
  jtag-loop.lds   | 16 
  usb-boot| 17 +
  10 files changed, 182 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index ea8480f..f58bced 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,21 @@
+# Copyright (C) 2012   Alejandro Mery am...@geeks.cl
+# Copyright (C) 2012,2013  Henrik Nordstrom hen...@henriknordstrom.net
+# Copyright (C) 2013   Patrick Wood patrickhw...@gmail.com
+# Copyright (C) 2013   Pat Wood pat.w...@efi.com
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY

Re: [linux-sunxi] Re: [PATCH] Add mele_m5 fex file to sunxi-boards

2014-06-07 Thread Alejandro Mery



On 06/06/14 06:36, te...@tfisher.ca wrote:

On Monday, May 26, 2014 4:27:24 PM UTC-4, Terry Fisher wrote:

Mele M5 fex file.  Memory parameters are extracted from Mele's V3.1.2 firmware 
update script.bin.

---

  sys_config/a20/mele_m5.fex | 1019 

...

+[disp_init]
+disp_init_enable = 1
+disp_mode = 0
+screen0_output_type = 3
+screen0_output_mode = 5
+screen1_output_type = 1
+screen1_output_mode = 4

...

--

1.8.5.5


The Mele M5 has been working very well with these settings (I've been running 
Gentoo Linux) when using HDMI, but may not be optimal for Composite output.  A 
better setup would likely be:

[disp_init]
disp_init_enable = 1
disp_mode = 4
screen0_output_type = 3
screen0_output_mode = 5
screen1_output_type = 2
screen1_output_mode = 14

I can submit a complete new patch file, or an incremental to be applied after 
my origin, whichever is preferred.


incremental is better

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH] sunxi: Add Mele_M3 support

2014-06-04 Thread Alejandro Mery

Hi,

 One thing I'm curious about the M3 is, does it have a sata connector ?


no, the SATA connector is not soldered http://i.imgur.com/6wR28As.jpg



On 03/06/14 08:32, Hans de Goede wrote:

Hi,

On 06/02/2014 10:12 PM, Alejandro Mery wrote:



On 02/06/14 09:18, Hans de Goede wrote:


based on board/sunxi/board.c's mmc_pinmux_setup() MMC_SUNXI_SLOT=3
should match the setup for accessing the tSD according to the .fex
http://sprunge.us/WbMM?ini#n-647 but:

Card did not respond to voltage select!

any idea what I'm missing?


Yes you're looking at mmc3 in the fex instead of mmc2, if you look at
the A20 datasheet you will see that it can boot from mmc0 and mmc2,
not mmc3. So the SD/MMC: 2 message in the on-board u-boot very likely
really means mmc2 and not mmc3.


thank you! with MMC_SUNXI_SLOT_EXTRA=2 I get both mmc devices in u-boot.


Cool!


how to proceed? Mele_M3 board as SLOT_EXTRA=2, and Mele_M3_tSD (better name 
welcomed) for SLOT=2, SLOT_EXTRA=0 ?


I would really prefer to have just one config which does just does the right
thing for both slots,

Can you put a debug printf at the start of board/sunxi/board.c: board_mmc_init()
printing the mux setting of the PORTF and PORTC pins ? I would expect the
PORTC pins to not be multiplexed to the mmc host when booting from the external
sdcard slot / mmc0 host.


Added printf's of sunxi_gpio_get_cfgpin() of PF0, PH22, PC6 and PI4.

when booting from mmc0 an spl compiled for SLOT_EXTRA=2, PF0 is muxed to 
2, and the first pin of the other 3 MMCs are 0. good!


but when booting from mmc0 an spl compiled for SLOT=2, SLOT_EXTRA=0. it 
dies before printing anything.


U-Boot SPL 2014.04-10686-gbfb54a3-dirty (Jun 04 2014 - 23:37:01)
Board: Mele_M3_tSD
DRAM: 1024 MiB
CPU: 96000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
spl: not an uImage at 80
### ERROR ### Please RESET the board ###




So this way you can find out which host we're booting from. Then add 
primary_mmc_slot /
secondary_mmc_slot variables to board_mmc_init(), set those depending on the 
test
result and for the rest of board_mmc_init() use those variables instead of
CONFIG_MMC_SUNXI_SLOT[_EXTRA].

This magic should be protected by some #ifdef-erey like this:

#if CONFIG_MMC_SUNXI_SLOT == 0  CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
/* magic autodetect here */
#else
const int primary_mmc_slot = CONFIG_MMC_SUNXI_SLOT;
#if !defined (CONFIG_SPL_BUILD)  defined (CONFIG_MMC_SUNXI_SLOT_EXTRA)
const int secondary_mmc_slot = CONFIG_MMC_SUNXI_SLOT;
#endif
#endif

 mmc_pinmux_setup(primary_mmc_slot);
 sunxi_mmc_init(primary_mmc_slot);
#if !defined (CONFIG_SPL_BUILD)  defined (CONFIG_MMC_SUNXI_SLOT_EXTRA)
 mmc_pinmux_setup(secondary_mmc_slot);
 sunxi_mmc_init(secondary_mmc_slot);
#endif


Note is important to only initialize the secondary mmc in the non SPL
case so that the magic autodetect will still work when the real (non SPL)
uboot runs and runs board_mmc_init() a second time.

This also means that the bit of magic which is missing from my above
code snippet should only declare and initialize secondary_mmc_slot in the
non SPL case to avoid a compiler warning when building the SPL.


so removing the spying printf()s it would look like the following. sadly 
it just dies as described above before calling board_mmc_init().


diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index e2d5b4d..4c7257a 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -113,13 +113,55 @@ static void mmc_pinmux_setup(int sdc)
break;
}
 }
+static int mmc_pinmux_peek(int sdc)
+{
+   int pin, mux;
+
+   switch (sdc) {
+   case 0:
+   pin = SUNXI_GPF(0);
+   mux = SUNXI_GPF0_SDC0;
+   break;
+   case 1:
+   pin = SUNXI_GPH(22);
+   mux = SUN4I_GPH22_SDC1;
+   break;
+   case 2:
+   pin = SUNXI_GPC(6);
+   mux = SUNXI_GPC6_SDC2;
+   break;
+   case 3:
+   pin = SUNXI_GPI(4);
+   mux = SUN4I_GPI4_SDC3;
+   break;
+   default:
+   return 0;
+   }
+
+   return sunxi_gpio_get_cfgpin(pin) == mux;
+}

 int board_mmc_init(bd_t *bis)
 {
+#if CONFIG_MMC_SUNXI_SLOT == 0  CONFIG_MMC_SUNXI_SLOT_EXTRA == 2
+   /* magic */
+   int primary_mmc_slot, secondary_mmc_slot;
+
+   if (mmc_pinmux_peek(CONFIG_MMC_SUNXI_SLOT_EXTRA)) {
+   primary_mmc_slot = CONFIG_MMC_SUNXI_SLOT_EXTRA;
+   secondary_mmc_slot = CONFIG_MMC_SUNXI_SLOT;
+   } else {
+   primary_mmc_slot = CONFIG_MMC_SUNXI_SLOT;
+   secondary_mmc_slot = CONFIG_MMC_SUNXI_SLOT_EXTRA;
+   }
+
+   (void)secondary_mmc_slot;
+#else
const int primary_mmc_slot = CONFIG_MMC_SUNXI_SLOT;
 #if !defined (CONFIG_SPL_BUILD)  defined (CONFIG_MMC_SUNXI_SLOT_EXTRA)
const int secondary_mmc_slot = CONFIG_MMC_SUNXI_SLOT_EXTRA;
 #endif
+#endif

mmc_pinmux_setup

Re: [linux-sunxi] [PATCH 2/2] fix k1001l1c name so it buidls with sunxi-bsp

2014-06-01 Thread Alejandro Mery



On 01/06/14 13:39, Luc Verhaegen wrote:

On Sun, Jun 01, 2014 at 01:33:53PM +0200, Korneliusz Osmenda wrote:

---
  boards.cfg | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/boards.cfg b/boards.cfg
index cc9ba1a..fd53aa7 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -417,7 +417,7 @@ Active  arm armv7  sunxi   -
   sunxi
  Active  arm armv7  sunxi   -   sunxi  
 INet97F-II   sun4i:INET97F_II,SPL  

-
  Active  arm armv7  sunxi   -   sunxi  
 INet_K70HC   sun7i:INET_K70HC,SPL  

-
  Active  arm armv7  sunxi   -   sunxi  
 Jesurun-Q5   
sun4i:JESURUN_Q5,SPL,SUNXI_EMAC,STATUSLED=244   
  -
-Active  arm armv7  sunxi   -   sunxi   
K1001L1C sun7i:K1001L1C,SPL 

   -
+Active  arm armv7  sunxi   -   sunxi   
k1001l1c sun7i:K1001L1C,SPL 

   -
  Active  arm armv7  sunxi   -   sunxi  
 Linksprite_pcDuino3  
sun7i:LINKSPRITE_PCDUINO3,SPL,SUNXI_GMAC,FAST_MBUS  
  -
  Active  arm armv7  sunxi   -   sunxi  
 Marsboard_A10
sun4i:MARSBOARD_A10,SPL,SUNXI_EMAC,NO_AXP   
  -
  Active  arm armv7  sunxi   -   sunxi  
 Marsboard_A20
sun7i:MARSBOARD_A20,SPL,SUNXI_EMAC,NO_AXP   
  -


If you are doing this sort of change, please give this device a more
proper name.

Either Inet_K100c, which is the name of the board, or Inet_K100c-L1
which would be the unique combination of this board and the rest of the
device.

My feeling is that Inet_K100c is enough, until we actually prove that
there is another device with this board out there. The latter is
unlikely given the very high rate at which new devices and boards are
produced, despite the fact that inet tries to market it differently.

Finally, what nonsense is the bsp code doing that it breaks
capitalization?


sunxi-bsp assumes that the u-boot board name is the same as the fex file 
name.


--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH v2] k1001l1c should use proper dram file too.

2014-06-01 Thread Alejandro Mery



On 01/06/14 14:23, Korneliusz Osmenda wrote:

This was broken in:

f0a91836e85: Unify eoma68_a20 and a20_olinuxino_m dram settings

Signed-off-by: Korneliusz Osmenda korneliu...@gmail.com
Reviewed-by: Luc Verhaegen l...@skynet.be
---
  board/sunxi/Makefile | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index 8b429bc..dbfa0b4 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -46,7 +46,7 @@ obj-$(CONFIG_INET_K70HC)  += dram_inet_k70hc.o
  obj-$(CONFIG_ITEADA10)+= dram_cubieboard.o
  obj-$(CONFIG_ITEADA20)+= dram_cubieboard2.o
  obj-$(CONFIG_JESURUN_Q5)  += dram_sun4i_312_1024_iow8.o
-obj-$(CONFIG_K1001L1C) += dram_a20_olinuxino_m.o
+obj-$(CONFIG_K1001L1C) += dram_sun7i_384_1024_iow16.o
  obj-$(CONFIG_LINKSPRITE_PCDUINO3) += dram_linksprite_pcduino3.o
  obj-$(CONFIG_MEFAFEIS_A08)+= dram_megafeis_a08.o
  obj-$(CONFIG_MELE_A1000)  += dram_sun4i_360_512.o



thank you, applied.

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] [PATCH] sunxi: Add Mele_M3 support

2014-06-01 Thread Alejandro Mery
Signed-off-by: Alejandro Mery am...@geeks.cl
---
 board/sunxi/Makefile | 1 +
 boards.cfg   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/board/sunxi/Makefile b/board/sunxi/Makefile
index dbfa0b4..3247f1a 100644
--- a/board/sunxi/Makefile
+++ b/board/sunxi/Makefile
@@ -52,6 +52,7 @@ obj-$(CONFIG_MEFAFEIS_A08)+= dram_megafeis_a08.o
 obj-$(CONFIG_MELE_A1000)   += dram_sun4i_360_512.o
 obj-$(CONFIG_MELE_A1000G)  += dram_sun4i_360_1024_iow8.o
 obj-$(CONFIG_MELE_A3700)   += dram_sun4i_360_1024_iow8.o
+obj-$(CONFIG_MELE_M3)  += dram_sun7i_384_1024_iow16.o
 obj-$(CONFIG_MINI_X)   += dram_sun4i_360_512.o
 obj-$(CONFIG_MINI_X_1GB)   += dram_sun4i_360_1024_iow16.o
 obj-$(CONFIG_MINI_X_A10S)  += dram_mini_x_a10s.o
diff --git a/boards.cfg b/boards.cfg
index cc9ba1a..fed1b5c 100644
--- a/boards.cfg
+++ b/boards.cfg
@@ -427,6 +427,7 @@ Active  arm armv7  sunxi   -
   sunxi
 Active  arm armv7  sunxi   -   sunxi   
Mele_A1000_FEL   
sun4i:MELE_A1000,SPL_FEL,SUNXI_EMAC,STATUSLED=234   
  -
 Active  arm armv7  sunxi   -   sunxi   
Mele_A1000G  
sun4i:MELE_A1000G,SPL,SUNXI_EMAC,STATUSLED=234  
  -
 Active  arm armv7  sunxi   -   sunxi   
Mele_A3700   
sun4i:MELE_A3700,SPL,SUNXI_EMAC,STATUSLED=234   
  -
+Active  arm armv7  sunxi   -   sunxi   
Mele_M3  
sun7i:MELE_M3,SPL,SUNXI_GMAC,STATUSLED=234  
-
 Active  arm armv7  sunxi   -   sunxi   
merrii_m2sun7i:MERRII_M2,SPL,SUNXI_EMAC 

   -
 Active  arm armv7  sunxi   -   sunxi   
Mini-X   sun4i:MINI_X,SPL   

   -
 Active  arm armv7  sunxi   -   sunxi   
Mini-X-1Gb   sun4i:MINI_X_1GB,SPL   

   -
-- 
1.9.3

-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH] sunxi: Add Mele_M3 support

2014-06-01 Thread Alejandro Mery

Hi, I have a little problem

On 02/06/14 01:00, Alejandro Mery wrote:

Signed-off-by: Alejandro Mery am...@geeks.cl
---
  board/sunxi/Makefile | 1 +
  boards.cfg   | 1 +
  2 files changed, 2 insertions(+)


this device has a tSD on mmc2 instead of an ugly nand, which is awesome. 
BUT I can't see it when booting from our u-boot on mmc0.


[ours]

sun7i# mmc list
SUNXI SD/MMC: 0
sun7i# mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SD08G
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit


[theirs]

sunxi#mmc list
SUNXI SD/MMC: 2
sunxi#mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 88
OEM: 803
Name: NCard
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit


is this something to fix in boards.cfg, or we just don't support mmc2? I 
ask because (obviusly) I would like to boot from the tSD[1] ;-)


[1] http://www.foresee.cc/ch/Business/index.asp?itemid=81

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH] sunxi: Add Mele_M3 support

2014-06-01 Thread Alejandro Mery



On 02/06/14 01:10, Alejandro Mery wrote:

Hi, I have a little problem

On 02/06/14 01:00, Alejandro Mery wrote:

Signed-off-by: Alejandro Mery am...@geeks.cl
---
  board/sunxi/Makefile | 1 +
  boards.cfg   | 1 +
  2 files changed, 2 insertions(+)


this device has a tSD on mmc2 instead of an ugly nand, which is awesome.
BUT I can't see it when booting from our u-boot on mmc0.

[ours]

sun7i# mmc list
SUNXI SD/MMC: 0
sun7i# mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SD08G
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit


[theirs]

sunxi#mmc list
SUNXI SD/MMC: 2
sunxi#mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 88
OEM: 803
Name: NCard
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit


is this something to fix in boards.cfg, or we just don't support mmc2? I
ask because (obviusly) I would like to boot from the tSD[1] ;-)


never mind, just found CONFIG_MMC_SUNXI_SLOT. will send a v2 soon.

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH] sunxi: Add Mele_M3 support

2014-06-01 Thread Alejandro Mery



On 02/06/14 01:21, Alejandro Mery wrote:



On 02/06/14 01:10, Alejandro Mery wrote:

Hi, I have a little problem

On 02/06/14 01:00, Alejandro Mery wrote:

Signed-off-by: Alejandro Mery am...@geeks.cl
---
  board/sunxi/Makefile | 1 +
  boards.cfg   | 1 +
  2 files changed, 2 insertions(+)


this device has a tSD on mmc2 instead of an ugly nand, which is awesome.
BUT I can't see it when booting from our u-boot on mmc0.

[ours]

sun7i# mmc list
SUNXI SD/MMC: 0
sun7i# mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 3
OEM: 5344
Name: SD08G
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 7.4 GiB
Bus Width: 4-bit


[theirs]

sunxi#mmc list
SUNXI SD/MMC: 2
sunxi#mmcinfo
Device: SUNXI SD/MMC
Manufacturer ID: 88
OEM: 803
Name: NCard
Tran Speed: 2500
Rd Block Len: 512
SD version 2.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit


is this something to fix in boards.cfg, or we just don't support mmc2? I
ask because (obviusly) I would like to boot from the tSD[1] ;-)


never mind, just found CONFIG_MMC_SUNXI_SLOT. will send a v2 soon.


yet another self reply...

based on board/sunxi/board.c's mmc_pinmux_setup() MMC_SUNXI_SLOT=3 
should match the setup for accessing the tSD according to the .fex 
http://sprunge.us/WbMM?ini#n-647 but:


Card did not respond to voltage select!

any idea what I'm missing?

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] sunxi-devel branch rebased to 3.15-rc6

2014-05-26 Thread Alejandro Mery



On 26/05/14 14:50, Hans de Goede wrote:

Hi All,

I've just pushed a new version of the sunxi-devel branch to:
https://github.com/linux-sunxi/linux-sunxi/commits/sunxi-devel

Besides being rebased to 3.15-rc6 this branch also contains a
lot of work by various people, some of the highlights are:

-Preliminary sun8i / A23 support
-sun6i / A31 USB host support
-cir support
-oob irq support for sdio wifi on cubietruck

It looks like a large chunk of this will find its way into
the 3.16 kernel :)

Here is the entire series of patches making up this branch.

v3.15-rc6
https://github.com/mripard/linux/commits/sunxi/dt-for-3.16
https://github.com/mripard/linux/commits/sunxi/drivers-for-3.16
https://github.com/mripard/linux/commits/sunxi/core-for-3.16
https://github.com/mripard/linux/commits/sunxi/pinctrl-for-3.16
https://github.com/mripard/linux/commits/sunxi/defconfig-for-3.16
clk patches needed for mmc
mmc driver
sun4i-ts driver
sun4i-lradc-keys driver (old patch set, needs work)
rfkill gpio / cubietruck bluetooth patches (old patch set, needs work)
sun5i_hstimer support
[PATCH v2 0/2] regmap: support regmap over SMBus
[PATCH v3 0/2] i2c: sunxi: add P2WI controller support
[PATCH 0/6] sunxi: clk: Various cleanup and rework
[PATCH v4 0/7] Add Allwinner A31 USB support
[PATCH RFC] crypto: Add Allwinner Security System crypto accelerator
[PATCH v5 0/7] mfd: add basic sun6i A31 PRCM support
[PATCH v6 0/8] mfd: AXP20x: Add support for AXP202 and AXP209
[PATCH v9] DMA: sun6i: Add driver for the Allwinner A31 DMA controller
[PATCH 00/11] sdio wifi oob irq support for sunxi
[PATCH v8 0/3] ARM: sunxi: Add support for consumer infrared devices



Hi Hans,

it seems a .dts is missing:

https://dl.linux-sunxi.org/nightly/linux-sunxi/linux-sunxi-devel/linux-sunxi-devel-20140526T154004-ebd125e.err.txt

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] help

2014-05-15 Thread Alejandro Mery


-- 
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] TCP connection hangs with sunxi-3.4.75 at 1Gbit/s

2014-05-14 Thread Alejandro Mery



On 14/05/14 12:33, Jorge wrote:

I remember having those problems with .75 and trying various things, I
managed to make it happen less often, but I think it never disappeared.

I'm now running 3.4.79 (see
http://www.cubieforums.com/index.php?topic=1413.0), and I think that I
haven't noticed the hangs with this kernel.


btw, current 3.4 is v3.4.90

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] sunxi: w1: Fix module unloading

2014-05-13 Thread Alejandro Mery



On 06/05/14 23:43, Damien Nicolet wrote:

Fix static platform_device causing module unloading to fail

Signed-off-by: Damien Nicolet zar...@gmail.com
---
  drivers/w1/w1_sunxi.c |   48 
  1 file changed, 32 insertions(+), 16 deletions(-)

diff --git a/drivers/w1/w1_sunxi.c b/drivers/w1/w1_sunxi.c
index de24f06..59d2996 100644
--- a/drivers/w1/w1_sunxi.c
+++ b/drivers/w1/w1_sunxi.c
@@ -9,35 +9,51 @@ static int gpio = -1;
  module_param(gpio, int, 0444);
  MODULE_PARM_DESC(gpio, w1 gpio pin number);

-static struct w1_gpio_platform_data w1_gpio_pdata = {
-   .pin = -1,
-   .is_open_drain = 0,
-};
-
-static struct platform_device w1_device = {
-   .name = w1-gpio,
-   .id = -1,
-   .dev.platform_data = w1_gpio_pdata,
-};
+static struct platform_device *w1_device;

  static int __init w1_sunxi_init(void)
  {
-   int ret;
-   if (!gpio_is_valid(gpio)) {
+   int ret = 0;
+   struct w1_gpio_platform_data w1_gpio_pdata = {
+   .pin = gpio,
+   .is_open_drain = 0,
+   };
+
+   if (!gpio_is_valid(w1_gpio_pdata.pin)) {
ret =
script_parser_fetch(w1_para, gpio, gpio, sizeof(int));
if (ret || !gpio_is_valid(gpio)) {
-   pr_err(invalid gpio pin : %d\n, gpio);
+   pr_err(invalid gpio pin in fex configuration : %d\n,
+  gpio);
return -EINVAL;
}
+   w1_gpio_pdata.pin = gpio;
}
-   w1_gpio_pdata.pin = gpio;
-   return platform_device_register(w1_device);
+
+   w1_device = platform_device_alloc(w1-gpio, 0);
+   if (!w1_device)
+   return -ENOMEM;
+
+   ret =
+   platform_device_add_data(w1_device, w1_gpio_pdata,
+sizeof(struct w1_gpio_platform_data));
+   if (ret)
+   goto err;
+
+   ret = platform_device_add(w1_device);
+   if (ret)
+   goto err;
+
+   return 0;
+
+err:
+   platform_device_put(w1_device);
+   return ret;
  }

  static void __exit w1_sunxi_exit(void)
  {
-   platform_device_unregister(w1_device);
+   platform_device_unregister(w1_device);
  }

  module_init(w1_sunxi_init);



thank you, applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[linux-sunxi] Re: [PATCH] i2c-sunxi: Fix support for TWI3 and TWI4 on A20

2014-04-30 Thread Alejandro Mery



On 30/04/14 15:27, Emilio López wrote:

From: Emilio López t...@linux-sunxi.org

Although Hans had introduced support for TWI3 and TWI4, the functions
handling the clocks and pins were limited to only TWI0-2. Let's fix the
clock lists to include the new A20 names, as well as generalize the pin
functions to handle all 5 buses.

Reported-by: Sertac Tüllük stul...@gmail.com
Signed-off-by: Emilio López t...@linux-sunxi.org
---
  drivers/i2c/busses/i2c-sunxi.c | 58 ++
  1 file changed, 19 insertions(+), 39 deletions(-)

diff --git a/drivers/i2c/busses/i2c-sunxi.c b/drivers/i2c/busses/i2c-sunxi.c
index 184d878..85345e0 100644
--- a/drivers/i2c/busses/i2c-sunxi.c
+++ b/drivers/i2c/busses/i2c-sunxi.c
@@ -373,31 +373,19 @@ static void aw_twi_disable_sys_clk(struct sunxi_i2c *i2c)

  static int aw_twi_request_gpio(struct sunxi_i2c *i2c)
  {
-   if(i2c-bus_num == 0) {
-   /* pb0-pb1 TWI0 SDA,SCK */
-   i2c_dbg(config i2c gpio with gpio_config api \n);
-
-   i2c-gpio_hdle = gpio_request_ex(twi0_para, NULL);
-   if(!i2c-gpio_hdle) {
-   pr_warning(twi0 request gpio fail!\n);
-   return -1;
-   }
-   }
-   else if(i2c-bus_num == 1) {
-   /* pb18-pb19 TWI1 scl,sda */
-   i2c-gpio_hdle = gpio_request_ex(twi1_para, NULL);
-   if(!i2c-gpio_hdle) {
-   pr_warning(twi1 request gpio fail!\n);
-   return -1;
-   }
-   }
-   else if(i2c-bus_num == 2) {
-   /* pb20-pb21 TWI2 scl,sda */
-   i2c-gpio_hdle = gpio_request_ex(twi2_para, NULL);
-   if(!i2c-gpio_hdle) {
-   pr_warning(twi2 request gpio fail!\n);
-   return -1;
-   }
+   char name[] = twi%d_para;
+
+   if (i2c-bus_num  4)
+   return 0;
+
+   sprintf(name, twi%d_para, i2c-bus_num);
+
+   i2c_dbg(config i2c gpio with gpio_config api\n);
+
+   i2c-gpio_hdle = gpio_request_ex(name, NULL);
+   if(!i2c-gpio_hdle) {
+   pr_warning(twi%d request gpio fail!\n, i2c-bus_num);
+   return -1;
}

return 0;
@@ -405,18 +393,10 @@ static int aw_twi_request_gpio(struct sunxi_i2c *i2c)

  static void aw_twi_release_gpio(struct sunxi_i2c *i2c)
  {
-   if(i2c-bus_num == 0) {
-   /* pb0-pb1 TWI0 SDA,SCK */
-   gpio_release(i2c-gpio_hdle, 0);
-   }
-   else if(i2c-bus_num == 1) {
-   /* pb18-pb19 TWI1 scl,sda */
-   gpio_release(i2c-gpio_hdle, 0);
-   }
-   else if(i2c-bus_num == 2) {
-   /* pb20-pb21 TWI2 scl,sda */
-   gpio_release(i2c-gpio_hdle, 0);
-   }
+   if (i2c-bus_num  4)
+   return;
+
+   gpio_release(i2c-gpio_hdle, 0);
  }


@@ -1006,8 +986,8 @@ static int i2c_sunxi_probe(struct platform_device *dev)
struct sunxi_i2c *i2c = NULL;
struct resource *res = NULL;
struct sunxi_i2c_platform_data *pdata = NULL;
-   char *i2c_clk[] ={twi0,twi1,twi2};
-   char *i2c_pclk[] ={apb_twi0,apb_twi1,apb_twi2};
+   char *i2c_clk[] = {twi0, twi1, twi2, twi3, twi4};
+   char *i2c_pclk[] = {apb_twi0, apb_twi1, apb_twi2, apb_twi3, 
apb_twi4};
int ret;
int irq;




thank you, applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] Re: [PATCH] i2c-sunxi: use standard mode I2C speed of 100 kbit/s for I2C[1-4]

2014-04-27 Thread Alejandro Mery



On 23/04/14 05:23, Jonathan Liu wrote:

On 20 March 2014 23:53, Jonathan Liu net...@gmail.com wrote:

Standard mode I2C speed is 100 kbit/s and should be used instead of
200 kbit/s which is non-standard.

Signed-off-by: Jonathan Liu net...@gmail.com
---
  arch/arm/plat-sunxi/include/plat/i2c.h | 8 
  1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/plat-sunxi/include/plat/i2c.h 
b/arch/arm/plat-sunxi/include/plat/i2c.h
index be8fe41..d75347b 100644
--- a/arch/arm/plat-sunxi/include/plat/i2c.h
+++ b/arch/arm/plat-sunxi/include/plat/i2c.h
@@ -194,10 +194,10 @@ Foscl is clock SCL;standard mode:100KHz or fast 
mode:400KHz
  #define TWI4_BASE_ADDR_END(TWI4_BASE_ADDR_START + AW_TWI_ADDR_SIZE)

  #define I2C0_TRANSFER_SPEED (40)
-#define I2C1_TRANSFER_SPEED (20)
-#define I2C2_TRANSFER_SPEED (20)
-#define I2C3_TRANSFER_SPEED (20)
-#define I2C4_TRANSFER_SPEED (20)
+#define I2C1_TRANSFER_SPEED (10)
+#define I2C2_TRANSFER_SPEED (10)
+#define I2C3_TRANSFER_SPEED (10)
+#define I2C4_TRANSFER_SPEED (10)

  struct sunxi_i2c_platform_data {
 int  bus_num;
--
1.9.0



Bump. This is for sunxi-3.4 branch.
Any takers for landing this fix?


sorry for the delay, applied to stage/sunxi-3.4

please try to specify it next time as [PATCH 3.4] on the subject :)

Cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 3.4] fix promiscuous mode for sunxi_emac driver

2014-04-26 Thread Alejandro Mery



On 20/04/14 11:09, Diego Roversi wrote:


The sunxi-emac driver is rather primitive, and doesn't support
promiscuous mode. This is a problem when you try do to configure
a bridge, or capturing ethernet traffic.

Based on a patch for linux mainline from Marc Zyngier: move
the RX setup code to the ndo_set_rx_mode vector, and add the
required HW configuration when IFF_PROMISC is passed by the core
code.

Tested on a20-olinuxino-micro.

Signed-off-by: Diego Roversi die...@tiscali.it

diff --git a/drivers/net/ethernet/allwinner/sunxi_emac.c 
b/drivers/net/ethernet/allwinner/sunxi_emac.c
index 2aaf386..1f1fddd 100644
--- a/drivers/net/ethernet/allwinner/sunxi_emac.c
+++ b/drivers/net/ethernet/allwinner/sunxi_emac.c
@@ -642,6 +642,23 @@ unsigned int emac_setup(struct net_device *ndev)
 return 1;
  }

+static void sunxi_emac_set_rx_mode(struct net_device *ndev)
+{
+   unsigned int reg_val;
+   sunxi_emac_board_info_t *db = netdev_priv(ndev);
+
+   /* set up RX */
+   reg_val = readl(db-emac_vbase + SUNXI_EMAC_RX_CTL_REG);
+
+   if (ndev-flags  IFF_PROMISC)
+   reg_val |= (0x14);
+   else
+   reg_val = (~(0x14));
+
+   writel(reg_val, db-emac_vbase + SUNXI_EMAC_RX_CTL_REG);
+}
+
+
  static void sunxi_emac_set_mac_addr(sunxi_emac_board_info_t *db, unsigned 
char *buf)
  {
 writel(buf[0]  16 | buf[1]  8 | buf[2],
@@ -1497,7 +1514,7 @@ static const struct net_device_ops sunxi_emac_netdev_ops 
= {
 .ndo_stop   = sunxi_emac_stop,
 .ndo_start_xmit = sunxi_emac_start_xmit,
 .ndo_tx_timeout = sunxi_emac_timeout,
-   .ndo_set_rx_mode= sunxi_emac_hash_table,
+   .ndo_set_rx_mode= sunxi_emac_set_rx_mode,
 .ndo_do_ioctl   = sunxi_emac_ioctl,
 .ndo_change_mtu = eth_change_mtu,
 .ndo_validate_addr  = eth_validate_addr,



thank you, applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] Add support for consumer infrared devices on A20

2014-04-26 Thread Alejandro Mery



On 26/04/14 17:11, Rudi wrote:

Hi,


Ah I just send a mail about the need to use the rc-core subsys myself,
I did not
know we already had a driver using that. Do you have a link to the old
posting of
that driver ? That would be a great starting point for Alexander to
get something
ready for the mainline (iirc the cir driver was against 3.4 ?)


I carefully put it aside ;-). Find a patch that hooks it into 3.4.79 here:

https://github.com/OpenBricks/openbricks/blob/master/config/platforms/arm/a10/packages/linux/patches/0002-ir-core-support.diff


can you resubmit it here as a proper patch for the 3.4 tree?

Thanks,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] fel: Add A23 SoC ID

2014-04-26 Thread Alejandro Mery



On 24/04/14 05:08, Chen-Yu Tsai wrote:

Signed-off-by: Chen-Yu Tsai w...@csie.org
---
  fel.c | 1 +
  1 file changed, 1 insertion(+)

diff --git a/fel.c b/fel.c
index ba4212c..97f265e 100644
--- a/fel.c
+++ b/fel.c
@@ -166,6 +166,7 @@ void aw_fel_get_version(libusb_device_handle *usb)
case 0x1625: soc_name=A13;break;
case 0x1633: soc_name=A31;break;
case 0x1651: soc_name=A20;break;
+   case 0x1650: soc_name=A23;break;
}

printf(%.8s soc=%08x(%s) %08x ver=%04x %02x %02x scratchpad=%08x %08x 
%08x\n, buf.signature, buf.soc_id, soc_name, buf.unknown_0a, buf.protocol, 
buf.unknown_12, buf.unknown_13, buf.scratchpad, buf.pad[0], buf.pad[1]);



thank you, applied.

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 0/6] HDMI Driver Cleanup

2014-04-26 Thread Alejandro Mery



On 23/04/14 20:12, codekip...@gmail.com wrote:

From: Marcus Cooper codekip...@gmail.com

Hi,

There is a lot of code in the HDMI driver that does
nothing. These patches removes all the unnecessary
code, provides a clean up and some parameter checks
which came from the comparing the drivers released
under the A23 SDK.

I have tested this on my A10 and A20 devices and
everything seems to work as it did before the patches
were applied.

Thanks,
Marcus

Marcus Cooper (6):
   sunxi: hdmi: Removal of unneeded headers
   sunxi: hdmi: remove HDMI capture
   sunxi: hmdi: remove what looks like I2S leftovers
   sunxi: hdmi: strip out more unneeded code
   sunxi: hdmi: audio tidy up
   sunxi: hdmi: added parameter checks

  sound/soc/sunxi/hdmiaudio/sndhdmi.c |  78 ++--
  sound/soc/sunxi/hdmiaudio/sndhdmi.h |  36 --
  sound/soc/sunxi/hdmiaudio/sunxi-hdmiaudio.c | 603 
  sound/soc/sunxi/hdmiaudio/sunxi-hdmiaudio.h | 303 --
  sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.c   | 141 ---
  sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.h   |  25 --
  sound/soc/sunxi/hdmiaudio/sunxi-sndhdmi.c   | 232 +--
  sound/soc/sunxi/hdmiaudio/sunxi-sndhdmi.h   |  26 --
  8 files changed, 217 insertions(+), 1227 deletions(-)
  delete mode 100644 sound/soc/sunxi/hdmiaudio/sndhdmi.h
  delete mode 100644 sound/soc/sunxi/hdmiaudio/sunxi-hdmiaudio.h
  delete mode 100644 sound/soc/sunxi/hdmiaudio/sunxi-hdmipcm.h
  delete mode 100644 sound/soc/sunxi/hdmiaudio/sunxi-sndhdmi.h



thank you! merged into stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] sunxi:nand: add support for samsung K9GBG08U0M

2014-04-07 Thread Alejandro Mery



On 09/01/14 22:05, Luc Verhaegen wrote:

This data was taken from a newer version of libnand, which is only
available as a binary blob. The flags gave me a bit of trouble, but
i verified that all of the ones in the current libnand are still
being used the same way in the new libnand.

Works as well as could be expected :)

Signed-off-by: Luc Verhaegen l...@skynet.be
---
  drivers/block/sunxi_nand/src/scan/nand_id.c |   13 +++--
  1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/block/sunxi_nand/src/scan/nand_id.c 
b/drivers/block/sunxi_nand/src/scan/nand_id.c
index 7021894..7f0a76c 100644
--- a/drivers/block/sunxi_nand/src/scan/nand_id.c
+++ b/drivers/block/sunxi_nand/src/scan/nand_id.c
@@ -219,15 +219,16 @@ struct __NandPhyInfoPar_t SamsungNandTbl[] =
  { {0xec, 0xd5, 0x84, 0x72, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
2048,   0x,   950,24, 2,   0,0, PhysicArchiPara3 
},   // K9GAG08U0E
  { {0xec, 0xd5, 0x94, 0x76, 0x54, 0xff, 0xff, 0xff }, 1,16, 128, 
2048,   0x0408,   950,30, 2,   0,0, PhysicArchiPara3 
},   // K9GAG08U0E
  { {0xec, 0xd3, 0x84, 0x72, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
1024,   0x,   950,24, 2,   0,0, PhysicArchiPara3 
},   // K9G8G08U0C
-   { {0xec, 0xd7, 0x94, 0x76, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,30, 3,   0,0, PhysicArchiPara3 
},   // K9GBG08U0A
-   { {0xec, 0xd7, 0x94, 0x7A, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,30, 3,   0,0, PhysicArchiPara3 
},   // K9GBG08U0A
-   { {0xec, 0xde, 0xd5, 0x7A, 0x58, 0xff, 0xff, 0xff }, 2,16, 128, 
4096,   0x0888,   974,30, 3,   0,0, 
PhysicArchiPara3 },   // K9LCG08U0A
+{ {0xec, 0xd7, 0x94, 0x76, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,30, 3,   0,0, PhysicArchiPara3 
},   // K9GBG08U0A
+{ {0xec, 0xd7, 0x94, 0x7A, 0xff, 0xff, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,30, 3,   0,0, PhysicArchiPara3 
},   // K9GBG08U0A
+{ {0xec, 0xde, 0xd5, 0x7A, 0x58, 0xff, 0xff, 0xff }, 2,16, 128,
4096,   0x0888,   974,30, 3,   0,0, PhysicArchiPara3 
},   // K9LCG08U0A

-   { {0xec, 0xd7, 0x94, 0x7A, 0x54, 0xc3, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,60, 1,   0,3, PhysicArchiPara3 
},   // toogle nand 1.0
-   { {0xec, 0xde, 0xa4, 0x7a, 0x68, 0xc4, 0xff, 0xff }, 1,16, 128, 
8192,   0x0588,   974,60, 4,   0x200e04, 3, PhysicArchiPara3 
},   // toogle nand 2.0 K9GCGD8U0A
-   { {0xec, 0xd7, 0x94, 0x7E, 0x64, 0xc4, 0xff, 0xff }, 1,16, 128, 
4096,   0x0588,   974,60, 4,   0x200e04, 3, PhysicArchiPara3 
},   // toogle nand 2.0 K9GBGD8U0B
+{ {0xec, 0xd7, 0x94, 0x7A, 0x54, 0xc3, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,60, 1,   0,3, PhysicArchiPara3 
},   // toogle nand 1.0
+{ {0xec, 0xde, 0xa4, 0x7a, 0x68, 0xc4, 0xff, 0xff }, 1,16, 128, 
8192,   0x0588,   974,60, 4,   0x200e04, 3, PhysicArchiPara3 
},   // toogle nand 2.0 K9GCGD8U0A
+{ {0xec, 0xd7, 0x94, 0x7E, 0x64, 0xc4, 0xff, 0xff }, 1,16, 128, 
4096,   0x0588,   974,60, 4,   0x200e04, 3, PhysicArchiPara3 
},   // toogle nand 2.0 K9GBGD8U0B
  { {0xec, 0xd7, 0x94, 0x7e, 0x64, 0x44, 0xff, 0xff }, 1,16, 128, 
4096,   0x0188,   974,40, 4,   0x200e04, 0, PhysicArchiPara3 
},   // 21nm sdr K9GBG08U0B
  { {0xec, 0xde, 0xd5, 0x7e, 0x68, 0x44, 0xff, 0xff }, 2,16, 128, 
4096,   0x0188,   974,40, 4,   0x200e04, 0, PhysicArchiPara3 
},   // 21nm sdr K9LCG08U0B
+{ {0xec, 0xd7, 0x14, 0x76, 0x54, 0xc2, 0xff, 0xff }, 1,16, 128, 
4096,   0x0088,   974,40, 3,   0,3, PhysicArchiPara3 
},   // K9GBG08U0M

  
//---
  { {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }, 0, 0,   0,   
 0,   0x, 0, 0, 0,   0,0,  0
 },   // NULL



Sorry for the delay and thank you for the reminder, applied on 
stage/sunxi-3.4


Cheers,
Alejandro

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 3.4] sunxi:axp20x: Enable internal thermal monitoring

2014-03-18 Thread Alejandro Mery



On 18/03/14 17:44, Patrick Wood wrote:



On Sunday, March 16, 2014 12:22:58 PM UTC-4, Alejandro Mery wrote:

Hi,

On 11/03/14 05:31, Patrick Wood wrote:
 
 
  On Sunday, March 9, 2014 10:13:08 AM UTC-4, Alejandro Mery wrote:
 
 
 
  On 09/03/14 13:09, Olliver Schinagl wrote:
Mnemoc,
   
have you checked and merged this yet?
 
  thanks for the reminder. it fails to compile when hwmon is m
 
  like on sun7i_defconfig:
  LD  .tmp_vmlinux1
  drivers/built-in.o: In function `axp20_init_chip':
 

/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp20-mfd.h:149:

 
  undefined reference to `hwmon_device_register'
  drivers/built-in.o: In function `axp_mfd_remove':
 

/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp-mfd.c:368:

 
  undefined reference to `hwmon_device_unregister'
  make[1]: *** [.tmp_vmlinux1] Error 1
  make: *** [sub-make] Error 2
 
  build_sun7i/.config:CONFIG_AXP_HWMON=y
  build_sun7i/.config:CONFIG_HWMON=m
 
  in most defconfigs hwmon is n, should I y/y them on all
defconfigs? can
  it be fixed to support hwmon=m?
 
 
  Try this:
 
  diff --git a/drivers/power/axp_power/Kconfig
  b/drivers/power/axp_power/Kconfig
  index 66aa6ac..4e942a9 100644
  --- a/drivers/power/axp_power/Kconfig
  +++ b/drivers/power/axp_power/Kconfig
  @@ -38,7 +38,7 @@ config AXP_CHGCHANGE
config AXP_HWMON
   depends on HWMON
  -   bool Enable the internal thermal monitoring support of
AXP20X
  chips
  +   tristate Enable the internal thermal monitoring support of
  AXP20X chips
   default y
endif # !AW_AXP

yes, that solved the problem. what about defconfig? m/m? y/y?

regards,
Alejandro Mery


Well, my preference is y/y, but I don't know if anyone else feels that way.


thanks. applied (with the change to tristate) and then defconfigs 
modified to get hwmon y/y by default.


Cheers,
Alejandro

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 3.4] sunxi:axp20x: Enable internal thermal monitoring

2014-03-16 Thread Alejandro Mery

Hi,

On 11/03/14 05:31, Patrick Wood wrote:



On Sunday, March 9, 2014 10:13:08 AM UTC-4, Alejandro Mery wrote:



On 09/03/14 13:09, Olliver Schinagl wrote:
  Mnemoc,
 
  have you checked and merged this yet?

thanks for the reminder. it fails to compile when hwmon is m

like on sun7i_defconfig:
LD  .tmp_vmlinux1
drivers/built-in.o: In function `axp20_init_chip':

/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp20-mfd.h:149:

undefined reference to `hwmon_device_register'
drivers/built-in.o: In function `axp_mfd_remove':

/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp-mfd.c:368:

undefined reference to `hwmon_device_unregister'
make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

build_sun7i/.config:CONFIG_AXP_HWMON=y
build_sun7i/.config:CONFIG_HWMON=m

in most defconfigs hwmon is n, should I y/y them on all defconfigs? can
it be fixed to support hwmon=m?


Try this:

diff --git a/drivers/power/axp_power/Kconfig
b/drivers/power/axp_power/Kconfig
index 66aa6ac..4e942a9 100644
--- a/drivers/power/axp_power/Kconfig
+++ b/drivers/power/axp_power/Kconfig
@@ -38,7 +38,7 @@ config AXP_CHGCHANGE
  config AXP_HWMON
 depends on HWMON
-   bool Enable the internal thermal monitoring support of AXP20X
chips
+   tristate Enable the internal thermal monitoring support of
AXP20X chips
 default y
  endif # !AW_AXP


yes, that solved the problem. what about defconfig? m/m? y/y?

regards,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH 3.4] sunxi:axp20x: Enable internal thermal monitoring

2014-03-09 Thread Alejandro Mery



On 09/03/14 13:09, Olliver Schinagl wrote:

Mnemoc,

have you checked and merged this yet?


thanks for the reminder. it fails to compile when hwmon is m

like on sun7i_defconfig:
  LD  .tmp_vmlinux1
drivers/built-in.o: In function `axp20_init_chip':
/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp20-mfd.h:149: 
undefined reference to `hwmon_device_register'

drivers/built-in.o: In function `axp_mfd_remove':
/srv/build/amery/allwinner/linux-sunxi/3.4/drivers/power/axp_power/axp-mfd.c:368: 
undefined reference to `hwmon_device_unregister'

make[1]: *** [.tmp_vmlinux1] Error 1
make: *** [sub-make] Error 2

build_sun7i/.config:CONFIG_AXP_HWMON=y
build_sun7i/.config:CONFIG_HWMON=m

in most defconfigs hwmon is n, should I y/y them on all defconfigs? can 
it be fixed to support hwmon=m?


--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [linux-sunxi] [PATCH] arch/arm/mach-sun7i/pm/standby/mem_printk.c used non-const char arrays. However gcc 4.6.3 likes to replace these by calls to memcpy. memcpy doesn't exist in the kernel. Havin

2014-03-06 Thread Alejandro Mery


On 06/03/14 04:44, Patrick Wood wrote:



On Wednesday, March 5, 2014 5:55:50 PM UTC-5, Alejandro Mery wrote:


On 05/03/14 16:14, Andreas Baierl wrote:
 Hi Alejandro,
 this patch breaks building because it's not applied as Danny
sent it :)

yes, I couldn't apply it because of ^Ms... but compiled fine for
me

I'm kind of lost on why is `const char foo* =` instead of `const char
foo[] =`.

This has to do with how arrays vs. pointers are initialized by the 
compiler at runtime.  A pointer like char *p (or const char *p) is 
initialized by simply setting its value to the address of some string 
in the data area.  An automatic array (on the stack) has storage that 
must be initialized with the actual contents of the string every time 
the function is called; memcpy is one way to do this.  But if memcpy 
isn't available because libc isn't available



can you show the error?

These should all be declared const char * not const char ...[]


ok, fix fixed. that weird when cross compiling or compiling natively on 
my laptop or buildserver the compiler puts this const char array in the 
data area, not on the stack. oddnesses of on-target compiling.


sorry for the confusion... I didn't even see the * when reapplying the 
patch manually.


Thanks,
Alejandro

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] arch/arm/mach-sun7i/pm/standby/mem_printk.c used non-const char arrays. However gcc 4.6.3 likes to replace these by calls to memcpy. memcpy doesn't exist in the kernel. Havin

2014-03-05 Thread Alejandro Mery


On 05/03/14 16:14, Andreas Baierl wrote:

Hi Alejandro,
this patch breaks building because it's not applied as Danny sent it :)


yes, I couldn't apply it because of ^Ms... but compiled fine for me

I'm kind of lost on why is `const char foo* =` instead of `const char 
foo[] =`.


can you show the error?

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] Unify sunxi SPI driver a little more

2014-03-02 Thread Alejandro Mery


On 02/03/14 13:57, oli...@schinagl.nl wrote:

From: Olliver Schinagl oli...@schinagl.nl

Currently the unification happened by merging spi_sun4i and spi_sun5i
but the KConfig's remained split. This merges the KConfig's to SPI_SUNXI
and adjusts the spi driver likewise. Integration with spi for sun7i
should be easier now.

Signed-off-by: Olliver Schinagl oli...@schinagl.nl
---
  drivers/spi/Kconfig | 27 +++
  drivers/spi/Makefile|  3 +--
  drivers/spi/spi_sunxi.c | 36 ++--
  3 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index c4fb46a..7503a6c 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -355,28 +355,15 @@ config SPI_STMP3XXX
help
  SPI driver for Freescale STMP37xx/378x SoC SSP interface
  
-config SPI_SUN4I

-   tristate SUN4I SPI Controller
-   depends on ARCH_SUN4I
+config SPI_SUNXI
+   tristate SUNXI SPI Controller
+   depends on ARCH_SUN4I || ARCH_SUN5I
help
-   Allwinner Soc SPI controller,present on SUN4I chips.
+   Allwinner Soc SPI controller,present on sun4i and sun5i chips.


how about a second patch setting default m and removing them from defconfig?

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] Unify sunxi SPI driver a little more

2014-03-02 Thread Alejandro Mery


On 02/03/14 13:57, oli...@schinagl.nl wrote:

From: Olliver Schinagl oli...@schinagl.nl

Currently the unification happened by merging spi_sun4i and spi_sun5i
but the KConfig's remained split. This merges the KConfig's to SPI_SUNXI
and adjusts the spi driver likewise. Integration with spi for sun7i
should be easier now.

Signed-off-by: Olliver Schinagl oli...@schinagl.nl
---
  drivers/spi/Kconfig | 27 +++
  drivers/spi/Makefile|  3 +--
  drivers/spi/spi_sunxi.c | 36 ++--
  3 files changed, 26 insertions(+), 40 deletions(-)

diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
index c4fb46a..7503a6c 100644
--- a/drivers/spi/Kconfig
+++ b/drivers/spi/Kconfig
@@ -355,28 +355,15 @@ config SPI_STMP3XXX
help
  SPI driver for Freescale STMP37xx/378x SoC SSP interface
  
-config SPI_SUN4I

-   tristate SUN4I SPI Controller
-   depends on ARCH_SUN4I
+config SPI_SUNXI
+   tristate SUNXI SPI Controller
+   depends on ARCH_SUN4I || ARCH_SUN5I
help
-   Allwinner Soc SPI controller,present on SUN4I chips.
+   Allwinner Soc SPI controller,present on sun4i and sun5i chips.
  
-config SUN4I_SPI_NDMA

-bool SUN4I SPI Normal DMA mode select
-depends on SPI_SUN4I
-help
-  This selects SPI DMA mode with DMA transfer
-  Y select NDMA mode and N select DDMA mode
-
-config SPI_SUN5I
-   tristate SUN5I SPI Controller
-   depends on ARCH_SUN5I
-   help
-   Allwinner Soc SPI controller,present on SUN5I chips.
-
-config SUN5I_SPI_NDMA
-bool SUN5I SPI Normal DMA mode select
-depends on SPI_SUN5I
+config SPI_SUNXI_NDMA
+bool SUNXI SPI Normal DMA mode select
+depends on SPI_SUNXI
  help
This selects SPI DMA mode with DMA transfer
Y select NDMA mode and N select DDMA mode
diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
index a13913f..a0041af 100644
--- a/drivers/spi/Makefile
+++ b/drivers/spi/Makefile
@@ -62,6 +62,5 @@ obj-$(CONFIG_SPI_TLE62X0) += spi-tle62x0.o
  obj-$(CONFIG_SPI_TOPCLIFF_PCH)+= spi-topcliff-pch.o
  obj-$(CONFIG_SPI_TXX9)+= spi-txx9.o
  obj-$(CONFIG_SPI_XILINX)  += spi-xilinx.o
-obj-$(CONFIG_SPI_SUN4I)+= spi_sunxi.o
-obj-$(CONFIG_SPI_SUN5I)+= spi_sunxi.o
+obj-$(CONFIG_SPI_SUNXI)+= spi_sunxi.o
  
diff --git a/drivers/spi/spi_sunxi.c b/drivers/spi/spi_sunxi.c

index a3792fd..055e292 100644
--- a/drivers/spi/spi_sunxi.c
+++ b/drivers/spi/spi_sunxi.c
@@ -92,7 +92,7 @@ struct sunxi_spi {
struct clk *mclk;  /* ahb spi gating bit */
unsigned long gpio_hdle;
  
-	#if defined(CONFIG_SUN4I_SPI_NDMA) || defined(CONFIG_SUN5I_SPI_NDMA)

+   #ifdef CONFIG_SPI_SUNXI_NDMA
enum sw_dma_ch dma_id;
enum sw_dmadir dma_dir;
int dma_hdle;
@@ -550,7 +550,7 @@ static struct sw_dma_client spi_dma_client[] = {
  };
  #endif
  
-#if defined CONFIG_SUN4I_SPI_NDMA || defined CONFIG_SUN5I_SPI_NDMA

+#ifdef CONFIG_SPI_SUNXI_NDMA
  /*
   * rx dma callback, disable the 1/4 fifo rx drq.
   * tx dma callback, disable the tx empty drq.
@@ -659,7 +659,7 @@ static int spi_sunxi_config_dma(struct sunxi_spi *aw_spi, 
enum sw_dmadir dma_dir
  #endif
  struct dma_hw_conf spi_hw_conf = {0};
  
- #if defined CONFIG_SUN4I_SPI_NDMA || defined CONFIG_SUN5I_SPI_NDMA

+ #ifdef CONFIG_SPI_SUNXI_NDMA
  //write
  if (dma_dir == SW_DMA_WDEV) {
spi_hw_conf.drqsrc_type  = N_DRQSRC_SDRAM;   // must be 
sdram,or sdram
@@ -705,7 +705,7 @@ static int spi_sunxi_config_dma(struct sunxi_spi *aw_spi, 
enum sw_dmadir dma_dir
  spi_hw_conf.xfer_type   = DMAXFER_D_SWORD_S_SWORD;
  spi_hw_conf.hf_irq  = SW_DMA_IRQ_FULL;
  
- #if defined CONFIG_SUN4I_SPI_NDMA || defined CONFIG_SUN5I_SPI_NDMA

+ #ifdef CONFIG_SPI_SUNXI_NDMA
  /* set src,dst, drq type,configuration */
  ret = sw_dma_config(aw_spi-dma_id, spi_hw_conf);
  /* flush the transfer queue */
@@ -719,7 +719,7 @@ static int spi_sunxi_config_dma(struct sunxi_spi *aw_spi, 
enum sw_dmadir dma_dir
  
  /* 1. flush d-cache */

  spi_sunxi_cleanflush_dcache_region((void *)buf, len);
- #if defined CONFIG_SUN4I_SPI_NDMA || defined CONFIG_SUN5I_SPI_NDMA
+ #ifdef CONFIG_SPI_SUNXI_NDMA
  /* 2. enqueue dma transfer, --FIXME--: buf: virtual address, not physical 
address. */
  ret += sw_dma_enqueue(aw_spi-dma_id, (void *)aw_spi, (dma_addr_t)buf, 
len);
#else
@@ -745,7 +745,7 @@ static int spi_sunxi_prepare_dma(struct sunxi_spi *aw_spi, 
enum sw_dmadir dma_di
  {
  int ret = 0;
  int bus_num   = aw_spi-master-bus_num;
-#if defined CONFIG_SUN4I_SPI_NDMA || defined CONFIG_SUN5I_SPI_NDMA
+#ifdef CONFIG_SPI_SUNXI_NDMA
  aw_spi-dma_hdle = sw_dma_request(aw_spi-dma_id, 

Re: [linux-sunxi] [PATCH 3.4] sun7i_deconfig enable option for usable kernel

2014-03-02 Thread Alejandro Mery


On 02/03/14 16:10, Gerardo Di Iorio wrote:


Enable in sun7i_deconfig option for an usable kernel
I add nand,emac,ir,gpio,mmc

Signed-off-by: Gerardo Di Iorio aret...@gmail.com 
mailto:aret...@gmail.com

---
 arch/arm/configs/sun7i_defconfig | 8 
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/configs/sun7i_defconfig 
b/arch/arm/configs/sun7i_defconfig

index 44f9bf4..3de48e4 100644
--- a/arch/arm/configs/sun7i_defconfig
+++ b/arch/arm/configs/sun7i_defconfig
@@ -436,6 +436,7 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=2
 CONFIG_CDROM_PKTCDVD=m
 CONFIG_ATA_OVER_ETH=m
+CONFIG_SUNXI_NAND=m
 CONFIG_SUNXI_DBGREG=m
 CONFIG_TI_DAC7512=m
 CONFIG_EEPROM_AT24=m
@@ -458,6 +459,9 @@ CONFIG_ATA=y
 # CONFIG_SATA_PMP is not set
 CONFIG_SW_SATA_AHCI_PLATFORM=y
 # CONFIG_ATA_SFF is not set
+CONFIG_NETDEVICES=y
+CONFIG_SUNXI_EMAC=y
+CONFIG_PHYLIB=y
 CONFIG_MD=y
 CONFIG_BLK_DEV_DM=y
 CONFIG_DM_DEBUG=y
@@ -586,6 +590,7 @@ CONFIG_INPUT_KEYRESET=y
 CONFIG_KEYBOARD_SUN4IKEYPAD=m
 CONFIG_KEYBOARD_SUN4I_KEYBOARD=m
 CONFIG_KEYBOARD_HV2605_KEYBOARD=y
+CONFIG_IR_SUNXI=m
 # CONFIG_MOUSE_PS2 is not set
 CONFIG_MOUSE_SYNAPTICS_USB=m
 CONFIG_INPUT_JOYSTICK=y
@@ -691,7 +696,9 @@ CONFIG_PPS=m
 CONFIG_PTP_1588_CLOCK=m
 CONFIG_GPIOLIB=y
 CONFIG_GPIO_SYSFS=y
+CONFIG_GPIO_SUNXI=m
 CONFIG_W1=m
+CONFIG_W1_SUNXI=m
 CONFIG_W1_MASTER_GPIO=m
 CONFIG_POWER_SUPPLY=y
 CONFIG_AW_AXP=y
@@ -1057,6 +1064,7 @@ CONFIG_MMC_PARANOID_SD_INIT=y
 CONFIG_SDIO_UART=m
 CONFIG_MMC_USHC=m
 CONFIG_MMC_SUNXI_POWER_CONTROL=y
+CONFIG_MMC_SUNXI=y
 CONFIG_LEDS_CLASS=y
 CONFIG_LEDS_TRIGGER_TIMER=y
 CONFIG_LEDS_TRIGGER_HEARTBEAT=y
--
1.8.4.2


--
You received this message because you are subscribed to the Google 
Groups linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send 
an email to linux-sunxi+unsubscr...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.


thank you, applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] arch/arm/mach-sun7i/pm/standby/mem_printk.c used non-const char arrays. However gcc 4.6.3 likes to replace these by calls to memcpy. memcpy doesn't exist in the kernel. Havin

2014-03-02 Thread Alejandro Mery


On 01/03/14 20:56, Danny Milosavljevic wrote:

---
  arch/arm/mach-sun7i/pm/standby/mem_printk.c |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-sun7i/pm/standby/mem_printk.c 
b/arch/arm/mach-sun7i/pm/standby/mem_printk.c
index 357d7d5..840e61a 100644
--- a/arch/arm/mach-sun7i/pm/standby/mem_printk.c
+++ b/arch/arm/mach-sun7i/pm/standby/mem_printk.c
@@ -165,7 +165,7 @@ char *itoa(int value, char *string, int radix)
int  negative = 0;  //defualt is positive value
int  i;
int  j;
-   char digit_string[] = 0123456789ABCDEF; 
+   const char *digit_string = 0123456789ABCDEF;

if(value == 0)
{
@@ -211,7 +211,7 @@ char *utoa(unsigned int value, char *string, int radix)
char stack[16];
int  i;
int  j;
-   char digit_string[] = 0123456789ABCDEF; 
+   const char *digit_string = 0123456789ABCDEF;

if(value == 0)
{
@@ -366,7 +366,7 @@ __s32 print_align(char *string, __s32 len, __s32 align)
  {
//fill with space ' ' when align request,
//the max align length is 16 byte.
-   char fill_ch[] = ;
+   const char *fill_ch = ;
if (len  align)
{
//fill at right


thank you, applied into stage/sunxi-3.4. but next time please don't put 
the whole description of the patch in the first line, only a short and 
contextualized subject goes there.


cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4 v2] sunxi-hdmi: Add 2 pixelclock overrides for 1280x800 hdmi projectors

2014-03-01 Thread Alejandro Mery


On 28/02/14 14:43, Jonathan Liu wrote:

On 26/02/2014 9:15 AM, Alejandro Mery wrote:


On 23/02/14 23:29, Hans de Goede wrote:
The sunxi video PLL-s can unfortunately not make any random clock 
encountered
in EDID info. So hdmi_edid.c has a table to override the pixelclocks 
in some
EDID provided modes to a value which the PLL-s can actually make 
close to the

real value.

This commit adds the preferred EDID mode from 2 hdmi projectors to this
table, so that sunxi-hdmi will work properly with these projectors.

Reported-by: Jonathan Liu net...@gmail.com
Tested-by: Jonathan Liu net...@gmail.com
Signed-off-by: Hans de Goede hdego...@redhat.com
---
  drivers/video/sunxi/hdmi/hdmi_edid.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c 
b/drivers/video/sunxi/hdmi/hdmi_edid.c

index 226db0b..00cf50d 100644
--- a/drivers/video/sunxi/hdmi/hdmi_edid.c
+++ b/drivers/video/sunxi/hdmi/hdmi_edid.c
@@ -77,8 +77,10 @@ struct pclk_override {
  };
struct pclk_override pclk_override[] = {
-/* VIC PCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP  HPSW VT VBP 
VFP VPSW I  HS VS   override */
+/*  VICPCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP HPSW  
VT  VBP VFP VPSW I  HS VS   override */
  { { HDMI_EDID, 14625, 0, 1680, 1050, 2240, 456, 104, 176, 
1089, 36,  3, 6,  0, 0, 1 }, 14600 },
+{ { HDMI_EDID,  8350, 0, 1280,  800, 1680, 328,  72, 128,  
831, 28,  3, 6,  0, 0, 1 },  8325 },
+{ { HDMI_EDID,  8350, 0, 1280,  800, 1680, 328,  72, 128,  
831, 21, 10, 6,  0, 1, 1 },  8325 },

  { { 0, }, -1 }
  };


thanks!
Applied on stage/sunxi-3.4

Was the change pushed?
https://github.com/linux-sunxi/linux-sunxi/commits/stage/sunxi-3.4


oops. now it is. sorry :-/

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4] sunxi: prevent mali drivers from building every time

2014-02-25 Thread Alejandro Mery


On 20/02/14 03:30, Patrick Wood wrote:

This patch was suggested to prevent the mali drivers from rebuild
every time the modules are built.  It simply creates symlinks to
sources used by both ump.ko and mali.ko so that their objects are built
in separate directories; otherwise, there is a ping-pong effect between
the ump.ko objects and mali.ko objects overwriting each other.

Signed-off-by: Patrick Wood patrickhw...@gmail.com
---
  drivers/gpu/mali/ump/Kbuild   |2 +-
  drivers/gpu/mali/ump/linux/mali_osk_atomics.c |1 +
  drivers/gpu/mali/ump/linux/mali_osk_locks.c   |1 +
  drivers/gpu/mali/ump/linux/mali_osk_math.c|1 +
  drivers/gpu/mali/ump/linux/mali_osk_memory.c  |1 +
  drivers/gpu/mali/ump/linux/mali_osk_misc.c|1 +
  6 files changed, 6 insertions(+), 1 deletion(-)
  create mode 12 drivers/gpu/mali/ump/linux/mali_osk_atomics.c
  create mode 12 drivers/gpu/mali/ump/linux/mali_osk_locks.c
  create mode 12 drivers/gpu/mali/ump/linux/mali_osk_math.c
  create mode 12 drivers/gpu/mali/ump/linux/mali_osk_memory.c
  create mode 12 drivers/gpu/mali/ump/linux/mali_osk_misc.c


thanks! applied on stage/sunxi-3.4

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4 v2] sunxi-hdmi: Add 2 pixelclock overrides for 1280x800 hdmi projectors

2014-02-25 Thread Alejandro Mery


On 23/02/14 23:29, Hans de Goede wrote:

The sunxi video PLL-s can unfortunately not make any random clock encountered
in EDID info. So hdmi_edid.c has a table to override the pixelclocks in some
EDID provided modes to a value which the PLL-s can actually make close to the
real value.

This commit adds the preferred EDID mode from 2 hdmi projectors to this
table, so that sunxi-hdmi will work properly with these projectors.

Reported-by: Jonathan Liu net...@gmail.com
Tested-by: Jonathan Liu net...@gmail.com
Signed-off-by: Hans de Goede hdego...@redhat.com
---
  drivers/video/sunxi/hdmi/hdmi_edid.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/sunxi/hdmi/hdmi_edid.c 
b/drivers/video/sunxi/hdmi/hdmi_edid.c
index 226db0b..00cf50d 100644
--- a/drivers/video/sunxi/hdmi/hdmi_edid.c
+++ b/drivers/video/sunxi/hdmi/hdmi_edid.c
@@ -77,8 +77,10 @@ struct pclk_override {
  };
  
  struct pclk_override pclk_override[] = {

-   /* VIC PCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP  HPSW VT   VBP VFP VPSW 
I  HS VS   override */
+   /*  VICPCLK  AVI_PR INPUTX INPUTY HT   HBP  HFP  HPSW  VT  VBP 
VFP VPSW I  HS VS   override */
{ { HDMI_EDID, 14625, 0, 1680, 1050, 2240, 456, 104, 176, 1089, 36, 
 3, 6,  0, 0, 1 }, 14600 },
+   { { HDMI_EDID,  8350, 0, 1280,  800, 1680, 328,  72, 128,  831, 28, 
 3, 6,  0, 0, 1 },  8325 },
+   { { HDMI_EDID,  8350, 0, 1280,  800, 1680, 328,  72, 128,  831, 21, 
10, 6,  0, 1, 1 },  8325 },
{ { 0, }, -1 }
  };
  


thanks!
Applied on stage/sunxi-3.4

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] Linux boots but Android fails to boot

2014-02-16 Thread Alejandro Mery


On 13/02/14 10:38, Dave McLaughlin wrote:
I found the fault. I'm posting here as others may come across the same 
issue and it is handy find the reasons.


There was a conditional in one of the Android.mk files that was 
preventing the display.c file from being compiled. After I removed the 
condition, the software now builds and run albeit a few issues I am 
working on but at least I have is booting into Android now.


for completeness, can you paste a diff of the fix? ;-)

thanks!
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] usb:sunxi:Fix USB on Hackberry

2014-02-07 Thread Alejandro Mery


On 06/02/14 18:28, Jari Helaakoski wrote:


2014-02-06 Alejandro Mery am...@geeks.cl mailto:am...@geeks.cl:

hi,


On 05/02/14 21:11, Jari Helaakoski wrote:

Hackberry has OTG port wired as host-only port. It seems that
wiring is done so that USB0-IDDET is not pulled down.
This is wrong and leaves port without power.
Commit sets power on if port is defined as host-only in fex
file or compile time.

Commit affects also auxtek-t003, mini-x_a10s, megafeis_a08 and
mk802_a10s.


does this fix it affect the rest of the boards at all?

I grepped trough our fex files and those boards use host only otg port 
setting.
More discussion of hackberry usb problem can be found from here: 
https://github.com/linux-sunxi/linux-sunxi/issues/158



thank you. applied on stage/sunxi-3.4.

is anyone aware of regressions in stage/sunxi-3.4? specially related to 
CMA? I would really like to merge that stage branch and jump to the 
latest stable as it includes a fix for a remote vulnerability :p


cheers,
Alejandro

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] sun7i: defconfig: enable USB_SW_SUNXI_USB

2014-01-09 Thread Alejandro Mery

On 05/01/14 17:24, Luc Verhaegen wrote:

This gives some of our device drivers (realtek usb wifi for instance)
the ability to dynamically turn on/off USBCs. These config options match
sun4i and sun5i.

Signed-off-by: Luc Verhaegen l...@skynet.be
---
  arch/arm/configs/sun7i_defconfig |3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/arm/configs/sun7i_defconfig b/arch/arm/configs/sun7i_defconfig
index d59fe71..e8282ed 100644
--- a/arch/arm/configs/sun7i_defconfig
+++ b/arch/arm/configs/sun7i_defconfig
@@ -1024,6 +1024,9 @@ CONFIG_USB_TRANCEVIBRATOR=m
  CONFIG_USB_IOWARRIOR=m
  CONFIG_USB_ISIGHTFW=m
  CONFIG_USB_GADGET=y
+CONFIG_USB_SW_SUNXI_USB=y
+CONFIG_USB_SW_SUNXI_USB_MANAGER=y
+CONFIG_USB_SW_SUNXI_USB_DEBUG=y
  CONFIG_USB_AUDIO=m
  CONFIG_USB_ETH=m
  CONFIG_USB_ETH_EEM=y



thank you, applied on stage/sunxi-3.4

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH] wireless:rtl8188eu: add usb id for rtl8188etv

2014-01-03 Thread Alejandro Mery

On 02/01/14 20:52, Luc Verhaegen wrote:

Signed-off-by: Luc Verhaegen l...@skynet.be
---
  .../net/wireless/rtl8188eu/os_dep/linux/usb_intf.c |1 +
  1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/rtl8188eu/os_dep/linux/usb_intf.c 
b/drivers/net/wireless/rtl8188eu/os_dep/linux/usb_intf.c
index 8b85338..fbe0a7f 100644
--- a/drivers/net/wireless/rtl8188eu/os_dep/linux/usb_intf.c
+++ b/drivers/net/wireless/rtl8188eu/os_dep/linux/usb_intf.c
@@ -186,6 +186,7 @@ static struct usb_device_id rtw_usb_id_tbl[] ={
  #ifdef CONFIG_RTL8188E
/*=== Realtek demoboard ===*/   
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179)},//Default ID
+   {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0179)},//RTL8188ETV
  #endif
{}  /* Terminating entry */
  };



thank you, applied on sunxi-3.4 and on stage/sunxi-3.4

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4] sun4i-ts: Simplify code significantly

2013-12-31 Thread Alejandro Mery

On 22/12/13 17:48, Hans de Goede wrote:

The sun4i-ts controller is capable of detecting a second touch, but when a
second touch is present then the accuracy becomes so bad the reported touch
location is not useable.

The android driver contains some complicated heuristics using the aprox.
distance between the 2 touches to see if the user is making a pinch open /
close movement, and then reports emulated multi-touch events around the last
single touch coordinate (as the dual-touch coordinates are worthless).

Note that this pinch emulation has never worked as the implementation of
the evdev mt protocol inside the android code is wrong, more over it is
wrong because there is a lot more to multi-touch then just pinch detection,
and reporting being mt capable when we're really not will confuse apps.

I'm currently writing a new rtp driver from scratch for upstream, I've decided
to start with gutting all the heuristics from the 3.4 driver making it work
the same way as I intend the upstream driver to work, so I can test things
on a kernel where I have a working lcd driver.

So this commit removes all the broken heuristics. As a bonus after this patch
the tslib.patch people have been using also is no longer needed:
https://raw.github.com/webconn/OLINUXINO/master/SOFTWARE/A13/TOUCHSCREEN/tslib.patch

Signed-off-by: Hans de Goede hdego...@redhat.com
---
  drivers/input/touchscreen/sun4i-ts.c | 1448 ++
  1 file changed, 45 insertions(+), 1403 deletions(-)


thank you, applied on stage/sunxi-3.4

cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [linux-sunxi] [PATCH 3.4] sunxi: Enable ZONE_DMA for sun4i and sun5i (dma_zone_size=256MB)

2013-12-26 Thread Alejandro Mery

On 25/12/13 04:36, Siarhei Siamashka wrote:

Previously only sun7i had ZONE_DMA enabled, which is originating
from the Allwinner linux-3.3 code drop. But there should be no
reason to have it different for sun4i and sun5i.

The practical effect of setting the dma_zone_size is that it
affects the placement of the CMA area in physical RAM (if CMA
is enabled in the kernel). And we want to have it placed in the
first 256MB of physical RAM because the Cedar VPU is going to
be unhappy otherwise. For example, the encoding of the address
in MACC_MPEG_VLD_ADDR register is a bit tricky for anything that
needs more than 28 bits:
 http://linux-sunxi.org/VE_Register_guide#MACC_MPEG_VLD_ADDR
The low 4 bits might be supposed to store the high part of the
address, but in practice the video playback is currently broken
(in the proprietary libve and in the open source libvdpau-sunxi)
if Cedar memory buffer is allocated at a physical address
above 256MB.

TL;DR this workarounds Cedar VPU issues in the case if CMA is
enabled.

Signed-off-by: Siarhei Siamashka siarhei.siamas...@gmail.com
---
  arch/arm/Kconfig   | 2 ++
  arch/arm/plat-sunxi/core.c | 6 ++
  2 files changed, 8 insertions(+)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 26bec47..fd06762 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -710,6 +710,7 @@ config ARCH_SUN4I
select ARM_L1_CACHE_SHIFT_6
select NEED_MACH_IO_H
select ARCH_WANT_OPTIONAL_GPIOLIB
+   select ZONE_DMA
help
  This enables support for Allwinner Technology Co., Ltd A10 SoC based 
systems

@@ -724,6 +725,7 @@ config ARCH_SUN5I
  select ARM_L1_CACHE_SHIFT_6
select NEED_MACH_IO_H
select ARCH_WANT_OPTIONAL_GPIOLIB
+   select ZONE_DMA
  help
  This enables support for Allwinner Technology Co., Ltd A10s/A13 SoC 
based systems

diff --git a/arch/arm/plat-sunxi/core.c b/arch/arm/plat-sunxi/core.c
index 11ddbbf..e7da395 100644
--- a/arch/arm/plat-sunxi/core.c
+++ b/arch/arm/plat-sunxi/core.c
@@ -402,6 +402,9 @@ MACHINE_START(SUN4I, sun4i)
.init_machine   = sw_core_init,
.reserve= sw_core_reserve,
.restart= sun4i_restart,
+#ifdef CONFIG_ZONE_DMA
+   .dma_zone_size  = SZ_256M,
+#endif
  MACHINE_END

  MACHINE_START(SUN5I, sun5i)
@@ -413,6 +416,9 @@ MACHINE_START(SUN5I, sun5i)
.init_machine   = sw_core_init,
.reserve= sw_core_reserve,
.restart= sun4i_restart,
+#ifdef CONFIG_ZONE_DMA
+   .dma_zone_size  = SZ_256M,
+#endif
  MACHINE_END

  MACHINE_START(SUN7I, sun7i)



thank you, applied on stage/sunxi-3.4

Cheers,
Alejandro Mery

--
You received this message because you are subscribed to the Google Groups 
linux-sunxi group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.