Modify

Opened 6 years ago

Closed 4 years ago

Last modified 2 years ago

#8677 closed enhancement (fixed)

Update 170-board_livebox.patch

Reported by: danitool <dgcbueu@…> Owned by: florian
Priority: high Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: livebox profile Cc:

Description

I updated this patch adding some fixes for the bcm63xx livebox 1 (Inventel DV4210) :

  1. patch to detect correctly the mtd redboot partitions with the correct size which allows to boot Openwrt.
  1. Added the gpio buttons and leds
  1. Added the solution discussed in ticket #6326, thus the eth1 is detected correctly.

Attachments (6)

170-board_livebox.patch (9.2 KB) - added by danitool <dgcbueu@…> 6 years ago.
170-board_livebox.2.patch (13.4 KB) - added by danitool <dgcbueu@…> 6 years ago.
JEDEClvbx.patch (2.6 KB) - added by danitool <dgcbueu@…> 6 years ago.
454-board_livebox.patch (9.9 KB) - added by danitool <dgcbueu@…> 5 years ago.
454-board_livebox.2.patch (9.2 KB) - added by danitool <dgcbueu@…> 5 years ago.
mtdfix.patch (1.3 KB) - added by danitool <dgcbueu@…> 4 years ago.

Download all attachments as: .zip

Change History (18)

Changed 6 years ago by danitool <dgcbueu@…>

comment:1 follow-up: Changed 6 years ago by florian

  • Owner changed from developers to florian
  • Status changed from new to accepted

Please do not add #ifdef CONFIG_BOARD_LIVEBOX in the bcm963xx-flash driver, extend the platform_data to pass a board id/name and match on this in the code. I will do it while merging your patch.

Thanks for your work!

comment:2 follow-up: Changed 6 years ago by danitool <dgcbueu@…>

After applying the patch from Ticket #8753, the eth1 doesn't work again. Maybe now the board is too fast to handle correctly the gpio6 reset.

comment:3 in reply to: ↑ 2 Changed 6 years ago by KanjiMonster

Replying to danitool <dgcbueu@…>:

After applying the patch from Ticket #8753, the eth1 doesn't work again. Maybe now the board is too fast to handle correctly the gpio6 reset.

That would be something that could be fixed by a strategically places udelay ;). Looking at the code in the patch and assuming that setting the GPIO puts it into reset, when do you pull it out of the reset? Or does this happen "automagically" by something else?

Actually I can't find that part of the code at all in OpenWrt, so maybe you need to readd the GPIO reset.

comment:4 Changed 6 years ago by danitool <dgcbueu@…>

Yes, udelay does the trick, but with a value too high: 500000. A second option, is to perform the reset earlier, and without delays.

We don't like delays, so I'll choose the second option because it works.
I added the code at this place.

	if (board.has_enet1 && !board.enet1.use_internal_phy) {
		if (BCMCPU_IS_6348())
			val |= GPIO_MODE_6348_G3_EXT_MII |
				GPIO_MODE_6348_G0_EXT_MII;
			printk(KERN_INFO PFX "resetting gpio6 for eth1...\n");
			gpio_request(6, "dsp_eth_rst");
			gpio_direction_output(6, 0);
			gpio_set_value(6, 1);
	}

May look ugly, but it works for me.

Changed 6 years ago by danitool <dgcbueu@…>

comment:5 Changed 6 years ago by danitool <dgcbueu@…>

I don't know if this might help but I made jedec_probe.c patch for the Am29LV640MB memory flash present in my livebox. The code is taken from the inventel sources. Several chips also added from those sources.

Changed 6 years ago by danitool <dgcbueu@…>

comment:6 in reply to: ↑ 1 Changed 5 years ago by danitool <dgcbueu@…>

Replying to florian:

Please do not add #ifdef CONFIG_BOARD_LIVEBOX in the bcm963xx-flash driver, extend the platform_data to pass a board id/name and match on this in the code. I will do it while merging your patch.

Thanks for your work!

I would want to do it myself. Long time since I sent the patch.
How do I put the flash data in a platform_data?

comment:7 Changed 5 years ago by danitool <dgcbueu@…>

I've made this new patch:

  • I didn't use #ifdef CONFIG_BOARD_LIVEBOX as suggested
  • I've also added some improvements: Readahead cache enabled, and other registers for better performance

I know the RAC defines should be in the bcm6348 registers itself.

Note I've changed BCM63XX_EXTENDED_SIZE to be a variable instead static. Then to get the right value I've just made this

+	BCM63XX_EXTENDED_SIZE = bcm963xx_map.phys + 0xA0000000;

I don't know if there is any reason for BCM63XX_EXTENDED_SIZE being always 0xBFC00000.

Please comment on any faults in this patch.

Changed 5 years ago by danitool <dgcbueu@…>

comment:8 Changed 5 years ago by danitool <dgcbueu@…>

I didn't notice the previous patch breaks bcm6358 boards, then it should be ignored.

I've made another new patch, this time only one line changed into the bcm963xx-flash driver, and It won't affect any CFE based board. As a result of this the patch won't break any board nor other patches in the latest trunks.

Since I've patched the redboot the performance fixes are no longer needed, BTW I've replaced them with some printk to be aware about these critical registers.

Also I've added the flash address where the mac address is stored at the Redboot config partition, to allow board_get_mac_address read it. And finally some code to detect the hardware verison.

I consider this patch is ready to be merged.

Changed 5 years ago by danitool <dgcbueu@…>

comment:9 Changed 4 years ago by florian

  • Resolution set to fixed
  • Status changed from accepted to closed

Most of your fixes (not the debug stuff) applied in r32087. Thanks!

comment:10 Changed 4 years ago by danitool <dgcbueu@…>

  • Resolution fixed deleted
  • Status changed from closed to reopened

It seems the mtd driver is broken for the livebox. This should be defined

static struct physmap_flash_data flash_data = {
	.width			= 2,
};

Solved with the following patch.

Changed 4 years ago by danitool <dgcbueu@…>

comment:11 Changed 4 years ago by florian

  • Resolution set to fixed
  • Status changed from reopened to closed

Applied in r32660, thanks!

comment:12 Changed 2 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.