Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262259
b: refs/heads/master
c: dbcb4a1
h: refs/heads/master
i:
  262257: 90bdadd
  262255: 1b17ce7
v: v3
  • Loading branch information
Chris Metcalf committed Jun 10, 2011
1 parent 4cdb545 commit c90a68c
Show file tree
Hide file tree
Showing 5 changed files with 536 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ea41b1e5440442cea5c029b192e9ebbe68e423f6
refs/heads/master: dbcb4a1a3f16702918caa4d4ab7062965050a780
41 changes: 41 additions & 0 deletions trunk/arch/tile/include/hv/drv_srom_intf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/*
* Copyright 2011 Tilera Corporation. All Rights Reserved.
*
* 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, version 2.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
* NON INFRINGEMENT. See the GNU General Public License for
* more details.
*/

/**
* @file drv_srom_intf.h
* Interface definitions for the SPI Flash ROM driver.
*/

#ifndef _SYS_HV_INCLUDE_DRV_SROM_INTF_H
#define _SYS_HV_INCLUDE_DRV_SROM_INTF_H

/** Read this offset to get the total device size. */
#define SROM_TOTAL_SIZE_OFF 0xF0000000

/** Read this offset to get the device sector size. */
#define SROM_SECTOR_SIZE_OFF 0xF0000004

/** Read this offset to get the device page size. */
#define SROM_PAGE_SIZE_OFF 0xF0000008

/** Write this offset to flush any pending writes. */
#define SROM_FLUSH_OFF 0xF1000000

/** Write this offset, plus the byte offset of the start of a sector, to
* erase a sector. Any write data is ignored, but there must be at least
* one byte of write data. Only applies when the driver is in MTD mode.
*/
#define SROM_ERASE_OFF 0xF2000000

#endif /* _SYS_HV_INCLUDE_DRV_SROM_INTF_H */
11 changes: 11 additions & 0 deletions trunk/drivers/char/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -616,5 +616,16 @@ config MSM_SMD_PKT
Enables userspace clients to read and write to some packet SMD
ports via device interface for MSM chipset.

config TILE_SROM
bool "Character-device access via hypervisor to the Tilera SPI ROM"
depends on TILE
default y
---help---
This device provides character-level read-write access
to the SROM, typically via the "0", "1", and "2" devices
in /dev/srom/. The Tilera hypervisor makes the flash
device appear much like a simple EEPROM, and knows
how to partition a single ROM for multiple purposes.

endmenu

2 changes: 2 additions & 0 deletions trunk/drivers/char/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ obj-$(CONFIG_RAMOOPS) += ramoops.o

obj-$(CONFIG_JS_RTC) += js-rtc.o
js-rtc-y = rtc.o

obj-$(CONFIG_TILE_SROM) += tile-srom.o
Loading

0 comments on commit c90a68c

Please sign in to comment.