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

Commit 0fc2f137 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (32 commits)
  Blackfin: gpio: add a debounce stub
  Blackfin: update defconfigs
  Blackfin: remove CONFIG_MEM_GENERIC_BOARD
  Blackfin: dpmc: punt unnecessary RTC_ISTAT clearing
  Blackfin: unify rotary encoder bitmasks
  Blackfin: unify SDH/RSI bitmasks
  Blackfin: BF54x: tweak DMAC MMR naming to match other ports
  Blackfin: TWI: clean up the MMR names
  Blackfin: add EVT_OVERRIDE/IPRIO core MMR helpers
  Blackfin: add support for dynamic ftrace
  Blackfin: add support for LZO compressed kernels
  Blackfin: portmux: fix peripheral map overflow when requesting pins
  Blackfin: document SPI CS limitations with CPHA=0
  Blackfin: remove useless and outdated documentation
  Blackfin: BF51x/BF52x: support GPIO Hysteresis/Schmitt Trigger options
  Blackfin: gpio/portmux: clean up whitespace corruption
  Blackfin: make sure mmiowb inserts a write barrier with SSYNC
  Blackfin: fix DMA/cache bug when resuming from suspend to RAM
  Blackfin: BF51x: fix handling of PH8 (the "internal" SPI0SEL4 pin)
  Blackfin: add a GPIO_DEFAULT_BOOT_SPI_CS
  ...
parents dcded10f aab2393e
Loading
Loading
Loading
Loading
+4 −7
Original line number Original line Diff line number Diff line
00-INDEX
00-INDEX
	- This file
	- This file


cachefeatures.txt
bfin-gpio-notes.txt
	- Supported cache features.

Filesystems
	- Requirements for mounting the root file system.

bfin-gpio-note.txt
	- Notes in developing/using bfin-gpio driver.
	- Notes in developing/using bfin-gpio driver.

bfin-spi-notes.txt
	- Notes for using bfin spi bus driver.
+0 −169
Original line number Original line Diff line number Diff line
/*
 * File:         Documentation/blackfin/Filesystems
 * Based on:
 * Author:
 *
 * Created:
 * Description:  This file contains the simple DMA Implementation for Blackfin
 *
 * Rev:          $Id: Filesystems 2384 2006-11-01 04:12:43Z magicyang $
 *
 * Modified:
 *               Copyright 2004-2006 Analog Devices Inc.
 *
 * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 *
 */

		How to mount the root file system in uClinux/Blackfin
		-----------------------------------------------------

1	Mounting EXT3 File system.
	------------------------

	Creating an EXT3 File system for uClinux/Blackfin:


Please follow the steps to form the EXT3 File system and mount the same as root
file system.

a	Make an ext3 file system as large as you want the final root file
	system.

		mkfs.ext3  /dev/ram0 <your-rootfs-size-in-1k-blocks>

b	Mount this Empty file system on a free directory as:

		mount -t ext3 /dev/ram0  ./test
			where ./test is the empty directory.

c	Copy your root fs directory that you have so carefully made over.

		cp -af  /tmp/my_final_rootfs_files/* ./test

		(For ex: cp -af uClinux-dist/romfs/* ./test)

d	If you have done everything right till now you should be able to see
	the required "root" dir's (that's etc, root, bin, lib, sbin...)

e	Now unmount the file system

		umount  ./test

f	Create the root file system image.

		dd if=/dev/ram0 bs=1k count=<your-rootfs-size-in-1k-blocks> \
		> ext3fs.img


Now you have to tell the kernel that will be mounting this file system as
rootfs.
So do a make menuconfig under kernel and select the Ext3 journaling file system
support under File system --> submenu.


2.	Mounting EXT2 File system.
	-------------------------

By default the ext2 file system image will be created if you invoke make from
the top uClinux-dist directory.


3.	Mounting CRAMFS File System
	----------------------------

To create a CRAMFS file system image execute the command

	mkfs.cramfs ./test cramfs.img

	where ./test is the target directory.


4.	Mounting ROMFS File System
	--------------------------

To create a ROMFS file system image execute the command

	genromfs -v -V "ROMdisk" -f romfs.img -d ./test

	where ./test is the target directory


5.	Mounting the JFFS2 Filesystem
	-----------------------------

To create a compressed JFFS filesystem (JFFS2), please execute the command

	mkfs.jffs2 -d ./test -o jffs2.img

	where ./test is the target directory.

However, please make sure the following is in your kernel config.

/*
 * RAM/ROM/Flash chip drivers
 */
#define CONFIG_MTD_CFI 1
#define CONFIG_MTD_ROM 1
/*
 * Mapping drivers for chip access
 */
#define CONFIG_MTD_COMPLEX_MAPPINGS 1
#define CONFIG_MTD_BF533 1
#undef CONFIG_MTD_UCLINUX

Through the u-boot boot loader, use the jffs2.img in the corresponding
partition made in linux-2.6.x/drivers/mtd/maps/bf533_flash.c.

NOTE - 	Currently the Flash driver is available only for EZKIT. Watch out for a
	STAMP driver soon.


