static struct z_stream_s stream;
 
 #ifdef CONFIG_PSTORE
+static struct nvram_os_partition of_config_partition = {
+       .name = "of-config",
+       .index = -1,
+       .os_partition = false
+};
+
 static enum pstore_type_id nvram_type_ids[] = {
        PSTORE_TYPE_DMESG,
        PSTORE_TYPE_PPC_RTAS,
+       PSTORE_TYPE_PPC_OF,
        -1
 };
 static int read_type;
 
        tmp_index = part->index;
 
-       rc = ppc_md.nvram_read((char *)&info, sizeof(struct err_log_info), &tmp_index);
-       if (rc <= 0) {
-               pr_err("%s: Failed nvram_read (%d)\n", __FUNCTION__, rc);
-               return rc;
+       if (part->os_partition) {
+               rc = ppc_md.nvram_read((char *)&info,
+                                       sizeof(struct err_log_info),
+                                       &tmp_index);
+               if (rc <= 0) {
+                       pr_err("%s: Failed nvram_read (%d)\n", __FUNCTION__,
+                                                                       rc);
+                       return rc;
+               }
        }
 
        rc = ppc_md.nvram_read(buff, length, &tmp_index);
                return rc;
        }
 
-       *error_log_cnt = info.seq_num;
-       *err_type = info.error_type;
+       if (part->os_partition) {
+               *error_log_cnt = info.seq_num;
+               *err_type = info.error_type;
+       }
 
        return 0;
 }
 }
 
 /*
- * Reads the oops/panic report and ibm,rtas-log partition.
+ * Reads the oops/panic report, rtas and of-config partition.
  * Returns the length of the data we read from each partition.
  * Returns 0 if we've been called before.
  */
                                struct pstore_info *psi)
 {
        struct oops_log_info *oops_hdr;
-       unsigned int err_type, id_no;
+       unsigned int err_type, id_no, size = 0;
        struct nvram_os_partition *part = NULL;
        char *buff = NULL;
+       int sig = 0;
+       loff_t p;
 
        read_type++;
 
                time->tv_sec = last_rtas_event;
                time->tv_nsec = 0;
                break;
+       case PSTORE_TYPE_PPC_OF:
+               sig = NVRAM_SIG_OF;
+               part = &of_config_partition;
+               *type = PSTORE_TYPE_PPC_OF;
+               *id = PSTORE_TYPE_PPC_OF;
+               time->tv_sec = 0;
+               time->tv_nsec = 0;
+               break;
        default:
                return 0;
        }
 
+       if (!part->os_partition) {
+               p = nvram_find_partition(part->name, sig, &size);
+               if (p <= 0) {
+                       pr_err("nvram: Failed to find partition %s, "
+                               "err %d\n", part->name, (int)p);
+                       return 0;
+               }
+               part->index = p;
+               part->size = size;
+       }
+
        buff = kmalloc(part->size, GFP_KERNEL);
 
        if (!buff)
        }
 
        *count = 0;
-       *id = id_no;
+
+       if (part->os_partition)
+               *id = id_no;
 
        if (nvram_type_ids[read_type] == PSTORE_TYPE_DMESG) {
                oops_hdr = (struct oops_log_info *)buff;
 
        case PSTORE_TYPE_PPC_RTAS:
                sprintf(name, "rtas-%s-%lld", psname, id);
                break;
+       case PSTORE_TYPE_PPC_OF:
+               sprintf(name, "powerpc-ofw-%s-%lld", psname, id);
+               break;
        case PSTORE_TYPE_UNKNOWN:
                sprintf(name, "unknown-%s-%lld", psname, id);
                break;