6. 	Mounting the NFS File system
	-----------------------------

	For mounting the NFS please do the following in the kernel config.

	In Networking Support --> Networking options --> TCP/IP networking -->
		IP: kernel level autoconfiguration

	Enable BOOTP Support.

	In Kernel hacking --> Compiled-in kernel boot parameter add the following

		root=/dev/nfs rw ip=bootp

	In File system --> Network File system, Enable

		NFS file system support --> NFSv3 client support
		Root File system on NFS

	in uClibc menuconfig, do the following
	In Networking Support
		enable Remote Procedure Call (RPC) support
			Full RPC Support

	On the Host side, ensure that /etc/dhcpd.conf looks something like this

		ddns-update-style ad-hoc;
		allow bootp;
		subnet 10.100.4.0 netmask 255.255.255.0 {
		default-lease-time 122209600;
		max-lease-time 31557600;
		group {
			host bf533 {
				hardware ethernet 00:CF:52:49:C3:01;
				fixed-address 10.100.4.50;
				option root-path "/home/nfsmount";
			}
		}

	ensure that /etc/exports looks something like this
		/home/nfsmount *(rw,no_root_squash,no_all_squash)

	 run the following commands as root (may differ depending on your
	 distribution) :
		-  service nfs start
		-  service portmap start
		-  service dhcpd start
		-  /usr/sbin/exportfs
+14 −0
Original line number Original line Diff line number Diff line
SPI Chip Select behavior:

With the Blackfin on-chip SPI peripheral, there is some logic tied to the CPHA
bit whether the Slave Select Line is controlled by hardware (CPHA=0) or
controlled by software (CPHA=1). However, the Linux SPI bus driver assumes that
the Slave Select is always under software control and being asserted during
the entire SPI transfer. - And not just bits_per_word duration.

In most cases you can utilize SPI MODE_3 instead of MODE_0 to work-around this
behavior. If your SPI slave device in question requires SPI MODE_0 or MODE_2
timing, you can utilize the GPIO controlled SPI Slave Select option instead.

You can even use the same pin whose peripheral role is a SSEL,
but use it as a GPIO instead.
+0 −55
Original line number Original line Diff line number Diff line
/*
 * File:         Documentation/blackfin/cachefeatures.txt
 * Based on:
 * Author:
 *
 * Created:
 * Description:  This file contains the simple DMA Implementation for Blackfin
 *
 * Rev:          $Id: cachefeatures.txt 2384 2006-11-01 04:12:43Z magicyang $
 *
 * Modified:
 *               Copyright 2004-2006 Analog Devices Inc.
 *
 * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 *
 */

	- Instruction and Data cache initialization.
		icache_init();
		dcache_init();

	-  Instruction and Data cache Invalidation Routines, when flushing the
	   same is not required.
		_icache_invalidate();
		_dcache_invalidate();

	Also, for invalidating the entire instruction and data cache, the below
	routines are provided (another method for invalidation, refer page no 267 and 287 of
	ADSP-BF533 Hardware Reference manual)

		invalidate_entire_dcache();
		invalidate_entire_icache();

	-External Flushing of Instruction and data cache routines.

		flush_instruction_cache();
		flush_data_cache();

	- Internal Flushing of Instruction and Data Cache.

		icplb_flush();
		dcplb_flush();

	- Miscellaneous cache functions.

		flush_cache_all();
		flush_cache_mm();
		invalidate_dcache_range();
		flush_dcache_range();
		flush_dcache_page();
		flush_cache_range();
		flush_cache_page();
		invalidate_dcache_range();
		flush_page_to_ram();
+15 −5
Original line number Original line Diff line number Diff line
@@ -25,6 +25,8 @@ config BLACKFIN
	def_bool y
	def_bool y
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_KGDB
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRACEHOOK
	select HAVE_DYNAMIC_FTRACE
	select HAVE_FTRACE_MCOUNT_RECORD
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_GRAPH_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_TRACER
	select HAVE_FUNCTION_TRACE_MCOUNT_TEST
	select HAVE_FUNCTION_TRACE_MCOUNT_TEST
@@ -32,6 +34,7 @@ config BLACKFIN
	select HAVE_KERNEL_GZIP if RAMKERNEL
	select HAVE_KERNEL_GZIP if RAMKERNEL
	select HAVE_KERNEL_BZIP2 if RAMKERNEL
	select HAVE_KERNEL_BZIP2 if RAMKERNEL
	select HAVE_KERNEL_LZMA if RAMKERNEL
	select HAVE_KERNEL_LZMA if RAMKERNEL
	select HAVE_KERNEL_LZO if RAMKERNEL
	select HAVE_OPROFILE
	select HAVE_OPROFILE
	select ARCH_WANT_OPTIONAL_GPIOLIB
	select ARCH_WANT_OPTIONAL_GPIOLIB


@@ -328,11 +331,6 @@ config BF53x
	depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
	depends on (BF531 || BF532 || BF533 || BF534 || BF536 || BF537)
	default y
	default y


config MEM_GENERIC_BOARD
	bool
	depends on GENERIC_BOARD
	default y

config MEM_MT48LC64M4A2FB_7E
config MEM_MT48LC64M4A2FB_7E
	bool
	bool
	depends on (BFIN533_STAMP)
	depends on (BFIN533_STAMP)
@@ -850,6 +848,18 @@ config CPLB_SWITCH_TAB_L1
	  If enabled, the CPLB Switch Tables are linked
	  If enabled, the CPLB Switch Tables are linked
	  into L1 data memory. (less latency)
	  into L1 data memory. (less latency)


config CACHE_FLUSH_L1
	bool "Locate cache flush funcs in L1 Inst Memory"
	default y
	help
	  If enabled, the Blackfin cache flushing functions are linked
	  into L1 instruction memory.

	  Note that this might be required to address anomalies, but
	  these functions are pretty small, so it shouldn't be too bad.
	  If you are using a processor affected by an anomaly, the build
	  system will double check for you and prevent it.

config APP_STACK_L1
config APP_STACK_L1
	bool "Support locating application stack in L1 Scratch Memory"
	bool "Support locating application stack in L1 Scratch Memory"
	default y
	default y
Loading